souporserious/react-measure

"ResizeObserver loop limit exceeded" since Chrome update 64

Closed this issue ยท 11 comments

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?

Exactly the same issue with Chrome 64 or 65

Yes, same issue with 65 version

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?

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

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

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

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

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.

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

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