ResizeObserver Loop Completed with Undelivered Notifications: Harmless Noise or a Real Bug?

If you run error monitoring on a web app, ResizeObserver loop completed with undelivered notifications is probably near the top of your error list. It has no stack trace, no file name and no line number, and it often shows up thousands of times a day while nobody reports a problem. Most advice online says to ignore it. That is right most of the time, and wrong in the cases that matter. This post explains what the browser is telling you, how to tell harmless noise from a layout bug that users can see, and how to fix the code that causes it.
Prerequisites
The examples in this post run as written with:
- A current version of Chrome, Edge, Firefox or Safari. All of them support
ResizeObserverandcontentBoxSize. - Plain JavaScript or any framework. The patterns apply the same way to React, Vue, Angular and Svelte components.
- webpack-dev-server 4.15 or later if you want to filter the error from the development overlay.
- Optionally, the Appxiom Web SDK (
npm install @appxiom/web) if you want errors recorded with their activity trail. Setup steps are in the Web SDK installation guide.
What "ResizeObserver loop completed with undelivered notifications" means
ResizeObserver calls your callback after layout, once per frame, with the elements whose size changed. If your callback changes the size of an observed element, that change needs another layout and another round of notifications. The browser allows this, but only for elements deeper in the DOM tree than the ones it just reported. Anything else is held back until the next frame, and the browser reports that it did so by firing an error event on window.
That is the whole error. Nothing threw inside your code, your callback finished normally, and the held back notifications are delivered one frame later. The rule exists to stop an infinite loop where a resize triggers a resize that triggers a resize, which would freeze the page.
You may see two versions of the message:
| Message | Where you see it |
|---|---|
ResizeObserver loop completed with undelivered notifications. | Current Chrome, Edge, Firefox and Safari |
ResizeObserver loop limit exceeded | Older Chrome and Edge versions, still common in long tail traffic |
Group both under one issue in your error tracking. They have the same cause.
Why it floods error trackers and has no stack trace
The browser dispatches the error as an ErrorEvent on window. Any code that listens with window.onerror or window.addEventListener('error', ...) receives it, and that includes most error monitoring tools. Because the event comes from the browser's rendering loop and not from a throw in your code, event.error is null. There is no stack to show, so trackers display a bare message.
You can see this for yourself in the console:
window.addEventListener('error', (event) => {
if (event.message.includes('ResizeObserver loop')) {
console.log({
message: event.message,
error: event.error, // null: there is no Error object
filename: event.filename // usually empty
});
}
});
The volume comes from how common ResizeObserver has become. Autosizing text areas, virtualized lists, charts that fit their container, sticky headers and many component libraries all use it. One component that resizes itself inside its own callback can produce the error on every page view.
The development overlay makes it look worse. webpack-dev-server shows runtime errors as a full screen overlay, so developers see this harmless message as a blocking error. You can filter it there without hiding it in production:
// webpack.config.js
module.exports = {
devServer: {
client: {
overlay: {
runtimeErrors: (error) =>
!error?.message?.includes('ResizeObserver loop'),
},
},
},
};
When the ResizeObserver loop error is harmless
The error is noise when the layout settles one frame later and the user never notices. These are the usual signs:
- The count is high but steady, and it does not move with releases.
- It appears across many pages and browsers, not on one screen.
- The element involved sizes itself once, for example a text area growing to fit its content, and then stops.
- Users on the affected pages finish what they came to do at the same rate as everyone else.
In that case, the browser did exactly what it should. It deferred one resize to the next frame, the user saw one frame at a slightly different size, and the page moved on.
When it points to a real layout bug
The same message can also be the only visible sign of a layout that never settles. Here the deferred resize triggers another resize, which triggers another, and the element changes size on every frame. The browser stops the loop from freezing the page, but it cannot stop the page from flickering.
Watch for these patterns:
| Pattern | What the user sees | Typical cause |
|---|---|---|
| Oscillation | Content jumps back and forth between two sizes | A scrollbar appears, the width shrinks, content reflows shorter, the scrollbar disappears, and the cycle repeats |
| Runaway growth | An element keeps getting taller or wider | The callback sets a size based on the element's own size plus padding or a border |
| Stale layout | A chart, table or editor stays at the wrong size after a resize | The fix for the error was to swallow notifications, so the last one is lost |
| High CPU | Fans spin, battery drains, scrolling stutters | Layout runs every frame because a resize never settles |
The signals in your data are different from the harmless case. The error count jumps after a release, it clusters on one route or one component, it is concentrated in one browser or screen width, and users who hit it are less likely to finish the task they started.
See whether the error is breaking a user journey. The Appxiom Web SDK captures errors automatically and records each occurrence with the activity trail, so you can see the page and the steps before the error. Mark the journeys that matter with
startGoalandendGoal, and Appxiom scores issues with Goal Friction Impact. A ResizeObserver loop on a blog sidebar ranks low. The same error on a checkout form that users abandon ranks high. With the Appxiom MCP server connected, you can ask your coding agent: "Which JavaScript errors on the web app have the highest Goal Friction Impact this week, and on which pages do they occur?"
Our post on Goal Friction Impact and the revenue cost of broken user journeys explains how the score is calculated, and session replay vs activity trail covers why a timestamped trail is often quicker to debug from than a recording.
How to fix the code that causes it
The cause is always the same: a callback changes the size of something the observer is watching, in the same frame. Here is an illustrative case. A video card sets its height from its width to keep a 16:9 shape:
// Triggers the loop error: the callback resizes the element it observes
const observer = new ResizeObserver((entries) => {
for (const entry of entries) {
const width = entry.contentRect.width;
entry.target.style.height = `${width * 0.5625}px`;
}
});
document.querySelectorAll('.video-card').forEach((el) => observer.observe(el));
Setting the height changes the observed box, so the browser has a new notification for the same element in the same frame, and it reports the loop. There are four ways to fix it, in order of preference.
1. Use CSS instead of JavaScript
Many ResizeObserver callbacks do work that CSS now does natively. A fixed ratio needs one line:
.video-card {
aspect-ratio: 16 / 9;
}
Container queries cover most "change the layout when the container is narrow" cases, and scrollbar-gutter: stable stops the scrollbar oscillation in the table above by reserving space for the scrollbar whether or not it is shown. With no callback, there is no loop.
2. Skip work when the size has not changed
If you need JavaScript, track the dimension you react to and do nothing when it is the same. Changing the height then produces one extra callback with an unchanged width, and that callback returns early:
const lastWidth = new WeakMap();
const observer = new ResizeObserver((entries) => {
for (const entry of entries) {
const width = entry.contentBoxSize[0].inlineSize;
if (lastWidth.get(entry.target) === width) continue;
lastWidth.set(entry.target, width);
entry.target.style.height = `${Math.round(width * 0.5625)}px`;
}
});
Rounding matters. Fractional sizes can differ by a fraction of a pixel on each pass, which is enough to keep a loop going.
3. Defer the change to the next frame
Wrapping the change in requestAnimationFrame moves it out of the current notification round, so the browser does not report it as a loop:
const observer = new ResizeObserver((entries) => {
requestAnimationFrame(() => {
for (const entry of entries) {
const width = entry.contentBoxSize[0].inlineSize;
entry.target.style.height = `${Math.round(width * 0.5625)}px`;
}
});
});
Use this together with the size check, not instead of it. On its own, requestAnimationFrame silences the error but keeps an unstable layout unstable: the element still resizes every frame, and now nothing tells you about it.
4. Observe one element and resize another
If the callback must change sizes, observe a wrapper whose size does not depend on what you change, and resize a child inside it. Changes deeper in the tree are allowed in the same frame, so the browser delivers them without an error.
Measure before you mute it
It is tempting to drop the error in your tracker's ignore list and move on. Before you do, record where it happens for a week, so you know whether you are muting noise or hiding a bug:
window.addEventListener('error', (event) => {
if (!event.message?.includes('ResizeObserver loop')) return;
ax.logActivity('ResizeObserver loop', {
path: location.pathname,
width: window.innerWidth,
});
});
Here ax is the instance returned by the Appxiom Web SDK's init call, and logActivity adds the entry to the activity trail. Any logging you already use works the same way. If the entries spread evenly across pages and screen sizes, filter the message. If they cluster on one route or width, open that page at that width and watch the layout. You will usually see the flicker within seconds.
The same thinking applies to other noisy browser errors. Script error. from cross-origin scripts and promise rejections without a handler also fill logs with little context. Our guide to unhandled promise rejections in JavaScript covers that second group, and if your ResizeObserver lives inside a React component, check that the effect disconnects it on unmount, as described in React memory leaks and useEffect cleanup.
A checklist for ResizeObserver loop errors
- Group
ResizeObserver loop completed with undelivered notificationsandResizeObserver loop limit exceededas one issue. - Filter it from the development overlay so it stops blocking developers.
- In production, record the page and screen width for a week before you decide to ignore it.
- If it clusters on one page, reproduce at that width and look for flicker, growth or a stale size.
- Replace callback sizing with CSS where you can:
aspect-ratio, container queries andscrollbar-gutter. - Where you need JavaScript, compare against the last size, round values, and defer with
requestAnimationFrame. - Disconnect observers when components unmount.
Noise is a judgment you make with data
The ResizeObserver loop error is harmless in most apps, most of the time. The problem is that the same message covers a one-frame delay nobody sees and a layout that flickers on the one form your users need to finish. You can only tell them apart with the page, the browser, the screen size and what the user did next.
To capture JavaScript errors from your web app with that context, follow the Appxiom Web SDK quickstart. It takes one npm install and a single init call.


