Ben Posted January 21, 2021 Report Share Posted January 21, 2021 Hi i got this error: throw new Error("Cannot log onto steamcommunity.com without first being connected to Steam network"); it caused my bot to crash. But i didnt came on startup it came after the bot was already running for multiple minutes, so it was already logged in. Maybe it tried to log in again since the session was expired or some thing like that. I hope you can help me Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted January 22, 2021 Report Share Posted January 22, 2021 Are you calling webLogOn() anywhere in your own code? Quote Link to comment Share on other sites More sharing options...
Ben Posted January 24, 2021 Author Report Share Posted January 24, 2021 Yeah, when the sessions expires. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted January 25, 2021 Report Share Posted January 25, 2021 You're probably not checking whether your client is still connected to Steam. In that case, whenever Steam goes down (or you otherwise lose connection), your web session will expire, triggering sessionExpired, which will make your code call webLogOn, which will fail with the given error because your client is no longer connected. You should check whether client.steamID is not null to make sure you're still connected. k1ne 1 Quote Link to comment Share on other sites More sharing options...
Ben Posted January 25, 2021 Author Report Share Posted January 25, 2021 Ah okay thank you Quote Link to comment Share on other sites More sharing options...
k1ne Posted May 25, 2022 Report Share Posted May 25, 2022 (edited) On 1/25/2021 at 10:20 AM, Dr. McKay said: You're probably not checking whether your client is still connected to Steam. In that case, whenever Steam goes down (or you otherwise lose connection), your web session will expire, triggering sessionExpired, which will make your code call webLogOn, which will fail with the given error because your client is no longer connected. You should check whether client.steamID is not null to make sure you're still connected. hi, i got client.steamID is null. What can i do to relogin? call client.logOn(logOnOptions), Is it? Edited May 25, 2022 by k1ne Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 26, 2022 Report Share Posted May 26, 2022 On 5/25/2022 at 2:49 AM, k1ne said: hi, i got client.steamID is null. What can i do to relogin? call client.logOn(logOnOptions), Is it? Depends on why you're not connected. If you disconnected because Steam went down or you otherwise lost connection, SteamUser will automatically attempt to reconnect. Unless you messed with the autoRelogin option, the only situation where you'd need to call logOn again is if the error event got emitted. k1ne 1 Quote Link to comment Share on other sites More sharing options...
k1ne Posted May 27, 2022 Report Share Posted May 27, 2022 16 hours ago, Dr. McKay said: Depends on why you're not connected. If you disconnected because Steam went down or you otherwise lost connection, SteamUser will automatically attempt to reconnect. Unless you messed with the autoRelogin option, the only situation where you'd need to call logOn again is if the error event got emitted. thank you 😍 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.