-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Transitions causing error thrown: Cannot read properties of null (reading 'p') #8030
Comments
Are you using any third party Svelte components? They need to specify a |
Only one, |
I don't know, it was just a guess. Because in #3165 the symptoms only occurred when using transitions, that's why it immediately came to mind. And the fact that you cannot turn it into a REPL might be a sign that it's related to some sort of bundling issue. But it doesn't have to be, it might just as well be an ordinary bug. |
Closing due to lack of reproduction - this may have been fixed in Svelte 5 |
TL;DR: Confirming that this is likely resolved in svelte 5. I have been battling this for the past week, and my attempts to reproduce weren't completely successful but figured I'd share my learnings for the next person to come along. The app I'm building has websocket connections, plus async calls and abort-controller fetches which updates stores and their derived stores. All powering a UI similar to Google Sheets, we'll say.
I eventually ran out of time to investigate and removed all transitions within Attempt to replicate in REPLI did try to configure a simple setup, but I can't replicate the thrown error.
If you hammer the "Run Many" button you can observe that transition states get all messed up. Now, the same code in svelte5 (not using runes):
You can observe that it is less janky and ends up not having any observable issues. Props to svelte 5 :) |
Describe the bug
I'm aware a REPL would be helpful, but I couldn't reproduce the issue in the REPL, even though trying for several hours. So, posting this here with the best details I can give:
A fade-transition in a deeply nested component caused
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'p')
when attempting to navigate to another page on our app.The error-causing-transition is inside a
Card
-component, repeated within a{#each}
block inside a largerPage
-component.Relevant part of the
Card
-component:The stacktrace wasn't very helpful.
After disabling source maps I could see the exact line throwing, which originated from the Page-component, more specifically from a very simple
<div><slot/></div>
type of component used on thePage
:If I remove the transitions from the
Card
-component, the problem disappears, so we can work around it.Sorry for the crappy bug report. I'll keep trying to reproduce the problem in the REPL, but it seems challenging.
Reproduction
Not available, yet.
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: