Another "Cannot read property 'setTimeout' of undefined" crash when Steam goes down
See original GitHub issueDescribe the bug
When Steam went down at midnight Aug 4 2020 another crash exception occurred in the connection.js
file similar to https://github.com/DoctorMcKay/node-steam-user/issues/274 - but instead of occurring in ChannelEncryptRequest
it happens in ChannelEncryptResult
.
Versions
What version of the module and what version of Node.js are you using? Node.js: v12.16.1 node-steam-user: 4.17.1
Screenshots and Error Logs
If applicable, add screenshots and error logs to help explain your problem.
From what I can see, Steam went down and the bots called logOn a few minutes earlier before crashing. I have a feeling I get these crashes because my bots are re-logging into Steam (this is with an interval and timeout however). Nonetheless this isn’t a great exception to have possible in the module.
2020-08-04T23:20:25.567Z [app.js] ERROR uncaughtException: Cannot read property 'setTimeout' of undefined
TypeError: Cannot read property 'setTimeout' of undefined
at SteamUser.<anonymous> (/app/node_modules/steam-user/components/connection.js:54:26)
at /app/node_modules/steam-user/components/classes/HandlerManager.js:37:12
at Array.forEach (<anonymous>)
at HandlerManager.emit (/app/node_modules/steam-user/components/classes/HandlerManager.js:36:12)
at SteamUser._handleMessage (/app/node_modules/steam-user/components/messages.js:569:24)
at SteamUser._handleNetMessage (/app/node_modules/steam-user/components/messages.js:504:7)
at TCPConnection._readMessage (/app/node_modules/steam-user/components/connection_protocols/tcp.js:193:12)
at Socket.emit (events.js:311:20)
at emitReadable_ (_stream_readable.js:562:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
I suppose the solution could again be the fix used before where it will not continue handling this message unless a socket is available. I’m going to continue trying to debug why this crash occurred, but if I don’t have any luck I’ll submit a PR with the same return logic as before.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Yep I was just about to comment this lol. Alternatively you could also disable auto relogging and implement it yourself if you’d prefer to do that (but node-steam-user has a really nice fallback system for relogging in place, so I’d recommend against).
I realize this is a very late response, but your assumptions are correct.