Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResizeObserver loop limit exceeded Sentry flood #64

Closed
Simek opened this issue Nov 24, 2022 · 1 comment · Fixed by #65
Closed

ResizeObserver loop limit exceeded Sentry flood #64

Simek opened this issue Nov 24, 2022 · 1 comment · Fixed by #65

Comments

@Simek
Copy link
Contributor

Simek commented Nov 24, 2022

Hello, lately we have switched from Algolia Docsearch UI to custom one build upon the CMDK menu on http://docs.expo.dev.

After few days on production I have spotted that we started to receive around 1k Sentry events a day related to the ResizeObserver logic used inside CMDK ("ResizeObserver loop limit exceeded"):

I have tried to reproduce this problem locally, but without a success. From the reports it looks like this mostly affect desktop users using Chrome or Edge, on macOS and Windows.

You can find our implementation here:

Any hint on how to reproduce or fix that problem would be appreciated.

@Simek
Copy link
Contributor Author

Simek commented Nov 24, 2022

After a bit of digging it looks like this problem is related to WICG/resize-observer#38 and wrapping the ResizeObserver logic with window.requestAnimationFrame should prevent the infinite loops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant