Hi there,
I'm trying to learn to use this library through the samples and when I try to step back/forward with the timeline tool, an error is being thrown:
Uncaught (in promise) Error: System.NotSupportedException: Deserialization of interface types is not supported. Type 'Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot'. Path: $.searchResults[0] | LineNumber: 0 | BytePositionInLine: 215. ---> System.NotSupportedException: Deserialization of interface types is not supported. Type 'Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot'. --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ThrowNotSupportedException(ReadStack& state, Utf8JsonReader& reader, NotSupportedException ex) at System.Text.Json.ThrowHelper.ThrowNotSupportedException_DeserializeNoConstructor(Type type, Utf8JsonReader& reader, ReadStack& state) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter
1[[Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, IItinerarySnapshot& value)
at System.Text.Json.Serialization.JsonConverter1[[Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, IItinerarySnapshot& value) at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter
2[[Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot[], Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, IItinerarySnapshot[]& value)
at System.Text.Json.Serialization.JsonConverter1[[Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot[], Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, IItinerarySnapshot[]& value) at System.Text.Json.JsonPropertyInfo
1[[Skclusive.Blazor.FlightFinder.Models.IItinerarySnapshot[], Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1[[Skclusive.Blazor.FlightFinder.Models.AppStateSnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, AppStateSnapshot& value) at System.Text.Json.Serialization.JsonConverter
1[[Skclusive.Blazor.FlightFinder.Models.AppStateSnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, AppStateSnapshot& value)
at System.Text.Json.Serialization.JsonConverter1[[Skclusive.Blazor.FlightFinder.Models.AppStateSnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[AppStateSnapshot](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[AppStateSnapshot](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[AppStateSnapshot](String json, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[AppStateSnapshot](String json, JsonSerializerOptions options) at Skclusive.Script.DevTools.Redux.ReduxTool
2[[Skclusive.Script.DevTools.StateTree.StateTreeToolAction, Skclusive.Script.DevTools, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null],[Skclusive.Blazor.FlightFinder.Models.AppStateSnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].Deserialize[AppStateSnapshot](String json)
at Skclusive.Script.DevTools.Redux.ReduxTool2[[Skclusive.Script.DevTools.StateTree.StateTreeToolAction, Skclusive.Script.DevTools, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null],[Skclusive.Blazor.FlightFinder.Models.AppStateSnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].HandleMessage(String json) at Skclusive.Script.DevTools.Redux.ReduxTool
2[[Skclusive.Script.DevTools.StateTree.StateTreeToolAction, Skclusive.Script.DevTools, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null],[Skclusive.Blazor.FlightFinder.Models.AppStateSnapshot, Skclusive.Blazor.FlightFinder.State, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnMessageAsync(String json)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of stack trace from previous location ---
at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.InvokeSynchronously(JSRuntime jsRuntime, DotNetInvocationInfo& callInfo, IDotNetObjectReference objectReference, String argsJson)
at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(JSRuntime jsRuntime, DotNetInvocationInfo invocationInfo, String argsJson)
at Object.endInvokeDotNetFromJS (https://localhost:44327/_framework/blazor.webassembly.js:1:4191)
at Object.invokeJSFromDotNet (https://localhost:44327/_framework/blazor.webassembly.js:1:3797)
at Object.w [as invokeJSFromDotNet] (https://localhost:44327/_framework/blazor.webassembly.js:1:63898)
at _mono_wasm_invoke_js_blazor (https://localhost:44327/_framework/dotnet.5.0.0-rc.2.20475.5.js:1:190396)
at do_icall (:wasm-function[10593]:0x194db2)
at do_icall_wrapper (:wasm-function[3305]:0x79dee)
at interp_exec_method (:wasm-function[2155]:0x44ac8)
at interp_runtime_invoke (:wasm-function[7859]:0x12ef59)
at mono_jit_runtime_invoke (:wasm-function[7344]:0x118db9)
at do_runtime_invoke (:wasm-function[3304]:0x79d37)
`
I'm using the latest versions of VS Preview (16.8.0 Preview 6.0), .Net 5 Rc2. Also just got latest from Skclusive samples.
I get this error on the Flightfinder project, in both the WASM and server-hosted versions. To reproduce, all I have to do is click the backward arrow to step back 1 state (I can also drag the handle, which does the same).
State does seem to change, despite the error, but it does not accurately change to the expected state, so something is going wrong. e.g. If I add some flights and then 'rewind' and then go back to the present, the flights are not added.
I have made no changes to the solution, so this seems to be present in the latest code.