Update the ws library on the Realtime servers


We’re having issues with the Realtime servers occasionally crashing with this error:

RangeError: Invalid WebSocket frame: invalid payload length 126
    at Receiver.getInfo (/local/game/node_modules/ws/lib/receiver.js:207:16)
    at Receiver.startLoop (/local/game/node_modules/ws/lib/receiver.js:121:22)
    at Receiver._write (/local/game/node_modules/ws/lib/receiver.js:69:10)
    at doWrite (_stream_writable.js:410:12)
    at writeOrBuffer (_stream_writable.js:394:5)
    at Receiver.Writable.write (_stream_writable.js:294:11)
    at Socket.socketOnData (/local/game/node_modules/ws/lib/websocket.js:816:35)
    at Socket.emit (events.js:189:13)
    at addChunk (_stream_readable.js:284:12)
    at readableAddChunk (_stream_readable.js:265:11)

It looks like the gamescale-lightweight-server has version 6.1.2 of the WebSocket ws node library installed. The latest version, 7.2.3 has a bugfix that might help us (https://github.com/websockets/ws/releases):

WebSocket#{p{i,o}ng,close}() now thow an error if the data to send is too
large to fit in a control frame (e54f08d).

Any chance the for an update of ws@6.1.2 to ws@7.2.3 for the gamescale-lightweight-server?

Thanks for the bug report. I will let the GameLift service team know.

Do you have any data/metrics wrt how many times you’ve encountered this? Do you have a workaround for the issue? Such data will help the service team prioritize. Thanks.