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
node:events:356
throw er; // Unhandled 'error' event
^
RangeError: Invalid WebSocket frame: invalid status code 9
at Receiver.controlMessage (/home/can/nrg_ws/MR_ws/robofleet/robofleet_server/node_modules/ws/lib/receiver.js:463:18)
at Receiver.getData (/home/can/nrg_ws/MR_ws/robofleet/robofleet_server/node_modules/ws/lib/receiver.js:349:42)
at Receiver.startLoop (/home/can/nrg_ws/MR_ws/robofleet/robofleet_server/node_modules/ws/lib/receiver.js:142:22)
at Receiver._write (/home/can/nrg_ws/MR_ws/robofleet/robofleet_server/node_modules/ws/lib/receiver.js:77:10)
at writeOrBuffer (node:internal/streams/writable:400:12)
at _write (node:internal/streams/writable:341:10)
at Receiver.Writable.write (node:internal/streams/writable:345:10)
at Socket.socketOnData (/home/can/nrg_ws/MR_ws/robofleet/robofleet_server/node_modules/ws/lib/websocket.js:875:35)
at Socket.emit (node:events:379:20)
at addChunk (node:internal/streams/readable:313:12)
Emitted 'error' event on WebSocket instance at:
at Receiver.receiverOnError (/home/can/nrg_ws/MR_ws/robofleet/robofleet_server/node_modules/ws/lib/websocket.js:780:13)
at Receiver.emit (node:events:379:20)
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:81:21) {
[Symbol(status-code)]: 1002
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
Discovered this while trying to close the socket. If the status code sent is invalid the server crashes. Node.js version is 15.7.0.
This closed issue: websockets/ws#1777 suggests there needs to be a listener for the 'error' event:
Error message:
The text was updated successfully, but these errors were encountered: