-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Persistent "invalid opcode 7" and "RSV1 must be clear" errors #1238
Comments
You can get the UA from the |
@martin-langhoff FYI the "RSV1 must be clear" error can be emitted also when permessage-deflate is enabled, for example when a frame is a continuation frame or a control frame and it has the RSV1 bit set. |
Thanks for the info. I've enabled logging, and expect will have further info soon. At first read, it's not UA-specific. I hope to be able to repro in a controlled experiment tonight. |
@lpinca with perMessageDeflate disabled, the server response still contains |
Not expected, this function should return an empty object. |
Line 241 in d96c58c
|
If Lines 293 to 309 in d96c58c
props.length is 0 .
|
Here is a test: const WebSocket = require('.');
const net = require('net');
const wss = new WebSocket.Server({ port: 3000 }, () => {
const socket = new net.Socket();
socket.connect(3000, () => {
socket.write([
'GET / HTTP/1.1',
'Host: localhost',
'Upgrade: websocket',
'Connection: Upgrade',
'Sec-WebSocket-Extensions: permessage-deflate;server_no_context_takeover',
'Sec-WebSocket-Key: rfeGe1izPRq2JyonWunAQw==',
'Sec-WebSocket-Version: 13',
'\r\n'
].join('\r\n'));
});
socket.on('data', (data) => console.log(data.toString()));
}); |
Just a thought: I get an "RSV1 must be clear" error upon failed verification when I make use of the verifyClient option. |
@geogeorgiev are you sure? The |
@Ipinca if I simply return |
@geogeorgiev If you can please create and share a reproducible test case. |
Is it possible that the proxy you are using incorrectly adds the header an tricks the client into using the extension when it shouldn't? |
Closing due to inactivity. |
A low traffic site I code and maintain is seeing persistent "invalid opcode 7" and "RSV1 must be clear".
Following #919 and #1140, my initial diagnosis was that some client is buggy and not handling the fact that we do not support, or have disabled, the per-message-deflate extension.
Here is the interesting thing. I have added an adequate error handler, and I have fiddled with the perMessageDeflate option. Even with
perMessageDeflate: true
, the problem persists.Also of note:
How could I debug/diagnose this further? Is there a reasonable way of getting at the UA string, to see whether we can blame it on buggy UA?
The text was updated successfully, but these errors were encountered: