DGP-Studio / Snap.Hutao

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

启动时无法启用bettergi #1467

Closed d2913406181 closed 8 months ago

d2913406181 commented 8 months ago

检查清单

Windows 版本

22621.3235

Snap Hutao 版本

1.9.7.0

设备 ID

32215090327E0A24696C5B150985F066

问题分类

游戏启动器

发生了什么?

image 提示如上图,概率性发生,通常第二次又可以正常启动

你期望发生的行为?

No response

最后一步

dgp-bot[bot] commented 8 months ago

device_id: 32215090327E0A24696C5B150985F066

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-gqlgajyq8rir7ot7\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-gqlgajyq8rir7ot7\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-gqlgajyq8rir7ot7\src\Snap.Hutao\Snap.Hutao\Service\User\UserCollectionService.cs:line 184
   at Snap.Hutao.Service.User.UserService.ProcessInputCookieAsync(InputCookie inputCookie) in D:\appveyor\project\Snap.Hutao.Project-gqlgajyq8rir7ot7\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-gqlgajyq8rir7ot7\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-gqlgajyq8rir7ot7\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()
Masterain98 commented 8 months ago

用管理员模式启动胡桃能不能避免该情况?

dgp-bot[bot] commented 8 months ago

包含解决该问题的程序版本 1.9.9 已发布。

github-actions[bot] commented 7 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.