Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when using router-view, transition, suspense and teleport #7966

Open
Jazcash opened this issue Mar 27, 2023 · 3 comments · May be fixed by #9392
Open

App crashes when using router-view, transition, suspense and teleport #7966

Jazcash opened this issue Mar 27, 2023 · 3 comments · May be fixed by #9392
Labels
has PR A pull request has already been submitted to solve the issue 🔩 p2-edge-case scope: suspense scope: teleport scope: transition

Comments

@Jazcash
Copy link

Jazcash commented Mar 27, 2023

Vue version

3.2.47

Link to minimal reproduction

https://codesandbox.io/p/sandbox/vue-router-suspense-transition-teleport-bug-e47p0j?file=%252Fsrc%252FApp.vue

Steps to reproduce

  1. Click C a few times, notice app is fine
  2. Click B
  3. Now click C again, app will crash

What is expected?

App should not crash

What is actually happening?

App crashes with Uncaught (in promise) TypeError: node is null

System Info

No response

Any additional comments?

I initially thought this issue was a problem with PrimeVue and raised an issue there, but after narrowing it down further it seems more like a core vue problem.

@wucdbm
Copy link

wucdbm commented Mar 29, 2023

Sounds to me that this could be somehow related to #7086

Basically, in place of a after SSR it tries to render another set of elements, but the template tag does not really have a tag, so parent is null or undefined.

It could be similar behaviour with transition?

@edison1105
Copy link
Member

a note here:
the root cause is that the suspense resolves before the fallback node is mounted. This caused component B to be unmounted twice, causing this issue when it was unmounted the second time.

@nmeierpolys
Copy link

Does anyone have a workaround or plans to merge one of the proposed fixes? I'm seeing the same thing and it feels like an issue that warrants some attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR A pull request has already been submitted to solve the issue 🔩 p2-edge-case scope: suspense scope: teleport scope: transition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants