DGP-Studio / Snap.Hutao

实用的开源多功能原神工具箱 🧰 / Multifunctional Open-source Genshin Impact Toolkit 🧰
https://hut.ao
MIT License
4.09k stars 192 forks source link

[Bug]: 注册表登陆记录莫名消失 #1535

Closed CoRinoo closed 7 months ago

CoRinoo commented 7 months ago

检查清单

Windows 版本

22621.3296

Snap Hutao 版本

1.9.9.0

设备 ID

5881CAD4417FA0CE7F54485F1BC3C8A2

问题分类

游戏启动器

发生了什么?

存储于注册表的账号在登录时莫名消失,无法正常登录,在进入游戏界面弹出空白登录框。 且该问题已发生两次,发生时均有以下共同特征: 1、发生于1.9.9.0更新后,第一次甚至发生于我将工具箱刚更新至1.9.9.0最新版后。 2、发生时间均在凌晨时间 3、发生时我的电脑均连接着我的手机热点 4、我均在登录别人的账号,根据我与账号所有人的沟通。据悉, 第一次时,他在我登陆他的帐号前并未登录他自己的账号; 第二次时,他在我登陆他的帐号前曾上线过一次,即在我上一次登录他的账号到问题发生这次,我登陆他账号的时间区间段内。

对于该问题我做过重启软件,更新网络状态(即重连网络) 在提交issue前我曾想过是否是因为热点连接导致网络不稳定致使登陆失败。但是在1.9.8.0版本时,我在相同的手机热点连接下从未出现过相关的情况。所以我更倾向于认为这一问题是在更新后出现的特殊病症。 debug控制台在登陆时显示如下: 图像_2024-04-04_235910761 我不知道图片是否可以正常展示,所以在下面复制了相关信息: Snap.Hutao. Service. Game.Launching.LaunchExecutionContext[0]info:Handler LaunchExecutionGameProcessExitHandler end execution

你期望发生的行为?

希望相关开发人员可以发现问题所在。 如果不是bug,而是单纯的网络波动导致,我之后会尽量调整登陆时间,并优化网络环境。毕竟目前看来就我一个人出现这样的问题,在我看来也算是比较严峻的了。 如果是在更新后确实出现的问题,希望这个问题能尽快解决。 因为据我目前已知的情况,一个账号记录出问题,注册表上所有的账号都会出现登陆失效的问题。

最后一步

dgp-bot[bot] commented 7 months ago

@CoRinoo 请通过编辑功能设置一个合适的标题

dgp-bot[bot] commented 7 months ago

device_id: 5881CAD4417FA0CE7F54485F1BC3C8A2

Exception Data:
----------------------------------------
System.Net.Http.HttpRequestException: Response status code does not indicate success: 429 (Too Many Requests).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Snap.Hutao.Core.IO.Http.Sharding.HttpShardCopyWorker`1.<>c__DisplayClass11_0.<<CopyAsync>g__CopyShardAsync|1>d.MoveNext() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Core\IO\Http\Sharding\HttpShardCopyWorker.cs:line 79
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Snap.Hutao.Service.Update.UpdateService.DownloadUpdatePackageAsync(HutaoVersionInformation versionInformation, String filePath, IProgress`1 progress, CancellationToken token) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\Update\UpdateService.cs:line 139
   at Snap.Hutao.Service.Update.UpdateService.CheckForUpdateAndDownloadAsync(IProgress`1 progress, CancellationToken token) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\Update\UpdateService.cs:line 70
   at Snap.Hutao.ViewModel.TitleViewModel.DoCheckUpdateAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\ViewModel\TitleViewModel.cs:line 64
   at Snap.Hutao.ViewModel.TitleViewModel.InitializeUIAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\ViewModel\TitleViewModel.cs:line 57
   at Snap.Hutao.ViewModel.Abstraction.ViewModel.OpenUIAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\ViewModel\Abstraction\ViewModel.cs:line 32
   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()
Exception Data:
----------------------------------------
System.Net.Http.HttpRequestException: Response status code does not indicate success: 429 (Too Many Requests).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Snap.Hutao.Core.IO.Http.Sharding.HttpShardCopyWorker`1.<>c__DisplayClass11_0.<<CopyAsync>g__CopyShardAsync|1>d.MoveNext() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Core\IO\Http\Sharding\HttpShardCopyWorker.cs:line 79
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Snap.Hutao.Service.Update.UpdateService.DownloadUpdatePackageAsync(HutaoVersionInformation versionInformation, String filePath, IProgress`1 progress, CancellationToken token) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\Update\UpdateService.cs:line 139
   at Snap.Hutao.Service.Update.UpdateService.CheckForUpdateAndDownloadAsync(IProgress`1 progress, CancellationToken token) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\Update\UpdateService.cs:line 70
   at Snap.Hutao.ViewModel.TitleViewModel.DoCheckUpdateAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\ViewModel\TitleViewModel.cs:line 64
   at Snap.Hutao.ViewModel.TitleViewModel.InitializeUIAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\ViewModel\TitleViewModel.cs:line 57
   at Snap.Hutao.ViewModel.Abstraction.ViewModel.OpenUIAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\ViewModel\Abstraction\ViewModel.cs:line 32
   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()
Exception Data:
----------------------------------------
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'UNIQUE constraint failed: users.InnerId'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Snap.Hutao.Core.Database.DbSetExtension.SaveChangesAndClearChangeTrackerAsync[TEntity](DbSet`1 dbSet) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Core\Database\DbSetExtension.cs:line 143
   at Snap.Hutao.Service.User.UserDbService.AddUserAsync(User user) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\User\UserDbService.cs:line 48
   at Snap.Hutao.Service.User.UserCollectionService.TryCreateAndAddUserFromInputCookieAsync(InputCookie inputCookie) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\User\UserCollectionService.cs:line 183
   at Snap.Hutao.Service.User.UserService.ProcessInputCookieAsync(InputCookie inputCookie) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\User\UserService.cs:line 76
   at Snap.Hutao.View.Page.ISupportLoginByWebView.PostHandleCurrentCookieAsync(IServiceProvider serviceProvider, InputCookie inputCookie) in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\View\Page\ISupportLoginByWebView.cs:line 34
   at Snap.Hutao.View.Page.LoginMihoyoUserPage.HandleCurrentCookieAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\View\Page\LoginMihoyoUserPage.xaml.cs:line 78
   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()
dgp-bot[bot] commented 7 months ago

标题已经修改

qhy040404 commented 7 months ago

https://hut.ao/zh/features/game-launcher.html#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%B8%B8%E6%88%8F%E7%99%BB%E5%BD%95%E7%8A%B6%E6%80%81%E4%BC%9A%E5%A4%B1%E6%95%88-%E5%AF%BC%E8%87%B4%E5%88%87%E6%8D%A2%E8%B4%A6%E5%8F%B7%E5%8A%9F%E8%83%BD%E6%97%A0%E6%95%88

qhy040404 commented 7 months ago

注册表保存的账号登录信息与你的设备网络环境、设备参数是绑定的,与他人顶号无关。根据你的情况,我更倾向于你的网络环境不稳定。按照我的理解来说,注册表和城市是绑定的。如果你刚好刚从一个城市到了另一个城市,或者住在城市边界,那就可以解释通了。你使用的手机热点在连接基站时可能连接到了隔壁市的基站,不排除这个可能性。

CoRinoo commented 7 months ago

@qhy040404 谢谢,我明白您的意思了

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topic.