DGP-Studio / Snap.Hutao

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

[Bug]: 背景图片官方启动器壁纸选项问题 #1688

Closed twjmy closed 5 months ago

twjmy commented 5 months ago

检查清单

Windows 版本

22631.3672

Snap Hutao 版本

1.10.2.0

设备 ID

4B6379FDA25D058C3FA50872BAB7D316

问题分类

用户界面

发生了什么?

背景图片选取官方启动器壁纸选项时,只有英文而没有其他选项,但实则有对应其他语言的背景美术图

你期望发生的行为?

显示与胡桃或官方启动器相匹配的语言,找出或供用户选取官方启动器背景图文件路径取用资源

最后一步

dgp-bot[bot] commented 5 months ago

device_id: 4B6379FDA25D058C3FA50872BAB7D316

Exception Data:
----------------------------------------
System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   at Snap.Hutao.Service.User.UserCollectionService.GetUserAndUidCollectionAsync() in D:\appveyor\project\Snap.Hutao.Project-tqhe3gyf3yfdt2ql\src\Snap.Hutao\Snap.Hutao\Service\User\UserCollectionService.cs:line 101
   at Snap.Hutao.Service.DailyNote.DailyNoteService.GetDailyNoteEntryCollectionAsync(Boolean forceRefresh, CancellationToken token) in D:\appveyor\project\Snap.Hutao.Project-tqhe3gyf3yfdt2ql\src\Snap.Hutao\Snap.Hutao\Service\DailyNote\DailyNoteService.cs:line 83
   at Snap.Hutao.ViewModel.DailyNote.DailyNoteViewModelSlim.OpenUIAsync() in D:\appveyor\project\Snap.Hutao.Project-tqhe3gyf3yfdt2ql\src\Snap.Hutao\Snap.Hutao\ViewModel\DailyNote\DailyNoteViewModelSlim.cs:line 35
   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.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   at Snap.Hutao.Service.User.UserCollectionService.GetUserAndUidCollectionAsync() in D:\appveyor\project\Snap.Hutao.Project-tqhe3gyf3yfdt2ql\src\Snap.Hutao\Snap.Hutao\Service\User\UserCollectionService.cs:line 101
   at Snap.Hutao.ViewModel.DailyNote.DailyNoteViewModel.InitializeUIAsync() in D:\appveyor\project\Snap.Hutao.Project-tqhe3gyf3yfdt2ql\src\Snap.Hutao\Snap.Hutao\ViewModel\DailyNote\DailyNoteViewModel.cs:line 59
   at Snap.Hutao.ViewModel.Abstraction.ViewModel.OpenUIAsync() in D:\appveyor\project\Snap.Hutao.Project-tqhe3gyf3yfdt2ql\src\Snap.Hutao\Snap.Hutao\ViewModel\Abstraction\ViewModel.cs:line 35
   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.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   at Snap.Hutao.Service.User.UserCollectionService.GetUserAndUidCollectionAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\Service\User\UserCollectionService.cs:line 101
   at Snap.Hutao.ViewModel.DailyNote.DailyNoteViewModel.InitializeUIAsync() in D:\appveyor\project\Snap.Hutao.Project-m2qnyjlfvcfi05e5\src\Snap.Hutao\Snap.Hutao\ViewModel\DailyNote\DailyNoteViewModel.cs:line 59
   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()
Lightczx commented 5 months ago

@Masterain98 FYI

Masterain98 commented 5 months ago

@Lightczx 原神官方背景的请求你是不是没有带 language 参数?

https://github.com/DGP-Studio/Generic-API/blob/3b1d83f2d8c30c61d41fe7b1c57e76d839557fb4/routers/wallpaper.py#L294-L315

Masterain98 commented 5 months ago

@twjmy 你是在中国内地使用的胡桃或者使用了中国内地的网络代理吗?

twjmy commented 5 months ago

@twjmy 你是在中国内地使用的胡桃或者使用了中国内地的网络代理吗?

我是在台湾玩国际服,没用代理,语言是繁中 补充:游戏本体是在谷歌载的

Masterain98 commented 5 months ago

@twjmy 你是在中国内地使用的胡桃或者使用了中国内地的网络代理吗?

我是在台湾玩国际服,没用代理,语言是繁中

麻烦在 PowerShell 中输入并执行 nslookup api.snapgenshin.com 并提供一下返回的数据

twjmy commented 5 months ago

@twjmy 你是在中国内地使用的胡桃或者使用了中国内地的网络代理吗?

我是在台湾玩国际服,没用代理,语言是繁中

麻烦在 PowerShell 中输入并执行 nslookup api.snapgenshin.com 并提供一下返回的数据

@Masterain98

PS C:\Users\VJ> nslookup api.snapgenshin.com
伺服器:  UnKnown
Address:  192.168.0.1

未經授權的回答:
名稱:    cl-glbd9c040d.gcdn.co
Addresses:  2a03:90c0:999c::12
          81.28.12.12
Aliases:  api.snapgenshin.com
Masterain98 commented 5 months ago

image

@Lightczx 客户端请求后端的时候没有添加 language 参数

twjmy commented 5 months ago

@Lightczx 客户端请求后端的时候没有添加 language 参数

会是这里吗

https://github.com/DGP-Studio/Snap.Hutao/blob/fd59b471cbea1d6bc177dc92a136ad4187b78a80/src/Snap.Hutao/Snap.Hutao/Web/HutaoEndpoints.cs#L281

Lightczx commented 5 months ago

@Masterain98 我加language code 还是 generic api 改成语言无关的?

Masterain98 commented 5 months ago

@Masterain98 我加language code 还是 generic api 改成语言无关的?

你加 language code 吧,无字版本单独列成 HYP 背景选项

dgp-bot[bot] commented 5 months ago

99b361331944c846a13b098ca48e1666e59302e8 已修复此问题

Masterain98 commented 5 months ago

image

热更新了一次,现在已经换成了无字的版本

dgp-bot[bot] commented 5 months ago

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

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