DGP-Studio / Snap.Hutao

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

[Bug]: 养成计划同步背包物品失败 #2232

Closed buhuishaujidexiaobai closed 4 days ago

buhuishaujidexiaobai commented 4 days ago

检查清单

Windows 版本

22631.4249

Snap Hutao 版本

1.12.3.0

设备 ID

F15F6BD80BDBB312E74A494EA63A5419

问题分类

养成计算

发生了什么?

同步背包物品失败,显示武器不存在。Image Image

你期望发生的行为?

修复该功能使其正常运作。

最后一步

dgp-bot[bot] commented 4 days ago

device_id: F15F6BD80BDBB312E74A494EA63A5419

Exception Data:
----------------------------------------
Snap.Hutao.Web.Request.Builder.HttpContentSerializationException: The (de-)serialization failed because of an arbitrary error. This most likely happened, 
because an inner serializer failed to (de-)serialize the given data. 
See the inner exception for details (if available).
 ---> System.InvalidOperationException: This operation cannot be performed on a default instance of ImmutableArray<T>.  Consider initializing the array, or checking the ImmutableArray<T>.IsDefault property.
   at System.Collections.Immutable.ImmutableArray`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.ListOfTConverter`2.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Serialize(Utf8JsonWriter writer, T& rootValue, Object rootValueBoxed)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsObject(Utf8JsonWriter writer, Object rootValue)
   at System.Text.Json.JsonSerializer.WriteBytesAsObject(Object value, JsonTypeInfo jsonTypeInfo)
   at Snap.Hutao.Web.Request.Builder.JsonHttpContentSerializer.SerializeUtf8(Object content, Type contentType) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonHttpContentSerializer.cs:line 61
   at Snap.Hutao.Web.Request.Builder.JsonHttpContentSerializer.SerializeCore(Object content, Type contentType, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonHttpContentSerializer.cs:line 43
   at Snap.Hutao.Web.Request.Builder.HttpContentSerializer.Serialize(Object content, Type contentType, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentSerializer.cs:line 26
   --- End of inner exception stack trace ---
   at Snap.Hutao.Web.Request.Builder.HttpContentSerializer.Serialize(Object content, Type contentType, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentSerializer.cs:line 30
   at Snap.Hutao.Web.Request.Builder.HttpContentSerializerExtension.Serialize[T](IHttpContentSerializer serializer, T content, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentSerializerExtension.cs:line 15
   at Snap.Hutao.Web.Request.Builder.HttpContentBuilderExtension.SetContent[TBuilder,TContent](TBuilder builder, IHttpContentSerializer serializer, TContent content, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentBuilderExtension.cs:line 79
   at Snap.Hutao.Web.Request.Builder.JsonBuilderExtension.SetJsonContent[TBuilder,TContent](TBuilder builder, TContent content, Encoding encoding, JsonHttpContentSerializer serializer) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonBuilderExtension.cs:line 14
   at Snap.Hutao.Web.Request.Builder.JsonBuilderExtension.PostJson[TBuilder,TContent](TBuilder builder, TContent content, Encoding encoding, JsonHttpContentSerializer serializer) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonBuilderExtension.cs:line 26
   at Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.CalculateClient.BatchComputeAsync(UserAndUid userAndUid, List`1 deltas, Boolean syncInventory, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Hoyolab\Takumi\Event\Calculate\CalculateClient.cs:line 41
   at Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.CalculateClient.BatchComputeAsync(UserAndUid userAndUid, AvatarPromotionDelta delta, Boolean syncInventory, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Hoyolab\Takumi\Event\Calculate\CalculateClient.cs:line 27
   at Snap.Hutao.ViewModel.Wiki.WikiWeaponViewModel.CultivateAsync(Weapon weapon) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\ViewModel\Wiki\WikiWeaponViewModel.cs:line 162
   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:
----------------------------------------
Snap.Hutao.Web.Request.Builder.HttpContentSerializationException: The (de-)serialization failed because of an arbitrary error. This most likely happened, 
because an inner serializer failed to (de-)serialize the given data. 
See the inner exception for details (if available).
 ---> System.InvalidOperationException: This operation cannot be performed on a default instance of ImmutableArray<T>.  Consider initializing the array, or checking the ImmutableArray<T>.IsDefault property.
   at System.Collections.Immutable.ImmutableArray`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.ListOfTConverter`2.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Serialize(Utf8JsonWriter writer, T& rootValue, Object rootValueBoxed)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsObject(Utf8JsonWriter writer, Object rootValue)
   at System.Text.Json.JsonSerializer.WriteBytesAsObject(Object value, JsonTypeInfo jsonTypeInfo)
   at Snap.Hutao.Web.Request.Builder.JsonHttpContentSerializer.SerializeUtf8(Object content, Type contentType) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonHttpContentSerializer.cs:line 61
   at Snap.Hutao.Web.Request.Builder.JsonHttpContentSerializer.SerializeCore(Object content, Type contentType, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonHttpContentSerializer.cs:line 43
   at Snap.Hutao.Web.Request.Builder.HttpContentSerializer.Serialize(Object content, Type contentType, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentSerializer.cs:line 26
   --- End of inner exception stack trace ---
   at Snap.Hutao.Web.Request.Builder.HttpContentSerializer.Serialize(Object content, Type contentType, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentSerializer.cs:line 30
   at Snap.Hutao.Web.Request.Builder.HttpContentSerializerExtension.Serialize[T](IHttpContentSerializer serializer, T content, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentSerializerExtension.cs:line 15
   at Snap.Hutao.Web.Request.Builder.HttpContentBuilderExtension.SetContent[TBuilder,TContent](TBuilder builder, IHttpContentSerializer serializer, TContent content, Encoding encoding) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\HttpContentBuilderExtension.cs:line 79
   at Snap.Hutao.Web.Request.Builder.JsonBuilderExtension.SetJsonContent[TBuilder,TContent](TBuilder builder, TContent content, Encoding encoding, JsonHttpContentSerializer serializer) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonBuilderExtension.cs:line 14
   at Snap.Hutao.Web.Request.Builder.JsonBuilderExtension.PostJson[TBuilder,TContent](TBuilder builder, TContent content, Encoding encoding, JsonHttpContentSerializer serializer) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Request\Builder\JsonBuilderExtension.cs:line 26
   at Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.CalculateClient.BatchComputeAsync(UserAndUid userAndUid, List`1 deltas, Boolean syncInventory, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Hoyolab\Takumi\Event\Calculate\CalculateClient.cs:line 41
   at Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.CalculateClient.BatchComputeAsync(UserAndUid userAndUid, AvatarPromotionDelta delta, Boolean syncInventory, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\Web\Hoyolab\Takumi\Event\Calculate\CalculateClient.cs:line 27
   at Snap.Hutao.ViewModel.Wiki.WikiWeaponViewModel.CultivateAsync(Weapon weapon) in C:\Users\Public\appveyor\Snap.Hutao-0vfibuvt4r4cnpja\src\Snap.Hutao\Snap.Hutao\ViewModel\Wiki\WikiWeaponViewModel.cs:line 162
   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.IO.IOException: The process cannot access the file 'C:\Users\小白\AppData\Local\Packages\60568DGPStudio.SnapHutao_wbnnev551gwxy\LocalCache\ImageCache\426072DB8749E1364F0EB467317A8177A02867FB' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.OpenRead(String path)
   at Snap.Hutao.Service.BackgroundImage.BackgroundImageService.GetNextBackgroundImageAsync(BackgroundImage previous, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-9ccf084dxwbrv3ml\src\Snap.Hutao\Snap.Hutao\Service\BackgroundImage\BackgroundImageService.cs:line 49
   at Snap.Hutao.ViewModel.MainViewModel.UpdateBackgroundCoreAsync(Boolean forceRefresh) in C:\Users\Public\appveyor\Snap.Hutao-9ccf084dxwbrv3ml\src\Snap.Hutao\Snap.Hutao\ViewModel\MainViewModel.cs:line 68
   at Snap.Hutao.ViewModel.MainViewModel.UpdateBackgroundAsync() in C:\Users\Public\appveyor\Snap.Hutao-9ccf084dxwbrv3ml\src\Snap.Hutao\Snap.Hutao\ViewModel\MainViewModel.cs:line 57
   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()
github-actions[bot] commented 4 days ago

Probable Similar Topics

  1. 67% #833
  2. 50% #2212
  3. 50% #2044
  4. 50% #344
qhy040404 commented 4 days ago

Duplicate of #2212