samki Posted July 27, 2017 Report Posted July 27, 2017 I have a problem restoring cookies after a Bot looses its webSession.I call SteamUser.webLogOn but don't get an webSession callback at all.Currently I have 3 Bots running parallel on the same host. After about 1-2 days (sometimes even 7 days!) one of the three won't get a webSession ever again. The other 2 still run great and webSession fires normally for them.I setup a cronJob which refreshes the Login and calls webLogOn every hour and I also call it on sessionExpired.I logged the client error output but it won't throw any error. Code: https://pastebin.com/jYaDE45x Log: 26-07-2017 21:23:05: STEAMBOT Steam session expired: xx - Error: Not Logged In 26-07-2017 21:23:05: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 1385.8219997882843s ago 26-07-2017 21:23:05: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false 27-07-2017 00:00:00: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 9414.178000211716s ago 27-07-2017 00:00:00: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false 27-07-2017 03:00:00: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 10799.992999792099s ago 27-07-2017 03:00:00: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false 27-07-2017 06:00:00: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 10800.00100016594s ago 27-07-2017 06:00:00: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false Quote
mrxbell Posted July 30, 2017 Report Posted July 30, 2017 I think you wrong this : if (this._client.steamID !== null) { ...} i'm not sure but i think you can try with this._community.on("sessionExpired", function(err) { this._client.webLogOn(); } Quote
samki Posted July 30, 2017 Author Report Posted July 30, 2017 I think you wrong this : if (this._client.steamID !== null) { ...} i'm not sure but i think you can try with this._community.on("sessionExpired", function(err) { this._client.webLogOn(); }That's what I'm doing in refreshLogin()... I check if steamUser is still connected and calling webLogOn.. I just don't get a Session after that... if (this._client.steamID !== null) { console.log('STEAMBOT calling webLogOn - ' + this._steamid + ' - ' + this._user + ' isLoggedIn=' + this._isLoggedIn); this._client.webLogOn(); } Quote
samki Posted November 30, 2017 Author Report Posted November 30, 2017 I still have that issue.. I need to restart my Script after a while because the bots stop to relog after a day or two...I get Steam session expired - Error: Not Logged In, then I'm calling webLogOn but don't get a webSession... Quote
Vanilla Posted November 30, 2017 Report Posted November 30, 2017 (edited) I check if steamUser is still connected and calling webLogOn.. I just don't get a Session after that... if (this._client.steamID !== null) { console.log('STEAMBOT calling webLogOn - ' + this._steamid + ' - ' + this._user + ' isLoggedIn=' + this._isLoggedIn); this._client.webLogOn(); } use this? if (err) { console.log('STEAMBOT calling webLogOn - ' + this._steamid + ' - ' + this._user + ' isLoggedIn=' + this._isLoggedIn); this._client.webLogOn(); } Edited November 30, 2017 by Vanilla Quote
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.