beyond-all-reason / bar-lobby

BAR Lobby Client
https://beyond-all-reason.github.io/bar-lobby/
MIT License
33 stars 30 forks source link

Vue crash related to Suspense + Transition + RouterView + Teleport #179

Open Jazcash opened 1 year ago

Jazcash commented 1 year ago

This affects quite a lot of our pages. Have done some digging and found the route cause to be related to using Suspense, Transition, RouterView and Teleport together, along with a top level await that resolves quickly: https://github.com/vuejs/core/issues/7966

Repro steps for current master in BAR Lobby:

  1. Visit a page that uses Teleport in some way (e.g. singleplayer battle)
  2. Visit a page that redirects using await api.router.push(blahblah (e.g. player profile)

Result: image

runtime-dom.esm-bundler.js:36 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'nextSibling')
    at nextSibling (runtime-dom.esm-bundler.js:36:31)
    at removeFragment (runtime-core.esm-bundler.js:6208:20)
    at remove2 (runtime-core.esm-bundler.js:6173:17)
    at unmount (runtime-core.esm-bundler.js:6142:17)
    at Object.remove (runtime-core.esm-bundler.js:6529:21)
    at unmount (runtime-core.esm-bundler.js:6126:28)
    at unmountComponent (runtime-core.esm-bundler.js:6230:13)
    at unmount (runtime-core.esm-bundler.js:6115:13)
    at unmountChildren (runtime-core.esm-bundler.js:6259:13)
    at unmount (runtime-core.esm-bundler.js:6133:17)
1-alex98 commented 1 year ago

@Jazcash can i apply the patch that you suggest with "patch-package" npm package . We might need to redo the patch when we update vue but since it is only a one liner that would be really easy. Seems way handier than a fork for this one liner :D

Jazcash commented 1 year ago

ooo that's a cool package, go for it