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

Errors not caught in imported components / streaming broken chunks #6900

Closed
1 task
povilas-juodzevicius opened this issue Apr 24, 2023 · 1 comment · Fixed by #6935
Closed
1 task

Errors not caught in imported components / streaming broken chunks #6900

povilas-juodzevicius opened this issue Apr 24, 2023 · 1 comment · Fixed by #6935
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@povilas-juodzevicius
Copy link

What version of astro are you using?

2.3.0

Are you using an SSR adapter? If so, which one?

Node

What package manager are you using?

pnpm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Currently Astro doesn't handle errors that are thrown in imported components. The node adapter tries rendering the component, but throws out only an error: net::ERR_INVALID_CHUNKED_ENCODING 200 (OK). So the server response is 200, though the runtime error is not caught.

The problem seems to be in streaming chunks where one of them is broken. The node adapter's asyncIterator function can be extended to catch these errors. It ends up in the dist/server/entry.mjs.

It would be best if we could either disable streaming or have some error catching in the adapter code so not to render a blank screen.

Link to Minimal Reproducible Example

https://github.com/povilas-juodzevicius/astro-runtime-error-repro

Participation

  • I am willing to submit a pull request for this issue.
@povilas-juodzevicius povilas-juodzevicius changed the title Errors not caught in imported components Errors not caught in imported components / streaming broken chunks Apr 24, 2023
@matthewp
Copy link
Contributor

Yes, this is a problem with the Node adapter I believe.

@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Apr 28, 2023
@matthewp matthewp self-assigned this Apr 28, 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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants