Subscribe on changes!

Suspense issues Uncaught (in promise) DOMException: Failed to execute 'insertBefore' on 'Node'

avatar
Dec 21st 2022

Vue version

3.2.45

Link to minimal reproduction

https://sfc.vuejs.org/#__SSR__eNp1VEtv00AQ/isjc0gKydqtWlKMWwkhcSqlgnLCHNb2ON3U3jW760RRmv/OrF95tVEkz2vn+c1svC9VxZY1eqEXmVSLyoJBW1e3sRRlpbSFr6qsINeqhBHzHePMR7GMZaqksVAVfI3awA38iSXABkQWwvkEpEif73mJIcTePdGS6NiD7WRnFUwgF9rY3uxbz8TeBAq+U9x1tJO38e7rMkFNgWawjeXfWEZ+mz4lTozFkuwsEgcQWZ4UCCl5NDexJ6QUcv7oZLHXGDiTRGXrjgHov9Gv2lQoTevnUOcedVHgXYY5rwsXvLeysY2a1i2nudIUts0bhOw7Rs0In3E9qJjInKhlBimJ/L3okb9X2qup5LwoEp4+7z1yeg0Zt3zaOhUZ+Q+G6gcrUc7B6JSUT9ZWJvT91WrF5pov6a1mqSr9lvQvgiu8/Bgkl7NPeIFXyeU1xzSYzc6DNLjOrsj3Qdrud6d4Ro3vy2eMHUU3FZe3QUCTdMRB+r7VbzXheC6RfzK0bsb+bshEu/kTvefLm3gt5qclr9jCKElbsXHmBJpGQTMLoZE4Ge2B43fNMnnqlmNhmNJznyima2lFiQxNOU20Whka84K8NEvQ+fBJuEQ91Sgz1G7ib/s8Mj3x69zSPmyplH5V3WYftcuh4RR6+w222WvQCFtstG8eRGprjb9/3r0O5OPxbzbd5Jm7DO4awMtLLxrOAHyg2t3/Q6/q7wBsqbBTvOzc7h8GMj6BEU26r6rD09Ey9Qew4HJOxbhpD8ewu3VaVe7S0boLiQ+OGzdwGLXBR4QOsOuKjtaPZIGpnYDGf7XQSNfO6pqKoOGcfW4wdXA/d90k9+MzuLmF0aiz4ysuLEhcAUUshcFxa0C5PRK4VG07wXdun1heKKXHDam5zFRJuvdwEQTBGTW1+fYJDDfT2/4HxsTlNA==

Steps to reproduce

Wrap a Suspense tag around a component with a top-level await.

What is expected?

The Suspense will render the #fallback element, and render the #default element once its Promise is resolved.

What is actually happening?

I receive one warning and one error.

Warning from the #default component:

runtime-core.esm-bundler.js:40 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core

Error:

Uncaught (in promise) DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
    at insert (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:7329:12)
    at processCommentNode (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5264:7)
    at mountComponent (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5552:9)
    at processComponent (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5521:9)
    at patch (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5239:11)
    at patchKeyedChildren (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5830:11)
    at patchChildren (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5751:9)
    at processFragment (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5511:9)
    at patch (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:5233:9)
    at patchSuspense (http://localhost:5173/node_modules/.vite/deps/chunk-2ZL6S75E.js?v=c05eacc8:2260:7)

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Memory: 5.37 GB / 15.71 GB
Binaries:
    Node: 18.7.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.3.0 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.19.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
    Edge: Spartan (44.22621.819.0), Chromium (108.0.1462.54)
    Internet Explorer: 11.0.22621.1
npmPackages:
    vue: ^3.2.45 => 3.2.45

Any additional comments?

No response

avatar
Dec 22nd 2022

I cannot reproduce the described behavior with the reproduction link provided.