node-cr-proxy
node-cr-proxy copied to clipboard
Out of bounds error
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)
Was the proxy running for a very long time / a lot of messages? I think at some point the nonce is too big.
No, proxy was running for one-three minutes, there are not so many messages.
I think that solution is to add value = value % Int16Max.
Which line does that occur on?
@Batch-Monger, home/tarik02/work/programming/clashroyale/node-cr-proxy/lib/nonce.js:30:21