Xcube-Studio / Natsurainko.FluentLauncher

Natsurainko.FluentLauncher A Minecraft launcher designed for Windows 11
https://fluentlauncher.natsurainko.work/
MIT License
279 stars 15 forks source link

[Bug] Account not refreshing #227

Closed rhuda21 closed 2 months ago

rhuda21 commented 4 months ago

Describe the bug

When trying to refresh a Ely.by account after successful initial login shows a 404 unauthorized error. This also happens when trying to load a Minecraft game

Steps to reproduce the bug

Logging in with yggdrasil account with server url - https://account.ely.by/api/authlib-injector then clicking refresh

Expected behavior

I expected the token to be refreshed for the account

Environment

Windows Build Number: 26100.1 (Windows 11 Pro Insider) Fluent Launcher version: 2.2.8.0

Attachment

Log File from Error:

System.Net.Http.HttpRequestException System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Nrk.FluentCore.Authentication.YggdrasilAuthenticator.ParseResponseAsync(HttpResponseMessage responseMessage) at Nrk.FluentCore.Authentication.YggdrasilAuthenticator.RefreshAsync(YggdrasilAccount account) at Natsurainko.FluentLauncher.Services.Accounts.AccountService.RefreshAccount(Account account) at Natsurainko.FluentLauncher.Services.Accounts.AccountService.RefreshActiveAccount() at Natsurainko.FluentLauncher.ViewModels.Settings.AccountViewModel.Refresh() at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.b128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b0()

gaviny82 commented 4 months ago

Also reproduced in v2.2.7.0 (before refactoring auth APIs) @natsurainko

natsurainko commented 2 months ago

Same as #232