You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a small C# .NET 8 console application. When I call await steamClient.Login(), my IUserInterventionHandler does get called via Raise(IUserIntervention intervention). From here, I call GetAuthCode.Finish(string code). Everything seems fine. But the steamClient.Login() call never returns. It waits indefinitely.
Additional Context
Windows 11
.NET 8
Wabbajack Version
Wabbajack.Networking.Steam 3.5.0.2
Wabbajack.Services.OSIntegrated 3.0.6.2
Code
Here is the code that causes the problem. See my await steamClient.Login() call. (Please note that I set up the dependencies to reflect what I observed in the Downloader project at https://github.com/wabbajack-tools/ussedp/. If there is a more concise way to accomplish what I've set up with dependencies, I would like to know it. By the way, all I'm really trying to accomplish is downloading a full copy of Skyrim from Steam.)
Here is my program:
LoggerFactory loggerFactory = new LoggerFactory();
Logger<SteamTokenProvider> tokenProviderLogger = new Logger<SteamTokenProvider>(loggerFactory);
var services = new ServiceCollection();
services.AddDTOSerializer();
services.AddDTOConverters();
services.AddSteam();
services.AddSingleton<ILogger<Client>>(new Logger<Client>(loggerFactory));
services.AddSingleton<HttpClient>();
services.AddAllSingleton<ITokenProvider<SteamLoginState>, EncryptedJsonTokenProvider<SteamLoginState>, SteamTokenProvider>();
services.AddSingleton<IUserInterventionHandler>(new UserInterventionHandler());
services.AddSingleton<IResource<HttpClient>>(x => new Resource<HttpClient>("Web Requests", 16));
services.AddSingleton<ILogger<SteamTokenProvider>>(tokenProviderLogger);
ServiceProvider serviceProvider = services.BuildServiceProvider();
DTOSerializer dtoSerializer = serviceProvider.GetRequiredService<DTOSerializer>();
SteamTokenProvider tokenProvider = new SteamTokenProvider(tokenProviderLogger, dtoSerializer);
Client steamClient = serviceProvider.GetRequiredService<Client>();
string userName, password;
SteamUtility.PromptForCredentials(out userName, out password);
await tokenProvider.SetToken(new SteamLoginState
{
User = userName,
Password = password
}).ConfigureAwait(false);
try
{
await steamClient.Login().ConfigureAwait(false);//This waits indefinitely.
}
catch (SteamException)
{
Console.WriteLine("Your credentials were incorrect.");
}
Here is my IUserInterventionHandler:
internal class UserInterventionHandler : IUserInterventionHandler
{
public UserInterventionHandler() { }
public void Raise(IUserIntervention intervention)
{
GetAuthCode getAuthCode = (GetAuthCode)intervention;
Console.WriteLine("Please enter the Steam Guard code that has been emailed to you.");
string code = "";
while (code == "")
{
code = Console.ReadLine()!.Trim();
}
getAuthCode.Finish(code);
}
}
The text was updated successfully, but these errors were encountered:
Marked as stale due to no interactions in the last 90 days. If the issue still exists, please provide any possibly still needed information or excuse the devs for not getting around to addressing this issue yet. If this issue is still considered unsolved a dev will soon remove the stale tag from this issue.
Marked as stale due to no interactions in the last 90 days. If the issue still exists, please provide any possibly still needed information or excuse the devs for not getting around to addressing this issue yet. If this issue is still considered unsolved a dev will soon remove the stale tag from this issue.
I have written a small C# .NET 8 console application. When I call
await steamClient.Login()
, myIUserInterventionHandler
does get called viaRaise(IUserIntervention intervention)
. From here, I callGetAuthCode.Finish(string code)
. Everything seems fine. But thesteamClient.Login()
call never returns. It waits indefinitely.Additional Context
Windows 11
.NET 8
Wabbajack Version
Wabbajack.Networking.Steam 3.5.0.2
Wabbajack.Services.OSIntegrated 3.0.6.2
Code
Here is the code that causes the problem. See my
await steamClient.Login()
call. (Please note that I set up the dependencies to reflect what I observed in the Downloader project at https://github.com/wabbajack-tools/ussedp/. If there is a more concise way to accomplish what I've set up with dependencies, I would like to know it. By the way, all I'm really trying to accomplish is downloading a full copy of Skyrim from Steam.)Here is my program:
Here is my IUserInterventionHandler:
The text was updated successfully, but these errors were encountered: