Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to save Steam session key. Steam account will not stay logged in #272

Closed
DevURnd opened this issue Mar 13, 2023 · 10 comments
Closed

Comments

@DevURnd
Copy link

DevURnd commented Mar 13, 2023

Hi,

Trying to run a prefill and I get the following error:

$ ./SteamPrefill prefill --debug
[1:09:35 PM] Starting login!
A Steam account is required in order to prefill apps!
Please enter your Steam account name : 
Please enter your Steam password. (Password won't be saved) : ************
SteamKitDebug - ServerList: Resolving server list
SteamKitDebug - ServerList: Server list provider had no entries, will query SteamDirectory
SteamKitDebug - ServerList: Resolved 200 servers
SteamKitDebug - ServerList: Next server candidate: 162.254.196.67:27017 (Tcp)
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/TcpConnection: Connecting to 162.254.196.67:27017...
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/TcpConnection: Connected to 162.254.196.67:27017
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/EnvelopeEncryptedConnection: Got encryption request. Universe: Public Protocol ver: 1
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/EnvelopeEncryptedConnection: Encryption result: OK
2FA required for login.  Please enter your Steam Guard code from your authenticator app : SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/TcpConnection: Socket exception occurred while reading packet: System.IO.IOException: Connection lost while reading packet header.
 ---> System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.BinaryReader.InternalRead(Int32 )
   at System.IO.BinaryReader.ReadUInt32()
   at SteamKit2.TcpConnection.ReadPacket()
   --- End of inner exception stack trace ---
   at SteamKit2.TcpConnection.ReadPacket()
   at SteamKit2.TcpConnection.NetLoop()

SteamKitDebug - ServerList: Next server candidate: 162.254.196.84:27017 (Tcp)
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/TcpConnection: Connecting to 162.254.196.84:27017...
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/TcpConnection: Connected to 162.254.196.84:27017
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/EnvelopeEncryptedConnection: Got encryption request. Universe: Public Protocol ver: 1
SteamKitDebug - 3ad58eb5483b441482209f12a1ae0e9e/EnvelopeEncryptedConnection: Encryption result: OK
[1:10:23 PM] Logged into Steam
[1:10:33 PM] Failed to save Steam session key.  Steam account will not stay logged in...
[1:10:33 PM] Steam session initialization complete!

[1:10:35 PM] Prefill complete!
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Prefilled 65 apps in 01:00.26

   Updated │ Up To Date
  ━━━━━━━━━┿━━━━━━━━━━━━
      0    │     65

[1:10:35 PM] Disconnected from Steam!

after that session finishes, trying again produces:

$ ./SteamPrefill prefill --debug
[1:28:57 PM] Starting login!
System.NullReferenceException: Object reference not set to an instance of an object.
  at async Task SteamPrefill.Handlers.Steam.Steam3Session.ConfigureLoginDetailsAsync()
  at async Task SteamPrefill.Handlers.Steam.Steam3Session.LoginToSteamAsync()
  at async Task SteamPrefill.SteamManager.InitializeAsync()
  at async ValueTask SteamPrefill.CliCommands.PrefillCommand.ExecuteAsync(IConsole console)
[1:28:57 PM] Already disconnected from Steam

This is with:

$ ./SteamPrefill --version
v1.9.1

Removing the "Config/account.config" file allows me to run a prefill, but doesn't save the session key.
I have manually nuked all sessions in the Steam Guard a few days ago when this first appeared.

@supra89t
Copy link

I have the same exact issue, same version. I'm running it on Unraid.

@Missanthrope85
Copy link

Missanthrope85 commented Mar 15, 2023

I am having the same issue. Also on Unraid.😮‍💨

@tpill90
Copy link
Owner

tpill90 commented Mar 16, 2023

Looks like this is not isolated to just SteamPrefill, ArchiSteamFarm is running into the same issue as well:
JustArchiNET/ArchiSteamFarm#2840

Possibly related to : SteamRE/SteamKit#1129

@Kirbo
Copy link

Kirbo commented Mar 16, 2023

The same issue seems to be also at since version 1.8.4, perhaps even earlier?

@tpill90
Copy link
Owner

tpill90 commented Mar 20, 2023

This issue is due to Steam changing how they handle authentication going forward, they will no longer issue or accept "login keys".

I've played around with the changes in SteamKit2 that will handle the auth change, and have the most basic of scenarios logging in correctly. Even though its working, I'd rather take the time and make sure that I understand the changes 100%, and to make sure I don't introduce any new bugs with these changes. So stay tuned.

@Hornochs
Copy link

@tpill90 is already a beta out? We're hosting our LAN-Party starting tomorrow and would need some prefill 🥲

@tpill90
Copy link
Owner

tpill90 commented Mar 23, 2023

No beta build yet, however there is a workaround.

The current workaround is to delete the account.config located in the Config directory in between runs. You'll still have to enter your credentials again every time, however you will still be able to run the prefill with your currently selected apps.

@tpill90
Copy link
Owner

tpill90 commented Mar 28, 2023

Fix has been released in v2.0.0

@tpill90 tpill90 closed this as completed Mar 28, 2023
@Missanthrope85
Copy link

Thank you 😊

@DevURnd
Copy link
Author

DevURnd commented Mar 29, 2023

Working as expected, thank you for getting the fix pushed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants