-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Vite crash because of RangeError: Invalid Websocket Frame 1006 WS_ERR_INVALID_CLOSE_CODE #11991
Closed
7 tasks done
Labels
Comments
9 tasks
Hello @samelie. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
@bluwy he already created the PR |
Ah thanks, I didn't catch the link somehow 😅 |
It's on me Bjorn - I wrote this issue and didn't update it. Just linked to
the issue from the PR
Thanks for taking a look
…On Tue, Feb 14, 2023 at 1:46 AM Bjorn Lu ***@***.***> wrote:
Ah thanks, I didn't catch the link somehow 😅
—
Reply to this email directly, view it on GitHub
<#11991 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGA4BJOQNT5ILO6A4VC4LWXNH6BANCNFSM6AAAAAAUV3J3JE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
9 tasks
bluwy
added a commit
that referenced
this issue
Feb 18, 2023
futurGH
pushed a commit
to futurGH/vite
that referenced
this issue
Feb 26, 2023
Co-authored-by: Samuel Elie <selie@anduril.com> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
If the
ws
dependency module emits an error while HMR is running, it goes unhandled and causes Vite's node process to crash.This particular
ws
throws after the computer goes to sleep and wakes up.Afaik, this is not reproducible via vite.new
Reproduction
https://stackblitz.com/edit/vitejs-vite-3cq32j?file=index.html&terminal=dev
Steps to reproduce
And in terminal:
I have a fix for this and will make a PR
In summary,
We need to put an error handler on
socket
hereYou can see the creator of
ws
approving how the handler was done hereBy catching the error on
socket
, Vite does not crash.System Info
Used Package Manager
yarn
Logs
Click to expand! This is the crash
Validations
The text was updated successfully, but these errors were encountered: