core: [Bug Report][3.4.11] Uncaught (in promise) TypeError: Cannot read properties of null (reading 'parentNode')

Vue version

3.4.11

Link to minimal reproduction

https://stackblitz.com/edit/nuxt-starter-n6ky34

Steps to reproduce

Error when using <nuxt-link> navigation.

What is expected?

No errors, navigate to other page.

What is actually happening?

[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core . 
  at <NuxtLayout> 
  at <App key=3 > 
  at <NuxtRoot>
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'parentNode')
at parentNode (chunk-FRWRVS7C.js?v=e55eeb5e:9605:30)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-FRWRVS7C.js?v=e55eeb5e:7513:11)
    at ReactiveEffect.run (chunk-FRWRVS7C.js?v=e55eeb5e:421:19)
    at instance.update (chunk-FRWRVS7C.js?v=e55eeb5e:7553:17)
    at callWithErrorHandling (chunk-FRWRVS7C.js?v=e55eeb5e:1634:32)
    at flushJobs (chunk-FRWRVS7C.js?v=e55eeb5e:1841:9)

The error stops the execution of the page and does not let you navigate.

image

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (32) x64 Intel(R) Core(TM) i9-14900KF
    Memory: 36.76 GB / 63.85 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.9.2 - ~\<privacy-deleted>\node_modules\.bin\npm.CMD
  Browsers:
    Chrome browser: 120.0.0.0

Any additional comments?

Reproduction page (v3.4.10 - working)

https://stackblitz.com/edit/nuxt-starter-an2gkf

Reproduction page (v3.4.11 - not working)

https://stackblitz.com/edit/nuxt-starter-n6ky34

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Reactions: 50
  • Comments: 21 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@edison1105 I’d like to mention that this is not a minor bug, this currently breaks navigation for any nuxt version, as you can see in the related PR. I’d strongly advise to raise the urgency of the issue and, possibly, add a test to the Ecosystem CI

The same error happens when you’re switching between pages that has the <NuxtLayout> while a promise is still resolving. Happens even when only using default layout and even with a single root node inside page templates. No workaround available for this one im afraid.

Reproduction here: Try switching fast between the 2 pages before the promise is resolved. Observe error in console. stackblitz.com/edit/nuxt-starter-dtnaui

@ferferga Sorry, I’ve been busy recently. I just saw it. It can be reproduction. Open this one and I will take a further look later.

Edit simple reproduction

@yyx990803 Vue 3.4.20 fixes this issue for me. THX!

This one almost made my head explode today, breaking my static pages based on Nuxt. But it is good to know that it was not my fault 😃

This bug appears to affect nuxt, see nuxt/nuxt#25179

still not fixed when having multiple layouts. reverting to 3.4.8 fixes it and it doesn’t work on 3.4.9

“vue”: “3.4.8” not “vue”: “3.3.8”

I confirm that it has been fixed. Everyone upgrade to v3.4.13 👏🎉

Same error in nuxt 3.

My temporal solution was set Vue version fixed in my package json

"vue": "3.3.8",

For me this only worked properly after putting it in the resolutions segment of my package.json. Still holding my fingers crossed for this to be solved within the weekend 🙈

"resolutions": {
  "vue": "3.3.8"
},

当有多个布局时仍然没有修复。恢复到 3.4.8 可以修复该问题,但在 3.4.9 上不起作用

Thanks for this answer, it solved my problem

Same error in nuxt 3.

My temporal solution was set Vue version fixed in my package json

"vue": "3.3.8",