node-cr-proxy icon indicating copy to clipboard operation
node-cr-proxy copied to clipboard

Out of bounds error

Open tarik02 opened this issue 8 years ago • 4 comments

I got error. Stack:

TypeError: "value" argument is out of bounds
    at checkInt (buffer.js:1039:11)
    at Buffer.writeInt16LE (buffer.js:1207:5)
    at Nonce.increment (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/nonce.js:30:21)
    at ServerCrypto.decrypt (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/crypto.js:67:31)
    at ServerCrypto.decryptPacket (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/server/crypto.js:43:38)
    at /home/tarik02/work/programming/clashroyale/node-cr-proxy/index.js:128:30
    at PacketReceiver.packetize (/home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/packetreceiver.js:29:21)
    at Socket.<anonymous> (/home/tarik02/work/programming/clashroyale/node-cr-proxy/index.js:118:34)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)

tarik02 avatar Apr 21 '17 18:04 tarik02

Was the proxy running for a very long time / a lot of messages? I think at some point the nonce is too big.

srabouin avatar Apr 21 '17 20:04 srabouin

No, proxy was running for one-three minutes, there are not so many messages. I think that solution is to add value = value % Int16Max.

tarik02 avatar Apr 22 '17 08:04 tarik02

Which line does that occur on?

ghost avatar Jun 18 '17 05:06 ghost

@Batch-Monger, home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/nonce.js:30:21

tarik02 avatar Jun 18 '17 08:06 tarik02