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

Client errors aren't that helpful in the docs #14752

Open
MathiasWP opened this issue Dec 18, 2024 · 5 comments · May be fixed by #14932
Open

Client errors aren't that helpful in the docs #14752

MathiasWP opened this issue Dec 18, 2024 · 5 comments · May be fixed by #14932

Comments

@MathiasWP
Copy link
Contributor

I've managed to trigger the Svelte error: state_unsafe_mutation error a couple of times while migrating my app from Svelte 4 to 5. When it happens i am a little confused as to why, and when i click on the link to the client errors in the docs i get no further explanation on common use cases, how it can happen and what to do to solve it: https://svelte.dev/docs/svelte/runtime-errors#Client-errors

It would be awesome if the docs had deeper explanations on these errors, so that i could use it as a resource for fixing the bugs that occur. I would imagine that people who google these errors would be pleasantly surprised to find an explanation and solution to these errors in the docs.

@dummdidumm dummdidumm transferred this issue from sveltejs/svelte.dev Dec 18, 2024
@dummdidumm dummdidumm linked a pull request Jan 7, 2025 that will close this issue
@Aryxst
Copy link

Aryxst commented Jan 9, 2025

I'm having an hard time finding what could be it's cause too.

@MathiasWP
Copy link
Contributor Author

I'm having an hard time finding what could be it's cause too.

Can you post the code @Aryxst? @Rich-Harris asked for real life examples to give a better explanation in the docs

@Aryxst
Copy link

Aryxst commented Jan 10, 2025

I'm having an hard time finding what could be it's cause too.

Can you post the code @Aryxst? @Rich-Harris asked for real life examples to give a better explanation in the docs

I'm getting this error on a local unpublished repo. I will create a repo/repl and share it in a couple hours

@Aryxst
Copy link

Aryxst commented Jan 10, 2025

https://github.com/Aryxst/chimera/blob/master/src/routes/settings/sources.svelte

Edit: It's weird because I get the error after like the fifth time the state temporarySource gets updated
image

@MathiasWP
Copy link
Contributor Author

I've managed to trigger this error again, and it's really difficult to trace what derived/template expression causes this error to occur. If the error logging from Svelte could show the derived/template expression that ran when this was triggered would drastically help me in debugging @Rich-Harris

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

Successfully merging a pull request may close this issue.

3 participants