Skip to content

[BUG] ResizeObserver loop completed with undelivered notifications - webpack-dev-server related #1104

Closed

Description

@puneetmakkar

After upgrading to 5.21.5 (from 4.2.21), I am getting this error locally sometimes when tooltip is opened.
Maybe its due to the usage of ReactObserver

react-scripts v5 brings in webpack-dev-server v4 which shows runtime errors on full screen.

Potential fix and more details can be seen here.

Reproduction
Happens sometimes when opening the react tooltip component

Expected behavior
Not getting the error.

Screenshots
Screenshot 2023-10-19 at 7 31 22 PM

OS: MacOS.
Browser: Chrome

Activity

  1. gabrieljablonski commented on Oct 20, 2023

    @gabrieljablonski
    Member

    Can you test this after disabling all of your browser extensions? Or try it on another browser.

    Which solution from the StackOverflow question are you suggesting? The usage of requestAnimationFrame() doesn't seem like something I'd be comfortable adding right now.

    I've also seen a suggestion to set the version for webpack-dev-server to v4.14.0. See it that helps.

  2. puneetmakkar commented on Oct 21, 2023

    @puneetmakkar
    Author

    I guess webpack-dev-server@4.14.0 was to remove the overlay error due to cancelled api calls.
    I was able to get rid of ResizeObserver overlay error with webpack-dev-server@4.11.1
    thanks !

  3. DriesVS commented on Jan 23, 2024

    @DriesVS

    Strange, we still have the same issue with webpack-dev-server@4.14.0.

  4. alberthuynh91 commented on Feb 8, 2024

    @alberthuynh91

    Running into this issue as well on react 16.13, react-tooltip 5.26, using webpack with craco

  5. gabrieljablonski commented on Feb 9, 2024

    @gabrieljablonski
    Member

    Although it seems like this is a "benign" error message (as in you can safely ignore it, shouldn't break anything on production app), it is still annoying to deal with it during development.

    Should've been fixed on #1137, which is >=v5.25.1 (also see #1136 for context).

    Will reopen until we can figure out why it's back.

  6. gabrieljablonski commented on Feb 9, 2024

    @gabrieljablonski
    Member

    Here's the webpack config on how to ignore the specific error (untested, let me know if it works)

    vuejs/vue-cli#7431 (comment)

    module.exports = {
      //...
      devServer: {
        client: {
          overlay: {
            runtimeErrors: (error) => {
              const ignoreErrors = [
                "ResizeObserver loop limit exceeded",
                "ResizeObserver loop completed with undelivered notifications.",
              ];
              return !ignoreErrors.includes(error.message);
            },
          },
        },
      },
    };

    Again, we're assuming this error can be safely ignored, since there hasn't been any evidence of it interfering with expected tooltip behavior.

    Will still keep this open until we can figure out a permanent fix.

  7. mdv27 commented on Apr 2, 2024

    @mdv27
    module.exports = {
      //...
      devServer: {
        client: {
          overlay: {
            runtimeErrors: (error) => {
              const ignoreErrors = [
                "ResizeObserver loop limit exceeded",
                "ResizeObserver loop completed with undelivered notifications.",
              ];
              return !ignoreErrors.includes(error.message);
            },
          },
        },
      },
    };

    This does not work for me.

  8. danielbarion commented on May 20, 2024

    @danielbarion
    Member

    Hey guys, can you please provide a simple reproducible repository? I would like to take a look when I have some available time

  9. Fosol commented on May 31, 2024

    @Fosol

    Only workaround I've found is

    //Stop error resizeObserver
    const debounce = (callback: (...args: any[]) => void, delay: number) => {
      let tid: any;
      return function (...args: any[]) {
        // eslint-disable-next-line no-restricted-globals
        const ctx = self;
        tid && clearTimeout(tid);
        tid = setTimeout(() => {
          callback.apply(ctx, args);
        }, delay);
      };
    };
    
    const _ = (window as any).ResizeObserver;
    (window as any).ResizeObserver = class ResizeObserver extends _ {
      constructor(callback: (...args: any[]) => void) {
        callback = debounce(callback, 20);
        super(callback);
      }
    };
    
  10. github-actions commented on Aug 30, 2024

    @github-actions

    This issue is stale because it has not seen activity in 30 days. Remove the stale label or comment within 14 days, or it will be closed.

  11. iphonic commented on Sep 20, 2024

    @iphonic

    Still facing the same issue

  12. removed
    StaleThis has not seen activity in quite some time
    on Sep 20, 2024
  13. zehawki commented on Oct 15, 2024

    @zehawki

    After upgrading to 5.28.0 from 4.2.21 just now, getting continuous ResizeObserver loop completed with undelivered notifications. after moving around on tooltip.

    Chrome, React 17, CRA 5

  14. danielbarion commented on Oct 18, 2024

    @danielbarion
    Member

    @zehawki can you please provide a reproducible example so I can take a detailed look into it?

  15. github-actions commented on Jan 17, 2025

    @github-actions

    This issue is stale because it has not seen activity in 30 days. Remove the stale label or comment within 14 days, or it will be closed.

  16. gabrielecastellano commented on Jul 8, 2025

    @gabrielecastellano

    Only workaround I've found is

    //Stop error resizeObserver
    const debounce = (callback: (...args: any[]) => void, delay: number) => {
      let tid: any;
      return function (...args: any[]) {
        // eslint-disable-next-line no-restricted-globals
        const ctx = self;
        tid && clearTimeout(tid);
        tid = setTimeout(() => {
          callback.apply(ctx, args);
        }, delay);
      };
    };
    
    const _ = (window as any).ResizeObserver;
    (window as any).ResizeObserver = class ResizeObserver extends _ {
      constructor(callback: (...args: any[]) => void) {
        callback = debounce(callback, 20);
        super(callback);
      }
    };
    

    This worked for me! Thank you very much.

    Hope the issue could be reopened and properly addressed. Local development has become impossible.
    I am sorry I cannot provide a minimal reproducible example.

  17. aniawala-autenti commented on Aug 6, 2025

    @aniawala-autenti

    Same problem, I have updated from 5.18.1 to 5.29.0 and I am getting this error on dev environment.
    react 17.0.2, react-scripts 5.0.1, Chrome 138.0.7204.101,

    It is happening after couple of seconds when I am hovering over elements to show tooltips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugStaleThis has not seen activity in quite some time

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions