I am trying to display a panel from BlazorFluentUI but when clicked on IconButton on the header component. I keep getting this error and couldn't track back to what's causing this error or how I may solve it.
Here's the Error Message as is on Developer Console
Uncaught (in promise) Error: Microsoft.JSInterop.JSException: An exception occurred executing JS interop: The JSON value could not be converted to System.Double. Path: $ | LineNumber: 0 | BytePositionInLine: 4.. See InnerException for more details.
---> System.Text.Json.JsonException: The JSON value could not be converted to System.Double. Path: $ | LineNumber: 0 | BytePositionInLine: 4.
---> System.InvalidOperationException: Cannot get the value of a token type 'Null' as a number.
at System.Text.Json.Utf8JsonReader.TryGetDouble(Double& value)
at System.Text.Json.Utf8JsonReader.GetDouble()
at System.Text.Json.Serialization.Converters.DoubleConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1[[System.Double, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, Double& value)
at System.Text.Json.Serialization.JsonConverter`1[[System.Double, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=456asdfadf765fr]].ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
at System.Text.Json.Serialization.JsonConverter`1[[System.Double, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=456asdfadf765fr]].ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.JsonConverter`1[[System.Double, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=456asdfadf765fr]].ReadCoreAsObject(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore[Object](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadValueCore[Object](JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.Deserialize(Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options)
at Microsoft.JSInterop.JSRuntime.EndInvokeJS(Int64 taskId, Boolean succeeded, Utf8JsonReader& jsonReader)
--- End of inner exception stack trace ---
at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__15`1[[System.Double, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at BlazorFluentUI.Panel.UpdateFooterPositionAsync()
at Object.endInvokeDotNetFromJS (https://localhost:5001/_framework/blazor.webassembly.js:1:4191)
at Object.invokeJSFromDotNet (https://localhost:5001/_framework/blazor.webassembly.js:1:3797)
at Object.w [as invokeJSFromDotNet] (https://localhost:5001/_framework/blazor.webassembly.js:1:64301)
at _mono_wasm_invoke_js_blazor (https://localhost:5001/_framework/dotnet.5.0.5.js:1:190800)
at do_icall (<anonymous>:wasm-function[10596]:0x194e4e)
at do_icall_wrapper (<anonymous>:wasm-function[3305]:0x79df9)
at interp_exec_method (<anonymous>:wasm-function[2155]:0x44ad3)
at interp_runtime_invoke (<anonymous>:wasm-function[7862]:0x12efff)
at mono_jit_runtime_invoke (<anonymous>:wasm-function[7347]:0x118e5f)
at do_runtime_invoke (<anonymous>:wasm-function[3304]:0x79d42)
UPDATE: I updated this question and remove the code attached because it was too much to understand what's happening. And from what I see, it's a very less number of developers using BlazorFluentUI, I guess.
I have created a demo repo to reproduce the error, you may find it here. Github Repo