ws: RangeError: out of range index crashing server

RangeError: out of range index
    at RangeError (native)
    at fastCopy (/Users/jmcnally/projects/nextlot-projects/nextlot-webcast-rtc/node_modules/ws/lib/Receiver.js:317:24)
    at Receiver.add (/Users/jmcnally/projects/nextlot-projects/nextlot-webcast-rtc/node_modules/ws/lib/Receiver.js:78:3)
    at Socket.firstHandler (/Users/jmcnally/projects/nextlot-projects/nextlot-webcast-rtc/node_modules/ws/lib/WebSocket.js:663:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:177:18)
    at Socket.Readable.push (_stream_readable.js:135:10)
    at TCP.onread (net.js:542:20)

Not really sure what this means or how to fix, or where the problem is actually.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 18
  • Comments: 29 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I use nvm to manage the node versions

upgrading to 1.1.1 resolved this issue for me.

I will agree that i am on 6.3.0, when i got the error with the < 1.0 ws.

My work around was to shrinkwrap and force update ws which otherwise seemed backwards compatible with the code depending on it.