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
I am using this on a 100 second timer (code is here: https://github.com/ShenNoether/MiniNodo/blob/master/MiniNodo.js#L40 ), and it frequently crashes at between 30-100 function calls of the incoming transfers function. I am not sure if this is an an error in my code, or whether it stems from the library. Error output:
SyntaxError: Unexpected end of input
at Object.parse (native)
at IncomingMessage. (/home/user/MiniNodo/node_modules/monero-nodejs/lib/wallet.js:33:33)
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at IncomingMessage.Readable.push (_stream_readable.js:110:10)
at HTTPParser.parserOnBody (_http_common.js:109:22)
at Socket.socketOnData (_http_client.js:311:20)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
The text was updated successfully, but these errors were encountered:
@ShenNoether my mistake. The response was being sent before the entire data stream was received from simplewallet. Most of the time it would still work, but if there was a lot of data being sent or the response time slow, it would try parsing incomplete JSON resulting in this crash. Fixed in version 3.2.0.
I am using this on a 100 second timer (code is here: https://github.com/ShenNoether/MiniNodo/blob/master/MiniNodo.js#L40 ), and it frequently crashes at between 30-100 function calls of the incoming transfers function. I am not sure if this is an an error in my code, or whether it stems from the library. Error output:
undefined:663
"tx_hash": "<770e99dd1d13731ca7cca8ab8aa2716f740a58c817d712
SyntaxError: Unexpected end of input
at Object.parse (native)
at IncomingMessage. (/home/user/MiniNodo/node_modules/monero-nodejs/lib/wallet.js:33:33)
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at IncomingMessage.Readable.push (_stream_readable.js:110:10)
at HTTPParser.parserOnBody (_http_common.js:109:22)
at Socket.socketOnData (_http_client.js:311:20)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
The text was updated successfully, but these errors were encountered: