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

Svelte errors are not forwarded to user #9158

Closed
1 task
Its-Just-Nans opened this issue Nov 21, 2023 · 3 comments · Fixed by #9530
Closed
1 task

Svelte errors are not forwarded to user #9158

Its-Just-Nans opened this issue Nov 21, 2023 · 3 comments · Fixed by #9530
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: hmr Related to HMR (scope) pkg: svelte Related to Svelte (scope)

Comments

@Its-Just-Nans
Copy link
Contributor

Astro Info

All astro versions

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Hello,

Here is the reproduction https://stackblitz.com/edit/github-asymdn

The example show that with a svelte component using client:only, if there are errors (even an "obvious" one like ee is not defined, we don't have clear instructions.

We just have

[HMR][Svelte] Unrecoverable HMR error in <Test>: next update will trigger a full reload

Or sometimes (in a personal project for example) :

  • the page crash
  • the error is displayed
  • but if I reload the page, it crashes again but with [HMR][Svelte] Unrecoverable HMR error in <Test>: next update will trigger a full reload with only error

But with client:visible we have a Error Boundary

What's the expected result?

Have a Error boundary each time OR at least have the error in the console

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-asymdn

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 21, 2023
@Its-Just-Nans Its-Just-Nans changed the title Svelte erros are not forwarded to user Svelte errors are not forwarded to user Nov 21, 2023
@Its-Just-Nans
Copy link
Contributor Author

Note that I though it would be svelte-hmr but it's not

sveltejs/svelte-hmr#86

@lilnasy
Copy link
Contributor

lilnasy commented Nov 22, 2023

I see a helpful error from your reproduction. Is it only missing errors with client:only?

@lilnasy
Copy link
Contributor

lilnasy commented Nov 22, 2023

I notice that the error is being eaten up here:

} catch (e) {
} finally {

@lilnasy lilnasy added pkg: svelte Related to Svelte (scope) - P4: important Violate documented behavior or significantly impacts performance (priority) feat: hmr Related to HMR (scope) and removed needs triage Issue needs to be triaged labels Nov 22, 2023
@bluwy bluwy self-assigned this Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: hmr Related to HMR (scope) pkg: svelte Related to Svelte (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants