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

SteamPrefill fails to log in with an invalid credential error, even though the credentials are correct #380

Closed
Kreeblah opened this issue Sep 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Kreeblah
Copy link

Describe the bug
When I attempt to log into my Steam account using my correct credentials, the following happens:

A Steam account is required in order to prefill apps!
Please enter your Steam account name : myusername
Please enter your Steam password. (Password won't be saved) : ****************************************
[1:33:02 PM] Connected to Steam!
[1:33:02 PM] Requesting new access token...
[1:33:03 PM] Disconnected from Steam!
SteamKit2.Authentication.AuthenticationException: Authentication failed with 
result InvalidPassword.
  at async Task<CredentialsAuthSession>                                         
     SteamKit2.Authentication.SteamAuthentication.                              
     BeginAuthSessionViaCredentialsAsync(AuthSessionDetails details)            
  at async Task SteamPrefill.Handlers.Steam.Steam3Session.GetAccessTokenAsync() 
  at void                                                                       
     SteamPrefill.Handlers.Steam.Steam3Session.<>c__DisplayClass16_0.<<LoginToSt
     eamAsync>b__0>d.MoveNext()                                                 
  at void Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.     
     MoveNext() in Status.cs:79                                                 
  at void Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.   
     MoveNext() in Status.cs:120                                                
  at void Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d. 
     MoveNext() in Progress.cs:133                                              
  at async Task<T> Spectre.Console.Internal.DefaultExclusivityMode.RunAsync<T>( 
     Func<Task<T>> func) in DefaultExclusivityMode.cs:40                        
  at async Task<T> Spectre.Console.Progress.StartAsync<T>(Func<ProgressContext, 
     Task<T>> action) in Progress.cs:116                                        
  at async Task<T> Spectre.Console.Status.StartAsync<T>(string status,          
     Func<StatusContext, Task<T>> func) in Status.cs:117                        
  at async Task Spectre.Console.Status.StartAsync(string status,                
     Func<StatusContext, Task> action) in Status.cs:77                          
  at async Task SteamPrefill.Handlers.Steam.Steam3Session.LoginToSteamAsync()   
  at async Task SteamPrefill.SteamManager.InitializeAsync()                     
  at async ValueTask SteamPrefill.CliCommands.SelectAppsCommand.ExecuteAsync(   
     IConsole console)                                                          
  at async ValueTask<int> CliFx.CliApplication.RunAsync(ApplicationSchema       
     applicationSchema, CommandInput commandInput) in CliApplication.cs:148     
  at async ValueTask<int> CliFx.CliApplication.RunAsync(IReadOnlyList<string>   
     commandLineArguments, IReadOnlyDictionary<string, string>                  
     environmentVariables) in CliApplication.cs:190                             
  at async ValueTask<int> CliFx.CliApplication.RunAsync(IReadOnlyList<string>   
     commandLineArguments) in CliApplication.cs:202                             
  at async Task<int> SteamPrefill.Program.Main()                                

Additional Details
This is on macOS using version 2.7.0. I use a password manager for my passwords, so I'm copying/pasting my password to make sure there aren't any typos. The same credentials work for logging into https://store.steampowered.com and the Steam client.

The username I have is an e-mail address (from back when that was required for a Steam username), and the password is up to 100 characters, inclusive of one or more of each of the following: lowercase English letters, uppercase English letters, digits, and the non-alphanumeric characters [email protected]_*

Screenshots
If applicable, add screenshots to help explain your problem.

Logs

[1:45:43 PM] Starting login!
[1:45:54 PM] Connecting with CellId: 0
[1:45:55 PM] Connected to Steam!
[1:45:55 PM] Requesting new access token...
[1:45:56 PM] Disconnected from Steam!
[1:45:56 PM] SteamKit2.Authentication.AuthenticationException: Authentication failed with result InvalidPassword.
   at SteamKit2.Authentication.SteamAuthentication.BeginAuthSessionViaCredentialsAsync(AuthSessionDetails details)
   at SteamPrefill.Handlers.Steam.Steam3Session.GetAccessTokenAsync()
   at SteamPrefill.Handlers.Steam.Steam3Session.<>c__DisplayClass16_0.<<LoginToSteamAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.MoveNext() in Spectre.Console\Live\Status\Status.cs:line 79
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in Spectre.Console\Live\Status\Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in Spectre.Console\Live\Progress\Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync(Func`1 func) in Spectre.Console\Internal\DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync(Func`2 action) in Spectre.Console\Live\Progress\Progress.cs:line 116
   at Spectre.Console.Status.StartAsync(String status, Func`2 func) in Spectre.Console\Live\Status\Status.cs:line 117
   at Spectre.Console.Status.StartAsync(String status, Func`2 action) in Spectre.Console\Live\Status\Status.cs:line 77
   at SteamPrefill.Handlers.Steam.Steam3Session.LoginToSteamAsync()
   at SteamPrefill.SteamManager.InitializeAsync()
   at SteamPrefill.CliCommands.SelectAppsCommand.ExecuteAsync(IConsole console)
   at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in C:\Users\Tim\Dropbox\Programming\Lancache-Prefills\External\CliFx\CliFx\CliApplication.cs:line 148
   at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in C:\Users\Tim\Dropbox\Programming\Lancache-Prefills\External\CliFx\CliFx\CliApplication.cs:line 190
   at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments) in C:\Users\Tim\Dropbox\Programming\Lancache-Prefills\External\CliFx\CliFx\CliApplication.cs:line 202
   at SteamPrefill.Program.Main()
@tpill90
Copy link
Owner

tpill90 commented Dec 15, 2024

I just tested this by changing my secondary account to have a 110 character password, and yeah the same issue happens to me. I'll have to dig deeper into this, but at least I can reproduce it.

@tpill90
Copy link
Owner

tpill90 commented Dec 16, 2024

@Kreeblah Looks like Valve silently truncates longer passwords to the first 64 characters. I've tried logging in with just the first 64 of my 110 character password and it will login successfully. Found this relevant discussion: ArchiSteamFarm issues/2903.

I'll have to add the same truncation logic to my login method.

@tpill90 tpill90 added the pending release Fix has been merged, needs to be published label Dec 20, 2024
@tpill90 tpill90 removed the pending release Fix has been merged, needs to be published label Dec 20, 2024
@tpill90
Copy link
Owner

tpill90 commented Dec 20, 2024

Released in v3.1.0

@tpill90 tpill90 closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants