Jump to content


There is a callback for webLogOn()

node.js node-steam-user

  • Please log in to reply
2 replies to this topic

#1 Andrei Elvis

Andrei Elvis


  • Member
  • PipPip
  • 12 posts

Posted 16 March 2018 - 08:09 AM



I've saw that there's an error when the bot tries to reconnect after a session expires

[ERROR] default - Error: Cannot log onto steamcommunity.com without first being connected to Steam network
    at SteamUser.webLogOn (/var/www/node_modules/steam-user/components/web.js:9:9)
    at SteamCommunity.<anonymous> (/var/www/socket/main.js:1453:29)
    at emitOne (events.js:96:13)
    at SteamCommunity.emit (events.js:188:7)
    at SteamCommunity._notifySessionExpired (/var/www/node_modules/steamcommunity/components/http.js:85:7)
    at /var/www/node_modules/steamcommunity/components/confirmations.js:21:10
    at /var/www/node_modules/steamcommunity/components/confirmations.js:272:4
    at SteamCommunity._checkHttpError (/var/www/node_modules/steamcommunity/components/http.js:90:3)
    at Request._callback (/var/www/node_modules/steamcommunity/components/http.js:50:61)
    at self.callback (/var/www/node_modules/request/request.js:186:22)

And I want to know if there's a callback, so when an error comes in to just 


Can I do like:

client.webLogOn(function(err) {
    if(err) return;

Or something like this?

Please help me.


#2 Dr. McKay

Dr. McKay


  • Administrator
  • 2,162 posts

Posted 16 March 2018 - 01:49 PM

No, you need to not call webLogOn if you aren't connected.

#3 Royalgamer06


    Advanced Member

  • Member
  • PipPipPip
  • 94 posts

Posted 08 May 2018 - 08:41 PM

callback for webLogOn? How about:

client.once(`webSession`, () => {
// Now you should be able to do all your steamcommunity related stuff safely

Edited by Royalgamer06, 08 May 2018 - 09:10 PM.

Also tagged with one or more of these keywords: node.js, node-steam-user

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users