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" since Chrome update 64 #104

Closed
onchainguy-btc opened this issue Mar 26, 2018 · 11 comments
Closed

"ResizeObserver loop limit exceeded" since Chrome update 64 #104

onchainguy-btc opened this issue Mar 26, 2018 · 11 comments

Comments

@onchainguy-btc
Copy link

I'm seeing this error message in my console since Chrome update 64. Doesn't seem to have any effect on my UI. Is anybody else having the same issue?

@AnthonyKob
Copy link

Exactly the same issue with Chrome 64 or 65

@KowalskiP
Copy link

Yes, same issue with 65 version

@souporserious
Copy link
Owner

Interesting 🤔, I haven't seen this myself yet, I'll have to test it out. It sounds like it might be the polyfill we are using. @que-etc any ideas here?

@ryanwisniewski
Copy link

We're getting this exception multiple times daily. Any update?

@jessb321
Copy link

jessb321 commented May 10, 2018

We are having this issue as well over at EDCD/coriolis#208. Happens any time the window resizes.

@michael-ecb
Copy link

For me this error do not appear in chrome console but in "Javascript errors notifier" (chrome extension)
any update ?

@JabbyPanda
Copy link

Some discussion on ResizeObserver loop limit exceeded WICG/resize-observer#38

@felixlinker
Copy link

felixlinker commented Aug 31, 2018

To enhance on what @willyb321 said - I work on the same repository: I just updated the dependency to ^2.0.0. The error only appears if setState is called in the onResize callback. It doesn't help if we check for values being changed, e.g. do something like @souporserious proposed in #56.

@joaovieira
Copy link

Any updates on this? Could this help: airbnb/visx#335?

@yoadsn
Copy link
Contributor

yoadsn commented Nov 14, 2018

Followed the same path linked to by @joaovieira - tested locally - this seems to resolve the problem.
@souporserious would you consider merging this? (Basically, monkey copy-paste there)

setState anyway was called sync on the measure callback being not a react callback. When the measured element relies on the measured size to set its own size (well, sometimes you need to do that) this error occurs. i.e setState -> sync render -> size change -> sync observe callback -> setState -> inf. loop detected.

The ResizeObserver loop limit exceeded error would not appear in chrome console - rather you should listen on window for errors (or as one of the above posts mentioned - use an extension).

Do something like this in the console to see if you are affected:

window.addEventListener('error', function(e) { console.log('ooops inf loop'); });

Many auto error-tracking scripts/extensions listen to window errors and this is why this shows up and bothers us develoepers.

hth

@rohittagadiya
Copy link

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

No branches or pull requests