-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Node server keeps crashing repeatedly with "Error: reserved fields must be empty" #1039
Comments
Add an error listener to your wss.on('connection', (ws) => {
ws.on('error', (err) => handleError(err));
}); This error is raised when the client sends a frame with one or more reserved bit on. It can happen because the client is broken or because a bad actor is sending invalid frames with the aim of crashing your server. |
@lpinca Do you have any advice on how to implement this with this library? https://github.com/apollographql/subscriptions-transport-ws It looks like I'd do something like this:
which does not seem to be helping as the server continues to crash with "reserved fields must be empty". |
What you wrote in this comment apollographql/subscriptions-transport-ws#94 (comment) seems correct to me. There should be an error listener there. |
@lpinca Yes, after I made sure the change was in: Wrong:
Correct:
It is catching the error, and no longer crashing. All is well now. Thanks so much. |
This started happening suddenly, and now I can't even get my server back up. It's been a few hours. it just restarts, then immediately crashes.
Any ideas?
The text was updated successfully, but these errors were encountered: