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

Error on create multiple toasts with svelte-sonner #12273

Closed
ariel-salgado opened this issue Jul 3, 2024 · 3 comments · Fixed by #12304
Closed

Error on create multiple toasts with svelte-sonner #12273

ariel-salgado opened this issue Jul 3, 2024 · 3 comments · Fixed by #12304
Labels
Milestone

Comments

@ariel-salgado
Copy link

Describe the bug

Although this look like library a related problem, when upgrading svelte 5 from next.170 to next.171 broke the library.
It seems very related to this.

Reproduction

The reproduction is very straight forward, when using the next.171 version if you click the button Toast to display a toast and wait until it goes away or dismiss, and click again it works fine, but if you spam the button it just creates one toast and then throws an error which you can see in the dev tools console.

This error doesnt exist in the next.170 version, and spamming the button creates a lot of toasts with no errors.

SvelteLab

I only installed svelte 5 and svelte sonner for the reproduction. So if you want to try it yourself it will work the same.

Logs

TypeError: Cannot read properties of null (reading 'start') at reconcile (chunk-...)...

System Info

SvelteLab

Severity

annoyance

@raymonddaikon
Copy link

raymonddaikon commented Jul 3, 2024

I believe I'm having a similar issue where multiple dom updates in a single frame is throwing this error. I was able to mitigate this by manually requesting the next frame before every mutation but this breaks my logic as I'm doing multiple mutations inside a single yjs transaction.

@dummdidumm dummdidumm added this to the 5.0 milestone Jul 3, 2024
@dummdidumm dummdidumm added the bug label Jul 3, 2024
@trueadm
Copy link
Contributor

trueadm commented Jul 4, 2024

I think this is likely the same issue as #12280.

@Rich-Harris
Copy link
Member

This is caused by a combination of hydration and the HMR wrapper, which is why it escaped our tests. Working on it. This is a simple repro, but the bug isn't visible in the preview REPL because there's no HMR/hydration there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants