Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoming Transfers crashes after about 30-45 calls #1

Closed
ghost opened this issue Apr 30, 2016 · 3 comments
Closed

Incoming Transfers crashes after about 30-45 calls #1

ghost opened this issue Apr 30, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 30, 2016

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)

@PsychicCat
Copy link
Owner

Thanks for the details - I will look into this tomorrow.

@PsychicCat
Copy link
Owner

@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.

@ghost
Copy link
Author

ghost commented Apr 30, 2016

@PsychicCat : Thanks for the quick fix! The library is quite useful.

sneurlax pushed a commit that referenced this issue Mar 20, 2018
Update to upstream master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant