You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently in the works of making this library work with MKR1000 and WiFi101 and I'm testing this with a Node.js websocket client. However whenever I try to send a message from Node.js, the connection will fail with Invalid WebSocket frame: RSV1 must be clear, which indicates this library sets RSV1 to one, even though no extension was actually negated (websockets/ws#1140 (comment), https://tools.ietf.org/html/rfc6455#section-5.2).
In my config.h I've uncommented the "debug macros"
connected
RangeError: Invalid WebSocket frame: RSV1 must be clear
at Receiver.getInfo (C:\Users\GG\Downloads\node_modules\ws\lib\receiver.js:178:14)
at Receiver.startLoop (C:\Users\GG\Downloads\node_modules\ws\lib\receiver.js:131:22)
at Receiver._write (C:\Users\GG\Downloads\node_modules\ws\lib\receiver.js:78:10)
at writeOrBuffer (_stream_writable.js:352:12)
at Receiver.Writable.write (_stream_writable.js:303:10)
at Socket.socketOnData (C:\Users\GG\Downloads\node_modules\ws\lib\websocket.js:872:35)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:307:12)
at readableAddChunk (_stream_readable.js:282:9)
at Socket.Readable.push (_stream_readable.js:221:10) {
[Symbol(status-code)]: 1002
}
The Node.js ws client documentation says that the extension is only enabled if the server supports it and it is enabled, which means that the extension must be negotiated before it is used (which is done by sending a HTTP header in the response to the initial HTTP request).
Which suggests to me, even though the server does not support it, it sends a RSV1 even though it's not enabled and negotiated. Looking at the code, the protocol implementation seems flawed to me. I'll report back after more investigation and testing.
I'm currently in the works of making this library work with MKR1000 and WiFi101 and I'm testing this with a Node.js websocket client. However whenever I try to send a message from Node.js, the connection will fail with
Invalid WebSocket frame: RSV1 must be clear
, which indicates this library setsRSV1
to one, even though no extension was actually negated (websockets/ws#1140 (comment), https://tools.ietf.org/html/rfc6455#section-5.2).In my config.h I've uncommented the "debug macros"
And on the serial I can see the following getting printed (and that's all of it):
Node.js output:
Node.js client code:
I'm using a little more code for all my setup and peripheries, but this is a simplified version:
The text was updated successfully, but these errors were encountered: