Jump to content
McKay Development

Error : "Cannot log onto steamcommunity.com without first being connected to Steam network"


Ben

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 year later...
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 by k1ne
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 😍

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...