question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ResizeObserver - loop limit exceeded

See original GitHub issue

Bug Report

Describe the Bug

Since Chrome 64, the ResizeObserver is firing a silent error that might be captured and raised when adding an event listener to the window (like some UI error handlers do).

See this GitHub discussion.

In index.ts, this can be fixed as follows:

// eslint-disable-next-line compat/compat
    observerRef.current = new (polyfill || window.ResizeObserver)(
      ([entry]: any) => {
        window.requestAnimationFrame(() => { /* < New line */

How to Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Use Chrome 64 / Safari 14 or newer
  2. window.addEventListener('error', function(e) { console.log(e); }); to log the error

Screenshot

Bildschirmfoto 2021-06-07 um 17 17 22

Expected Behavior

No errors from ResizeObserver should be forwarded to the event listeners.

Your Environment

  • Device: [MacBook Pro]
  • OS: [macOS 11.4]
  • Browser: [Chrome, Safari]
  • Version: [91.0.4472.77, 14.1.1]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
cornelius-behrendcommented, Jun 8, 2021

@wellyshen I’m glad I could help. Hopefully, the problem will be fixed with that in every case. The PR is here.

1reaction
wellyshencommented, Jun 8, 2021

@cornelius-behrend Thank you mate, it really helpful 💯

Read more comments on GitHub >

github_iconTop Results From Across the Web

ResizeObserver - loop limit exceeded - Stack Overflow
This error means that ResizeObserver was not able to deliver all observations within a single animation frame. It is benign (your site will...
Read more >
Error: ResizeObserver loop limit exceeded · Issue #5440
Resizing window triggers Error: ResizeObserver loop limit exceeded . The error is not logged in browser's console, but Sentry captures it.
Read more >
Uncaught exception: ResizeObserver loop limit exceeded
This is a legitimate problem, and the runtime error is in the console code. Regardless of what's in the CSV, the console should...
Read more >
ResizeObserver loop limit exceeded - Perspective - Ignition
I'm having a performance issue with perspective. The problem happens in a table component. I have two Arrays Object with 36 keys:values each ......
Read more >
Every time when I edit something in Tableau online, it ...
Every time when I edit something in Tableau online, it occurres an unexpected error. "ResizeObserver loop limit exceeded." Anyone knows how to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found