benetech / VideoDeduplication

GNU General Public License v3.0
35 stars 12 forks source link

Fix ResizeObserver loop completed with undelivered notifications. #442

Open stepan-anokhin opened 3 years ago

stepan-anokhin commented 3 years ago

Some of the e2e tests fail on Firefox with the following error message:

The following error originated from your application code, not from Cypress.

  > ResizeObserver loop completed with undelivered notifications.

Failing tests are:

The problem is caused by FileGridList, FileLinearList and FilesCollection components using the useResizeDetector hook (from react-resize-detector).

The problem seems to be caused by the component changing its size during the ReactObserver event handling (which results in infinite recursion). The actual mechanism of infinite size-modification could be tricky. See for example the following comment: https://github.com/juggle/resize-observer/issues/103#issuecomment-610957771

The problem is reproducible only in e2e tests on Firefox, so the error is temporary ignored. (

Side note. Another related error is

ResizeObserver loop limit exceeded

But it could be safely ignored. See discussion in https://stackoverflow.com/a/50387233