-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
fix (Connection): Add error handler to websocket instance #393
Conversation
@jamesopti thanks a lot for your bug report and even more thanks for fixing it yourself!! 🙏 |
@jamesopti Do we need to keep the updated package-json.lock? Looks like it was just generated by a new npm version probably? |
Good catch, reverted! How does this repo manage NPM versions? I'm using NVM and currently have 16.3 ( |
@janthurau Any ideas about the test failures here? https://github.com/ueberdosis/hocuspocus/runs/8094400524?check_suite_focus=true#step:7:555 Googling suggests this error was introduced in Node 18.6 but I think this repo runs Node 16 🤔 |
@jamesopti thx! Seems like Github changed something, the tests that passed yesterday suddenly started failing as well (https://github.com/ueberdosis/hocuspocus/actions/runs/2944477556). Let's hope this resolves itself (on github side maybe), if not I'll have a look on Thursday/Friday. Weird! |
Hmmm looks like the Node version changes since yesterday from 16.16 to 16.17 (see screenshots from successful vs unsuccessful builds of this PR). I suspect we'll need to pin to node 16.16 or fix the errors. I can reproduce locally now with v16.17 |
Wow, yes. We fought with this several hours on local machines already. See Updating Most people changed from Not really happy about it but pinning node version seems to be the only solution right now? |
b51bc6d
to
c6f47db
Compare
I've updated the github actions to stick with 16.16 for now and rebased this branch with main. Let's pray for the build to succeed :) |
Overview
Fixes #392
Adds a listener for the
error
event from the underlyingws
instance.This is necessary to handle any errors emitted by an individual websocket object are caught and don't cause the server to crash.
Context
websockets/ws#1825 (comment)
websockets/ws#1777 (comment)