node-steam-user
node-steam-user copied to clipboard
TypeError: Cannot read property 'type' of null
Occurs sometimes when re-connecting to Steam, after a client disconnection.
/home/admin/steam-bot/node_modules/steam-user/components/logon.js:427
if (this.steamID.type == SteamID.Type.INDIVIDUAL) {
^
TypeError: Cannot read property 'type' of null
at SteamUser.<anonymous> (/home/admin/steam-bot/node_modules/steam-user/components/logon.js:427:21)
at /home/admin/steam-bot/node_modules/steam-user/components/classes/HandlerManager.js:37:12
at Array.forEach (<anonymous>)
at HandlerManager.emit (/home/admin/steam-bot/node_modules/steam-user/components/classes/HandlerManager.js:36:12)
at SteamUser._handleMessage (/home/admin/steam-bot/node_modules/steam-user/components/messages.js:571:24)
at SteamUser._handleNetMessage (/home/admin/steam-bot/node_modules/steam-user/components/messages.js:506:7)
at SteamUser.processMulti (/home/admin/steam-bot/node_modules/steam-user/components/messages.js:598:9)
at Gunzip.cb (/home/admin/steam-bot/node_modules/steam-user/components/messages.js:589:17)
at Gunzip.zlibBufferOnEnd (zlib.js:152:10)
at Gunzip.emit (events.js:315:20)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Versions
Node: v14.16.0 Module: [email protected]
Additional Information
Related to #269
I really don't see how this is possible, unless maybe your own code is changing the value of steamID
in the loggedOn event handler? Ever since 4.13.1, there's been a check to make sure this.steamID
is set just a few lines above. There would be no concurrency issues either.
I've not changing the value of steamID
anywhere during the code execution. But it's true only happens while network issues appears... so I'm unsure about the root cause of the problem. And,.. yeah i check the related code and saw the check as well that's why I didn't understand why the error was thrown if it is technically impossible at that point that steamID
haven't been defined... Should be something, somewhere.
Will try to add more traces if the problem happens again.
Haven't seen this in a while... no changes from my side tho.