Jump to content
McKay Development

Cannot read property 'toString' of null


neverhood

Recommended Posts

Hello, I'm trying to keep my session alive with this code with interval 1 hour

	if (client.steamID) {
		client.webLogOn();
	} else {
		client.logOn(account);
	}

 

but in very rare case I'm getting crash (1 timer per 2-3 weeks, 24/7 running):

 

/root/project/node_modules/steam-user/components/messages.js:472
        if (steamID && sessionID && (sessionID != this._sessionID || steamID.toString() != this.steamID.toString())) {
                                                                                                        ^

TypeError: Cannot read property 'toString' of null
    at SteamUser._handleNetMessage (/root/project/node_modules/steam-user/components/messages.js:472:98)
    at SteamUser.processMulti (/root/project/node_modules/steam-user/components/messages.js:570:9)
    at Gunzip.cb (/root/project/node_modules/steam-user/components/messages.js:561:17)
    at Gunzip.zlibBufferOnEnd (zlib.js:150:10)
    at Gunzip.emit (events.js:317:22)
    at endReadableNT (_stream_readable.js:1215:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

 

newest library, newest nodejs, how can I handle it?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...