Suspense issues Uncaught (in promise) DOMException: Failed to execute 'insertBefore' on 'Node'
Vue version
3.2.45
Link to minimal reproduction
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