arleypadua / PKHeX.Everywhere

Cross platform tools for interacting with Pokemon save files. The web version runs everywhere and the CLI works with Mac OS, Linux and Windows
https://pkhex-web.github.io
MIT License
36 stars 2 forks source link

Error on PKHeX.Web: JSON serialization is attempting to deserialize an unexpected byte array. #53

Closed arleypadua closed 3 months ago

arleypadua commented 3 months ago

Error on PKHeX.Web

Message

JSON serialization is attempting to deserialize an unexpected byte array.

Stack trace

   at Microsoft.JSInterop.Infrastructure.ByteArrayJsonConverter.Read(Utf8JsonReader& , Type , JsonSerializerOptions )
   at System.Text.Json.Serialization.JsonConverter`1[[System.Byte[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryRead(Utf8JsonReader& , Type , JsonSerializerOptions , ReadStack& , Byte[]& , Boolean& )
   at System.Text.Json.Serialization.JsonConverter`1[[System.Byte[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ReadCore(Utf8JsonReader& , JsonSerializerOptions , ReadStack& )
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1[[System.Byte[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Deserialize(Utf8JsonReader& , ReadStack& )
   at System.Text.Json.JsonSerializer.ReadFromSpan[Byte[]](ReadOnlySpan`1 , JsonTypeInfo`1 , Nullable`1 )
   at System.Text.Json.JsonSerializer.ReadFromSpan[Byte[]](ReadOnlySpan`1 , JsonTypeInfo`1 )
   at System.Text.Json.JsonSerializer.Deserialize[Byte[]](String , JsonSerializerOptions )
   at Microsoft.JSInterop.JSInProcessRuntime.Invoke[Byte[]](String , Int64 , Object[] )
   at Microsoft.JSInterop.JSInProcessRuntime.Invoke[Byte[]](String , Object[] )
   at PKHeX.Web.Services.JsService.Md5Hash(Byte[] toArray)
   at PKHeX.Web.Services.BlazorMd5Provider.HashData(ReadOnlySpan`1 source, Span`1 destination)
   at PKHeX.Core.SAV8BS.SetChecksums()
   at PKHeX.Core.SaveFile.GetFinalData()
   at PKHeX.Core.SAV8BS.GetFinalData()
   at PKHeX.Core.SaveFile.Write(BinaryExportSetting setting)
   at PKHeX.Facade.Game.ToByteArray()
   at PKHeX.Web.Services.GameService.Export()
   at PKHeX.Web.Components.LoadGameComponent.ExportSaveAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at AntDesign.Button.HandleOnClick(MouseEventArgs args)
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )

Cannot save brilliant diamond save file