MoneroOcean / meta-miner

Allows to add algo switching support to *any* stratum miner. Zero fees.
GNU General Public License v3.0
124 stars 61 forks source link

mm.js crashes with TypeError Cannot use 'in' operator to search for 'status' in null #48

Open darknicht66 opened 2 years ago

darknicht66 commented 2 years ago

mm.js v4.4 will occasionally crash with the following error message...

Feb 14 00:13:09 xps8300 mm.js[737]: /home/user/gitrepo/meta-miner/mm.js:652
Feb 14 00:13:09 xps8300 mm.js[737]:         if ("result" in grin_json && "status" in grin_json.result && grin_json.result.status === "OK") {
Feb 14 00:13:09 xps8300 mm.js[737]:                                               ^
Feb 14 00:13:09 xps8300 mm.js[737]: TypeError: Cannot use 'in' operator to search for 'status' in null
Feb 14 00:13:09 xps8300 mm.js[737]:     at pool_new_msg (/home/user/gitrepo/meta-miner/mm.js:652:47)
Feb 14 00:13:09 xps8300 mm.js[737]:     at Socket.<anonymous> (/home/user/gitrepo/meta-miner/mm.js:534:11)
Feb 14 00:13:09 xps8300 mm.js[737]:     at Socket.emit (events.js:198:13)
Feb 14 00:13:09 xps8300 mm.js[737]:     at addChunk (_stream_readable.js:288:12)
Feb 14 00:13:09 xps8300 mm.js[737]:     at readableAddChunk (_stream_readable.js:269:11)
Feb 14 00:13:09 xps8300 mm.js[737]:     at Socket.Readable.push (_stream_readable.js:224:10)
Feb 14 00:13:09 xps8300 mm.js[737]:     at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

It seems to happen once every day or two. I haven't determined if it only happens on certain algorithms. In this most recent case, it was running c29b