Xcube-Studio / Natsurainko.FluentLauncher

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

[Bug] 刷新账户时 400 (Bad Request) #231

Closed PRO-2684 closed 2 months ago

PRO-2684 commented 5 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 5 months ago

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

PRO-2684 commented 5 months ago

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

natsurainko commented 4 months ago

259