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] 刷新账户时 400 (Bad Request) #231

Open PRO-2684 opened 3 months ago

PRO-2684 commented 3 months ago

描述遇到的问题

Response status code does not indicate success: 400 (Bad Request).

复现问题的步骤

刷新微软账户

期望的表现

No response

环境

Windows 11 23H2 Launcher 2.2.8.0

附件

System.Net.Http.HttpRequestException
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Nrk.FluentCore.Authentication.MicrosoftAuthenticator.AuthMsaAsync(String parameterName, String code)
   at Nrk.FluentCore.Authentication.MicrosoftAuthenticator.RefreshAsync(MicrosoftAccount account, IProgress`1 progress)
   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.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
natsurainko commented 2 months ago

emmmm 现在这个问题还有存在吗 这个看起来是网络的问题

PRO-2684 commented 2 months ago

猜测是太久没登录导致过期,而 Fluent Launcher 没做这个异常处理。HMCL 里会提示重新登录,重新登录后就可以使用了,但是 Fluent Launcher 只报错。因为这是我唯一一个账号,所以也无法移除后重登。

natsurainko commented 1 month ago

259