ResizeObserver loop completed with undelivered notifications.
Browser · updated 2026-11-13
Chrome reports this to window.onerror when a ResizeObserver callback resizes an observed element and the browser has to skip notifications to avoid an endless loop in that frame. There is no stack trace (the error object is null and the file is the page), so trackers group every occurrence together. It often comes from a library (editors, auto-sizing textareas, charts), not your own code.
Uncaught error event: message: ResizeObserver loop completed with undelivered notifications. filename: https://shop.example/checkout lineno: 0 error: null
Quick fix
If it is your observer: don't change the observed element's size synchronously in the callback. Defer the change to requestAnimationFrame and only apply it when the value differs. In headless Chrome, growing the element in the callback raised the error every frame (41 times in 0.6 s); setting it once still raised it once; the same change inside requestAnimationFrame with a guard raised it 0 times. If it comes from a library and nothing looks broken, upgrade the library, then ignore the error group.
- Search your code for new ResizeObserver: a callback that sets width, height, padding or content on the element it observes is the cause.
- Move that change into requestAnimationFrame, and compare with the current value before setting it.
- No observer of yours? Check which components mount on the page (rich text editors, auto-resizing textareas, chart libraries) and upgrade them.
- If nothing on the page misbehaves, ignore the error group (runheed_ignore_error, or ignoreErrors in Sentry.init) so it stops counting against real errors.
const ro = new ResizeObserver(([entry]) => {
const target = Math.ceil(entry.contentRect.width / 8) * 8;
requestAnimationFrame(() => {
if (panel.offsetWidth !== target) panel.style.width = target + 'px';
});
});
ro.observe(panel);
// Library you can't change, and nothing breaks: drop it at the SDK
Sentry.init({ dsn, ignoreErrors: [/^ResizeObserver loop/] });Paste this into Claude Code, Cursor or Codex in the project that throws it. The agent reads this guide in plain text and applies the fix that matches your stack.
Read https://runheed.com/errors/resizeobserver-loop-completed-with-undelivered-notifications.md and fix this error in this project.Why it happens
The callback resizes what it observes
Setting a size or changing content in the callback triggers another resize in the same frame, which the browser stops by skipping notifications and reporting this error.
Two elements resize each other
An observer on A changes B, and an observer on B changes A (a sidebar and a content area, a parent fitting its child), so the loop runs through both.
A library observer
Editors, virtualized lists, auto-growing textareas and chart wrappers use ResizeObserver internally; some versions trigger the loop on layout changes.
Other fixes
- Use CSS (flex, grid, aspect-ratio, container queries) for layouts that only need to follow their container, with no observer at all.
- Debounce observers that do expensive work, so one resize burst causes one layout pass.
Same error, other wording
- ResizeObserver loop limit exceeded
- Uncaught Error: ResizeObserver loop completed with undelivered notifications.
Let your coding agent catch the next one
This error happens in the browser. Runheed records it when your frontend reports through @sentry/browser or @sentry/react with a Runheed DSN (setup), with your source lines when the bundle has a source map, and serves it to Claude Code, Cursor or any MCP client.
Setup for React and browser JavaScript, then have your agent fix and resolve it.
Related errors
- Hydration failed because the server rendered HTML didn't match the client. As a result...
- ChunkLoadError: Loading chunk 4512 failed. (error...
- TypeError: Cannot read properties of undefined (reading 'x')
More in React and Next.js rendering
- An error occurred in the Server Components render. The specific message is omitted in...Next.js
- Dynamic server usage: Route /x couldn't be rendered statically because it used `headers`.Next.js
- ReferenceError: window is not definedNext.js
- Error: Event handlers cannot be passed to Client Component props.Next.js
- Only plain objects, and a few built-ins, can be passed to Client Components from Server...Next.js
- Route "/orders/[id]" used `params.id`. `params` should be awaited before using its...Next.js
- Error: NEXT_REDIRECTNext.js
- Error: NextRouter was not mounted.Next.js
- Invalid src prop (https://cdn.example.com/p/42.jpg) on `next/image`, hostname...Next.js
- TypeError: Failed to parse URL from /api/ordersNext.js
- Too many re-renders. React limits the number of renders to prevent an infinite loop.Next.js
- useSearchParams() should be wrapped in a suspense boundary at page "/search".Next.js
- You're importing a module that depends on `useState` into a React Server Component...Next.js
- Objects are not valid as a React child (found: object with keys {id, name, total}). If...Next.js
- Element type is invalid: expected a string (for built-in components) or a class/function...Next.js
- Failed to find Server Action "7f3a9c2e5d1b4a6f8c0e2d7b9a1c3e5f7d9b0a2c4e". This request...Next.js
References: W3C Resize Observer specification: error reporting, MDN: ResizeObserver
Spotted a mistake? Email hello@greatwork.company. About Runheed.