trzyrazyzero Posted May 18, 2016 Report Share Posted May 18, 2016 Hi, sometimes this happens: Offer #1248497400 changed: CreatedNeedsConfirmation -> Active /home/nodebots/node_modules/steam-user/components/web.js:9 if (this.steamID.type === SteamID.Type.ANON_USER) { ^ TypeError: Cannot read property 'type' of null at SteamUser.webLogOn (/home/nodebots/node_modules/steam-user/components/web.js:9:18) at tryOnTimeout (timers.js:224:11) at Timer.listOnTimeout (timers.js:198:5) Whats wrong? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 18, 2016 Report Share Posted May 18, 2016 You're calling webLogOn while you aren't logged onto Steam. Quote Link to comment Share on other sites More sharing options...
trzyrazyzero Posted May 18, 2016 Author Report Share Posted May 18, 2016 I calling it when event sessionExpired is emitted so whats wrong? bots['community'].on('sessionExpired', function() { bots['client'].webLogOn(); }); Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 18, 2016 Report Share Posted May 18, 2016 You got disconnected from Steam, and that's why the session expired. Quote Link to comment Share on other sites More sharing options...
trzyrazyzero Posted May 18, 2016 Author Report Share Posted May 18, 2016 So when event sessionExpired is emitted i should use logOn method or what? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 18, 2016 Report Share Posted May 18, 2016 It depends on why you were disconnected. If the error event was emitted then it was an unrecoverable disconnection and you need to reconnect yourself. If the disconnected event was emitted instead, then steam-user will automatically reconnect. Basically, you just shouldn't webLogOn if you aren't currently connected. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.