#36405·nuxt

Dev error overlay reports the "ResizeObserver loop" notice (`ErrorEvent.error === null`) as "Thrown value: null"

Author: denismrteCreated Sep 24, 2026Updated Sep 24, 2026
Labelspending triage5.x

Environment

Operating system macOS 27.0.0, arm64
Node.js v24.19.0
Package manager pnpm 11.22.0
Nuxt [email protected] (current main) and 5.0.0-29835210.f258408a
Nitro 3.0.260903-beta
Builder vite 8.3.0
my-bad 0.2.7
Browser Chrome 153.0.8010.53 (headless, driven over CDP)

Reproduction

Self-contained — five small files, no repository needed.

package.json

json
{
  "private": true,
  "type": "module",
  "dependencies": {
    "nuxt": "npm:[email protected]",
    "vue": "3.5.43",
    "vue-router": "5.3.1"
  }
}

nuxt.config.ts

typescript
export default defineNuxtConfig({
  devtools: { enabled: false },
  telemetry: false,
})

app/app.vue

xml
<template>
  <NuxtPage />
</template>

app/pages/index.vue

xml
<template>
  <p id="idle">An idle page.</p>
</template>

app/pages/resize.vue

xml
<script setup>
import { onMounted, ref } from 'vue'

const box = ref()

// Resizing an observed element inside its own ResizeObserver callback leaves one notification
// undelivered in this frame, so the browser raises its "ResizeObserver loop" notice once. The
// notification is delivered in the next frame; nothing is broken.
onMounted(() => {
  let resized = false
  new ResizeObserver(() => {
    if (resized) return
    resized = true
    box.value.style.height = '120px'
  }).observe(box.value)
})
</script>

<template>
  <div id="box" ref="box">A box that grows once.</div>
</template>
  1. pnpm install && pnpm dev
  2. Once the dev server is ready, open / in one tab, then /resize in a second tab. (A request during warm-up on pnpm's isolated linker hits #36404 instead.)

Describe the bug

The browser dispatches its "ResizeObserver loop completed with undelivered notifications." notice at window as an ErrorEvent whose error is null. It is not an exception: the skipped observation is delivered in the next frame. The dev error overlay reports it as an application error: both tabs mount the overlay with "Error — Thrown value: null — No stack trace was provided", focus moves to <nuxt-error-overlay> in both, and the dev server logs ✖ Error: Thrown value: null.

Measured over CDP with a fresh dev server per scenario (tab B on /, then tab A on the page), twice for /resize:

version page in tab A window error events in tab A overlay in A / B overlay message focused element in A / B
3006e5ac, f258408a / none no / no — BODY / BODY
3006e5ac, f258408a /resize (runs 1 and 2) 1, error === null yes / yes Thrown value: null NUXT-ERROR-OVERLAY / NUXT-ERROR-OVERLAY
3006e5ac, f258408a a page that throws new Error() from a setTimeout 1, an Error yes / yes the error, with its source frames NUXT-ERROR-OVERLAY / NUXT-ERROR-OVERLAY
5.0.0-29787188.1d507ee7 (before #36258) /resize 1, error === null no / no — BODY / BODY

The overlay behaves as designed for a real error; what differs is the null. The listener added in #36258 (169a4bee) forwards event.error as it is (packages/nuxt/src/app/plugins/dev-error-overlay.client.ts, unchanged on main):

typescript
window.addEventListener('error', event => report(event.error, false))

report returns early for undefined but not for null, so null is sent as nuxt:dev:client-error with the message `Thrown value: ${describe(null)}` and the overlay is shown to every connected client.

Skipping an ErrorEvent whose error is null (as report already skips undefined) would keep the ResizeObserver notice out of the overlay.

Additional context

In a real app the notice comes from ordinary code: here it came from a ResizeObserver callback that constructs a third-party map widget, whose SDK creates its own ResizeObserver inside that callback. The page works; the overlay takes focus in every open tab on each load of such a page.

Logs

shell-script
✖ Error: Thrown value: null