Skip to content

Semi-random JsonException thrown from EndInvokeJS #38962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GerkinDev opened this issue Dec 11, 2021 · 12 comments · Fixed by #39060
Closed

Semi-random JsonException thrown from EndInvokeJS #38962

GerkinDev opened this issue Dec 11, 2021 · 12 comments · Fixed by #39060
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed
Milestone

Comments

@GerkinDev
Copy link

GerkinDev commented Dec 11, 2021

Describe the bug

In some random cases, Blazor JSInterop throws JsonExceptions. I didn't find a way to create a minimal reproduction, since this appears to be a timing issue which is super hard to reproduce. Moreover, it happens at different points on my versions of Chrome & Firefox, and changes (pass on one page previously failing, & fail on page previously passing) depending on Task.Delay()s.
So, yeah, a repro gonna be hard. Yet, I think I could give you access to my full app where the error occurs.

This is probably a continuation of #34267


So I've tweaked around, cloned aspnetcore entierly & built it locally to test some little things. And I've managed to track it down to this:

My error was thrown here:

if (!reader.Read() || reader.TokenType != JsonTokenType.EndArray)
{
throw new JsonException("Invalid JSON");
}

I've found out that an entire JSON object was still pending for read in the JsonReader.

So I've digged deeper to here:

internal void EndInvokeJS(long taskId, bool succeeded, ref Utf8JsonReader jsonReader)
{
if (!_pendingTasks.TryRemove(taskId, out var tcs))
{
// We should simply return if we can't find an id for the invocation.
// This likely means that the method that initiated the call defined a timeout and stopped waiting.
return;
}

So, if the invocation timed out (or whatever, but yet, the task is not there anymore), the stream is let as-is, untouched, with data pending.

I've managed to reliably fix my issue by adding jsonReader.Skip() before here:

I don't know if it makes sense. I don't have a repro, but at least, you might have more clue about the underlying problem.

To Reproduce

Exceptions (if any)

dotnet.6.0.0.iveziqpht8.js:1 Uncaught (in promise) Error: System.Text.Json.JsonException: Invalid JSON
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.EndInvokeJS(JSRuntime jsRuntime, String arguments) in F:\Work\cs\aspnetcore\src\JSInterop\Microsoft.JSInterop\src\Infrastructure\DotNetDispatcher.cs:line 313
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.<>c.<EndInvokeJS>b__7_0(String argsJson)
   at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyCallQueue.Schedule[String](String state, Action`1 callback)
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.EndInvokeJS(String argsJson)
    at Object._convert_exception_for_method_call (dotnet.6.0.0.iveziqpht8.js:1)
    at Object._handle_exception_for_call (dotnet.6.0.0.iveziqpht8.js:1)
    at managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS (managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:17)
    at Object.endInvokeJSFromDotNet (blazor.webassembly.js:1)
    at blazor.webassembly.js:1
blazor.webassembly.js:1 
window.Module.s.printErr @ blazor.webassembly.js:1
put_char @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
doWritev @ dotnet.6.0.0.iveziqpht8.js:1
_fd_write @ dotnet.6.0.0.iveziqpht8.js:1
$func5840 @ 00945abe:0x14830e
$func3598 @ 00945abe:0xba938
$func205 @ 00945abe:0x7351
$func2574 @ 00945abe:0x7e545
$func8617 @ 00945abe:0x1b6c57
$func517 @ 00945abe:0x12740
$func4079 @ 00945abe:0xdc5a1
$func2151 @ 00945abe:0x5ca12
$func4231 @ 00945abe:0xe4a21
$func4232 @ 00945abe:0xe5172
$func124 @ 00945abe:0x5802
$func2307 @ 00945abe:0x6e5d7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$func6537 @ 00945abe:0x166a21
$Hb @ 00945abe:0x176082
Module._mono_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
pump_message @ dotnet.6.0.0.iveziqpht8.js:1
setTimeout (async)
_schedule_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
$func1289 @ 00945abe:0x2f8dc
$func6721 @ 00945abe:0x16c00e
$func2588 @ 00945abe:0x806c2
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed_BINDINGS_SetTaskSourceResult @ managed_BINDINGS_SetTaskSourceResult:17
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
Promise.then (async)
_wrap_js_thenable_as_task @ dotnet.6.0.0.iveziqpht8.js:1
_js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
Te._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
_call_method_with_converted_args @ dotnet.6.0.0.iveziqpht8.js:1
call_method @ dotnet.6.0.0.iveziqpht8.js:1
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
call_assembly_entry_point @ dotnet.6.0.0.iveziqpht8.js:1
callEntryPoint @ blazor.webassembly.js:1
St @ blazor.webassembly.js:1
await in St (async)
(anonymous) @ app.js:48
blazor.webassembly.js:1 Unhandled Exception:
window.Module.s.printErr @ blazor.webassembly.js:1
put_char @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
doWritev @ dotnet.6.0.0.iveziqpht8.js:1
_fd_write @ dotnet.6.0.0.iveziqpht8.js:1
$func5840 @ 00945abe:0x14830e
$func3598 @ 00945abe:0xba938
$func205 @ 00945abe:0x7351
$func2574 @ 00945abe:0x7e545
$func8617 @ 00945abe:0x1b6c57
$func517 @ 00945abe:0x12740
$func4079 @ 00945abe:0xdc5a1
$func2151 @ 00945abe:0x5ca12
$func4231 @ 00945abe:0xe4a21
$func4232 @ 00945abe:0xe5172
$func124 @ 00945abe:0x5802
$func2307 @ 00945abe:0x6e5d7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$func6537 @ 00945abe:0x166a21
$Hb @ 00945abe:0x176082
Module._mono_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
pump_message @ dotnet.6.0.0.iveziqpht8.js:1
setTimeout (async)
_schedule_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
$func1289 @ 00945abe:0x2f8dc
$func6721 @ 00945abe:0x16c00e
$func2588 @ 00945abe:0x806c2
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed_BINDINGS_SetTaskSourceResult @ managed_BINDINGS_SetTaskSourceResult:17
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
Promise.then (async)
_wrap_js_thenable_as_task @ dotnet.6.0.0.iveziqpht8.js:1
_js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
Te._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
_call_method_with_converted_args @ dotnet.6.0.0.iveziqpht8.js:1
call_method @ dotnet.6.0.0.iveziqpht8.js:1
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
call_assembly_entry_point @ dotnet.6.0.0.iveziqpht8.js:1
callEntryPoint @ blazor.webassembly.js:1
St @ blazor.webassembly.js:1
await in St (async)
(anonymous) @ app.js:48
blazor.webassembly.js:1 System.Text.Json.JsonException: Invalid JSON
window.Module.s.printErr @ blazor.webassembly.js:1
put_char @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
doWritev @ dotnet.6.0.0.iveziqpht8.js:1
_fd_write @ dotnet.6.0.0.iveziqpht8.js:1
$func5840 @ 00945abe:0x14830e
$func3598 @ 00945abe:0xba938
$func205 @ 00945abe:0x7351
$func2574 @ 00945abe:0x7e545
$func8617 @ 00945abe:0x1b6c57
$func517 @ 00945abe:0x12740
$func4079 @ 00945abe:0xdc5a1
$func2151 @ 00945abe:0x5ca12
$func4231 @ 00945abe:0xe4a21
$func4232 @ 00945abe:0xe5172
$func124 @ 00945abe:0x5802
$func2307 @ 00945abe:0x6e5d7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$func6537 @ 00945abe:0x166a21
$Hb @ 00945abe:0x176082
Module._mono_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
pump_message @ dotnet.6.0.0.iveziqpht8.js:1
setTimeout (async)
_schedule_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
$func1289 @ 00945abe:0x2f8dc
$func6721 @ 00945abe:0x16c00e
$func2588 @ 00945abe:0x806c2
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed_BINDINGS_SetTaskSourceResult @ managed_BINDINGS_SetTaskSourceResult:17
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
Promise.then (async)
_wrap_js_thenable_as_task @ dotnet.6.0.0.iveziqpht8.js:1
_js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
Te._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
_call_method_with_converted_args @ dotnet.6.0.0.iveziqpht8.js:1
call_method @ dotnet.6.0.0.iveziqpht8.js:1
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
call_assembly_entry_point @ dotnet.6.0.0.iveziqpht8.js:1
callEntryPoint @ blazor.webassembly.js:1
St @ blazor.webassembly.js:1
await in St (async)
(anonymous) @ app.js:48
blazor.webassembly.js:1    at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.EndInvokeJS(JSRuntime jsRuntime, String arguments) in F:\Work\cs\aspnetcore\src\JSInterop\Microsoft.JSInterop\src\Infrastructure\DotNetDispatcher.cs:line 313
window.Module.s.printErr @ blazor.webassembly.js:1
put_char @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
doWritev @ dotnet.6.0.0.iveziqpht8.js:1
_fd_write @ dotnet.6.0.0.iveziqpht8.js:1
$func5840 @ 00945abe:0x14830e
$func3598 @ 00945abe:0xba938
$func205 @ 00945abe:0x7351
$func2574 @ 00945abe:0x7e545
$func8617 @ 00945abe:0x1b6c57
$func517 @ 00945abe:0x12740
$func4079 @ 00945abe:0xdc5a1
$func2151 @ 00945abe:0x5ca12
$func4231 @ 00945abe:0xe4a21
$func4232 @ 00945abe:0xe5172
$func124 @ 00945abe:0x5802
$func2307 @ 00945abe:0x6e5d7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$func6537 @ 00945abe:0x166a21
$Hb @ 00945abe:0x176082
Module._mono_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
pump_message @ dotnet.6.0.0.iveziqpht8.js:1
setTimeout (async)
_schedule_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
$func1289 @ 00945abe:0x2f8dc
$func6721 @ 00945abe:0x16c00e
$func2588 @ 00945abe:0x806c2
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed_BINDINGS_SetTaskSourceResult @ managed_BINDINGS_SetTaskSourceResult:17
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
Promise.then (async)
_wrap_js_thenable_as_task @ dotnet.6.0.0.iveziqpht8.js:1
_js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
Te._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
_call_method_with_converted_args @ dotnet.6.0.0.iveziqpht8.js:1
call_method @ dotnet.6.0.0.iveziqpht8.js:1
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
call_assembly_entry_point @ dotnet.6.0.0.iveziqpht8.js:1
callEntryPoint @ blazor.webassembly.js:1
St @ blazor.webassembly.js:1
await in St (async)
(anonymous) @ app.js:48
blazor.webassembly.js:1    at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.<>c.<EndInvokeJS>b__7_0(String argsJson)
window.Module.s.printErr @ blazor.webassembly.js:1
put_char @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
doWritev @ dotnet.6.0.0.iveziqpht8.js:1
_fd_write @ dotnet.6.0.0.iveziqpht8.js:1
$func5840 @ 00945abe:0x14830e
$func3598 @ 00945abe:0xba938
$func205 @ 00945abe:0x7351
$func2574 @ 00945abe:0x7e545
$func8617 @ 00945abe:0x1b6c57
$func517 @ 00945abe:0x12740
$func4079 @ 00945abe:0xdc5a1
$func2151 @ 00945abe:0x5ca12
$func4231 @ 00945abe:0xe4a21
$func4232 @ 00945abe:0xe5172
$func124 @ 00945abe:0x5802
$func2307 @ 00945abe:0x6e5d7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$func6537 @ 00945abe:0x166a21
$Hb @ 00945abe:0x176082
Module._mono_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
pump_message @ dotnet.6.0.0.iveziqpht8.js:1
setTimeout (async)
_schedule_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
$func1289 @ 00945abe:0x2f8dc
$func6721 @ 00945abe:0x16c00e
$func2588 @ 00945abe:0x806c2
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed_BINDINGS_SetTaskSourceResult @ managed_BINDINGS_SetTaskSourceResult:17
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
Promise.then (async)
_wrap_js_thenable_as_task @ dotnet.6.0.0.iveziqpht8.js:1
_js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
Te._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
_call_method_with_converted_args @ dotnet.6.0.0.iveziqpht8.js:1
call_method @ dotnet.6.0.0.iveziqpht8.js:1
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
call_assembly_entry_point @ dotnet.6.0.0.iveziqpht8.js:1
callEntryPoint @ blazor.webassembly.js:1
St @ blazor.webassembly.js:1
await in St (async)
(anonymous) @ app.js:48
blazor.webassembly.js:1    at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyCallQueue.Schedule[String](String state, Action`1 callback)
window.Module.s.printErr @ blazor.webassembly.js:1
put_char @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
doWritev @ dotnet.6.0.0.iveziqpht8.js:1
_fd_write @ dotnet.6.0.0.iveziqpht8.js:1
$func5840 @ 00945abe:0x14830e
$func3598 @ 00945abe:0xba938
$func205 @ 00945abe:0x7351
$func2574 @ 00945abe:0x7e545
$func8617 @ 00945abe:0x1b6c57
$func517 @ 00945abe:0x12740
$func4079 @ 00945abe:0xdc5a1
$func2151 @ 00945abe:0x5ca12
$func4231 @ 00945abe:0xe4a21
$func4232 @ 00945abe:0xe5172
$func124 @ 00945abe:0x5802
$func2307 @ 00945abe:0x6e5d7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$func6537 @ 00945abe:0x166a21
$Hb @ 00945abe:0x176082
Module._mono_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
pump_message @ dotnet.6.0.0.iveziqpht8.js:1
setTimeout (async)
_schedule_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
$func1289 @ 00945abe:0x2f8dc
$func6721 @ 00945abe:0x16c00e
$func2588 @ 00945abe:0x806c2
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed_BINDINGS_SetTaskSourceResult @ managed_BINDINGS_SetTaskSourceResult:17
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
Promise.then (async)
_wrap_js_thenable_as_task @ dotnet.6.0.0.iveziqpht8.js:1
_js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
Te._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
_call_method_with_converted_args @ dotnet.6.0.0.iveziqpht8.js:1
call_method @ dotnet.6.0.0.iveziqpht8.js:1
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
call_assembly_entry_point @ dotnet.6.0.0.iveziqpht8.js:1
callEntryPoint @ blazor.webassembly.js:1
St @ blazor.webassembly.js:1
await in St (async)
(anonymous) @ app.js:48
blazor.webassembly.js:1    at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.EndInvokeJS(String argsJson)
window.Module.s.printErr @ blazor.webassembly.js:1
put_char @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
write @ dotnet.6.0.0.iveziqpht8.js:1
doWritev @ dotnet.6.0.0.iveziqpht8.js:1
_fd_write @ dotnet.6.0.0.iveziqpht8.js:1
$func5840 @ 00945abe:0x14830e
$func3598 @ 00945abe:0xba938
$func205 @ 00945abe:0x7351
$func2574 @ 00945abe:0x7e545
$func8617 @ 00945abe:0x1b6c57
$func517 @ 00945abe:0x12740
$func4079 @ 00945abe:0xdc5a1
$func2151 @ 00945abe:0x5ca12
$func4231 @ 00945abe:0xe4a21
$func4232 @ 00945abe:0xe5172
$func124 @ 00945abe:0x5802
$func2307 @ 00945abe:0x6e5d7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$func6537 @ 00945abe:0x166a21
$Hb @ 00945abe:0x176082
Module._mono_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
pump_message @ dotnet.6.0.0.iveziqpht8.js:1
setTimeout (async)
_schedule_background_exec @ dotnet.6.0.0.iveziqpht8.js:1
$func1289 @ 00945abe:0x2f8dc
$func6721 @ 00945abe:0x16c00e
$func2588 @ 00945abe:0x806c2
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
managed_BINDINGS_SetTaskSourceResult @ managed_BINDINGS_SetTaskSourceResult:17
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
Promise.then (async)
_wrap_js_thenable_as_task @ dotnet.6.0.0.iveziqpht8.js:1
_js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
js_to_mono_obj @ dotnet.6.0.0.iveziqpht8.js:1
Te._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
Rt @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.6.0.0.iveziqpht8.js:1
$func2588 @ 00945abe:0x8065b
$func2307 @ 00945abe:0x689a7
$func7015 @ 00945abe:0x17bac4
$func6830 @ 00945abe:0x172bc5
$func3524 @ 00945abe:0xb47cc
$func675 @ 00945abe:0x16602
$fb @ 00945abe:0x16f60e
Module._mono_wasm_invoke_method @ dotnet.6.0.0.iveziqpht8.js:1
_call_method_with_converted_args @ dotnet.6.0.0.iveziqpht8.js:1
call_method @ dotnet.6.0.0.iveziqpht8.js:1
(anonymous) @ dotnet.6.0.0.iveziqpht8.js:1
call_assembly_entry_point @ dotnet.6.0.0.iveziqpht8.js:1
callEntryPoint @ blazor.webassembly.js:1
St @ blazor.webassembly.js:1
await in St (async)
(anonymous) @ app.js:48
dotnet.6.0.0.iveziqpht8.js:1 Uncaught (in promise) Error: System.Text.Json.JsonException: Invalid JSON
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.EndInvokeJS(JSRuntime jsRuntime, String arguments) in F:\Work\cs\aspnetcore\src\JSInterop\Microsoft.JSInterop\src\Infrastructure\DotNetDispatcher.cs:line 313
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.<>c.<EndInvokeJS>b__7_0(String argsJson)
   at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyCallQueue.Schedule[String](String state, Action`1 callback)
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.EndInvokeJS(String argsJson)
    at Object._convert_exception_for_method_call (dotnet.6.0.0.iveziqpht8.js:1)
    at Object._handle_exception_for_call (dotnet.6.0.0.iveziqpht8.js:1)
    at managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS (managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:17)
    at Object.endInvokeJSFromDotNet (blazor.webassembly.js:1)
    at blazor.webassembly.js:1

Further technical details

  • ASP.NET Core version: 6.0
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version: VS2022 Community
  • Include the output of dotnet --info:
dotnet --info Output
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100\

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  5.0.103 [C:\Program Files\dotnet\sdk]
  5.0.403 [C:\Program Files\dotnet\sdk]
  6.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
@pranavkm pranavkm added the area-blazor Includes: Blazor, Razor Components label Dec 11, 2021
@mkArtakMSFT mkArtakMSFT added this to the 6.0.x milestone Dec 13, 2021
@mkArtakMSFT
Copy link
Contributor

Thanks for the detailed investigation on this, @GerkinDev.
We have most of the team out for holidays so expect some delay here. We will reevaluate your proposed fix and see whether we need to do anything else or that 's the real fix.

@GerkinDev
Copy link
Author

Pretty sure there is more though. But, still, I look forward to the diff with the actual fix and a test case that isolates that situation. I spent a couple of hours trying, and I'm very frustrated.

Happy holidays people! 🎅

@TanayParikh
Copy link
Contributor

So, if the invocation timed out (or whatever, but yet, the task is not there anymore), the stream is let as-is, untouched, with data pending.

Hmm, so this doesn't seem to be sufficient. I manually evicted the pending task in JSRuntime.EndInvokeJS however that doesn't result in any errors (like the JSON error on the next interop call).

If we look over at the DotNetDispatcher where your error is thrown, we actually create a new JSON reader on every call, so leaving the stream "as-is" shouldn't be possible:

var utf8JsonBytes = Encoding.UTF8.GetBytes(arguments);
// The payload that we're trying to parse is of the format
// [ taskId: long, success: boolean, value: string? | object ]
// where value is the .NET type T originally specified on InvokeAsync<T> or the error string if success is false.
// We parse the first two arguments and call in to JSRuntimeBase to deserialize the actual value.
var reader = new Utf8JsonReader(utf8JsonBytes);
if (!reader.Read() || reader.TokenType != JsonTokenType.StartArray)
{
throw new JsonException("Invalid JSON");
}

Really what that error would indicate is the arguments provided by JS are in the improper format (expected format [ taskId: long, success: boolean, value: string? | object ]).

@GerkinDev I recognize this appears to be a very flaky issue you're having, however any steps which you've taken to reproduce the issue would be helpful here. Without that, we're restricted on how much further we can investigate this issue. Also, if you can let us know what the value of arguments is when the exception is raised, that'd be helpful as well.

@TanayParikh TanayParikh added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 14, 2021
@ghost
Copy link

ghost commented Dec 14, 2021

Hi @GerkinDev. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@GerkinDev
Copy link
Author

GerkinDev commented Dec 15, 2021

Hi,

I'm trying to get you this confirmation, along with a record of every calls done to JS invocation tasks creation/deletion. But I'm currently having troubles with the restore script in the aspnetcore repo. Seems that my dev env is broken again !

I keep you updated.

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Dec 15, 2021
@TanayParikh TanayParikh removed the Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. label Dec 15, 2021
@GerkinDev
Copy link
Author

GerkinDev commented Dec 15, 2021

So,

I've edited here

And replaced with

                throw new JsonException($"Invalid JSON. Arguments were: `{arguments}`");

Here's my exception now:

Uncaught (in promise) Error: System.Text.Json.JsonException: Invalid JSON. Arguments were: `[18,true,{"x":0,"y":104.5,"width":240,"height":162,"top":104.5,"right":240,"bottom":266.5,"left":0,"scrollY":0,"scrollX":0,"windowHeight":873,"windowWidth":1824}]`
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.EndInvokeJS(JSRuntime jsRuntime, String arguments)
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.<>c.<EndInvokeJS>b__7_0(String argsJson)
   at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyCallQueue.Schedule[String](String state, Action`1 callback)
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.EndInvokeJS(String argsJson)

Below is a record of my calls affecting then _pendingTasks in JSRuntime.cs:

Recording
[
  {
    "type": "Start",
    "taskId": 2,
    "identifier": "console.info"
  },
  {
    "type": "Start with args serialized",
    "taskId": 2,
    "identifier": "console.info",
    "args": "[\"[\",\"15:26:50\",\" \",\"INF\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Current version: \",\"1.0.1.0\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 3,
    "identifier": "console.info"
  },
  {
    "type": "Start with args serialized",
    "taskId": 3,
    "identifier": "console.info",
    "args": "[\"[\",\"15:26:50\",\" \",\"INF\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Assembly name: \",\"ASOMCEWeb.Client\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 4,
    "identifier": "console.error"
  },
  {
    "type": "Start with args serialized",
    "taskId": 4,
    "identifier": "console.error",
    "args": "[\"[\",\"15:26:50\",\" \",\"ERR\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"====== APP STARTED ======\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 5,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 5,
    "identifier": "console.log",
    "args": "[\"[\",\"15:26:50\",\" \",\"VRB\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Testing level \",\"Verbose\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 6,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 6,
    "identifier": "console.log",
    "args": "[\"[\",\"15:26:50\",\" \",\"DBG\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Testing level \",\"Debug\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 7,
    "identifier": "console.info"
  },
  {
    "type": "Start with args serialized",
    "taskId": 7,
    "identifier": "console.info",
    "args": "[\"[\",\"15:26:50\",\" \",\"INF\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Testing level \",\"Information\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 8,
    "identifier": "console.warn"
  },
  {
    "type": "Start with args serialized",
    "taskId": 8,
    "identifier": "console.warn",
    "args": "[\"[\",\"15:26:50\",\" \",\"WRN\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Testing level \",\"Warning\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 9,
    "identifier": "console.error"
  },
  {
    "type": "Start with args serialized",
    "taskId": 9,
    "identifier": "console.error",
    "args": "[\"[\",\"15:26:50\",\" \",\"ERR\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Testing level \",\"Error\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 10,
    "identifier": "console.error"
  },
  {
    "type": "Start with args serialized",
    "taskId": 10,
    "identifier": "console.error",
    "args": "[\"[\",\"15:26:50\",\" \",\"FTL\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Testing level \",\"Fatal\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 11,
    "identifier": "console.info"
  },
  {
    "type": "Start with args serialized",
    "taskId": 11,
    "identifier": "console.info",
    "args": "[\"[\",\"15:26:50\",\" \",\"INF\",\"@\",\"ASOMCEWeb.Client.Program\",\"] \",\"Environment is \",\"Development\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 12,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 12,
    "identifier": "console.log",
    "args": "[\"[\",\"15:26:50\",\" \",\"DBG\",\"@\",\"ASOMCEWeb.Client.Services.UiPreferencesService\",\"] \",\"Using stored culture \",\"fr-FR\",\"\\n\"]"
  },
  {
    "type": "Start",
    "taskId": 13,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 13,
    "identifier": "console.log",
    "args": "[\"[\",\"15:26:50\",\" \",\"DBG\",\"@\",\"ASOMCEWeb.Client.Services.UiPreferencesService\",\"] \",\"Setting culture \",\"fr-FR\",\"\\n\"]"
  },
  {
    "type": "End",
    "taskId": 2,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 3,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 4,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 5,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 6,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 7,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 8,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 9,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 10,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 11,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 12,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 13,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "Start",
    "taskId": 2,
    "identifier": "Blazor._internal.attachWebRendererInterop"
  },
  {
    "type": "Start with args serialized",
    "taskId": 2,
    "identifier": "Blazor._internal.attachWebRendererInterop",
    "args": "[0,{\"__dotNetObject\":1},{},{}]"
  },
  {
    "type": "Start",
    "taskId": 3,
    "identifier": "AuthenticationService.init"
  },
  {
    "type": "Start with args serialized",
    "taskId": 3,
    "identifier": "AuthenticationService.init",
    "args": "[{\"configurationEndpoint\":\"_configuration/ASOMCEWeb.Client\"}]"
  },
  {
    "type": "Start",
    "taskId": 4,
    "identifier": "import"
  },
  {
    "type": "Start with args serialized",
    "taskId": 4,
    "identifier": "import",
    "args": "[\"./_content/BlazorPro.BlazorSize/blazorSizeMediaModule.js\"]"
  },
  {
    "type": "Start",
    "taskId": 5,
    "identifier": "mudElementRef.getBoundingClientRect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 5,
    "identifier": "mudElementRef.getBoundingClientRect",
    "args": "[{\"__internalId\":\"3\"}]"
  },
  {
    "type": "Start",
    "taskId": 6,
    "identifier": "mudPopover.connect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 6,
    "identifier": "mudPopover.connect",
    "args": "[\"f66e73d5-f3a7-4618-8da1-712fb87c185c\"]"
  },
  {
    "type": "End",
    "taskId": 2,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 2,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 5,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 5,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 7,
    "identifier": "mudResizeListenerFactory.listenForResize"
  },
  {
    "type": "Start with args serialized",
    "taskId": 7,
    "identifier": "mudResizeListenerFactory.listenForResize",
    "args": "[{\"__dotNetObject\":2},{\"reportRate\":100,\"enableLogging\":false,\"suppressInitEvent\":true,\"notifyOnBreakpointOnly\":true,\"breakpointDefinitions\":{\"Xl\":1920,\"Lg\":1280,\"Md\":960,\"Sm\":600,\"Xs\":0}},\"6476f815-2999-46cc-bcfa-23b7c280d6a1\"]"
  },
  {
    "type": "End",
    "taskId": 6,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 6,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 8,
    "identifier": "mudPopover.initilize"
  },
  {
    "type": "Start with args serialized",
    "taskId": 8,
    "identifier": "mudPopover.initilize",
    "args": "[\"mudblazor-main-content\",0]"
  },
  {
    "type": "End",
    "taskId": 7,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 7,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 9,
    "identifier": "mudResizeListener.getBrowserWindowSize"
  },
  {
    "type": "Start with args serialized",
    "taskId": 9,
    "identifier": "mudResizeListener.getBrowserWindowSize",
    "args": null
  },
  {
    "type": "End",
    "taskId": 8,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 8,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 9,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 9,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 10,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 10,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"2\"},{\"__dotNetObject\":3},\"mouseenter\",\"OnMouseEnter\",[],true]"
  },
  {
    "type": "End",
    "taskId": 10,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 10,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 11,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 11,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"2\"},{\"__dotNetObject\":3},\"mouseleave\",\"OnMouseLeave\",[],true]"
  },
  {
    "type": "End",
    "taskId": 11,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 11,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 3,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 3,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 12,
    "identifier": "AuthenticationService.getUser"
  },
  {
    "type": "Start with args serialized",
    "taskId": 12,
    "identifier": "AuthenticationService.getUser",
    "args": null
  },
  {
    "type": "End",
    "taskId": 4,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 4,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 13,
    "identifier": "addMediaQueryList"
  },
  {
    "type": "Start with args serialized",
    "taskId": 13,
    "identifier": "addMediaQueryList",
    "args": "[{\"__dotNetObject\":4}]"
  },
  {
    "type": "End",
    "taskId": 13,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 13,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 14,
    "identifier": "addMediaQueryToList"
  },
  {
    "type": "Start with args serialized",
    "taskId": 14,
    "identifier": "addMediaQueryToList",
    "args": "[{\"__dotNetObject\":4},\"(min-width: 1280px)\"]"
  },
  {
    "type": "End",
    "taskId": 14,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 14,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 12,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 12,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 14,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 14,
    "identifier": "console.log",
    "args": "[\"[\",\"15:27:18\",\" \",\"VRB\",\"@\",\"ASOMCEWeb.Client.Services.AppAccessToken.AccessTokenProviderViaCached\",\"] \",\"Start getting access token right now\",\"\\n\",\"MCE\"]"
  },
  {
    "type": "Start",
    "taskId": 15,
    "identifier": "sessionStorage.getItem"
  },
  {
    "type": "Start with args serialized",
    "taskId": 15,
    "identifier": "sessionStorage.getItem",
    "args": "[\"Microsoft.AspNetCore.Components.WebAssembly.Authentication.CachedAuthSettings\"]"
  },
  {
    "type": "Start",
    "taskId": 15,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 15,
    "identifier": "console.log",
    "args": "[\"[\",\"15:27:18\",\" \",\"DBG\",\"@\",\"ASOMCEWeb.Client.Services.SignalRStateMonitorService\",\"] \",\"Hub \",\"MCE\",\" went from \",null,\" to \",\"Pending\",\" (mapped from \",\"Pending\",\")}\",\"\\n\",\"MCE\"]"
  },
  {
    "type": "Start",
    "taskId": 16,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 16,
    "identifier": "console.log",
    "args": "[\"[\",\"15:27:18\",\" \",\"VRB\",\"@\",\"ASOMCEWeb.Client.Services.IncrementalProviderV2.RealProviders.Mce.IncrementalMceProvider\",\"] \",\"Resync scheduled\",\"\\n\",\"MCE\"]"
  },
  {
    "type": "End",
    "taskId": 14,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 15,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 15,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 16,
    "identifier": "sessionStorage.getItem"
  },
  {
    "type": "Start with args serialized",
    "taskId": 16,
    "identifier": "sessionStorage.getItem",
    "args": "[\"oidc.user:https://localhost:5001:ASOMCEWeb.Client\"]"
  },
  {
    "type": "End",
    "taskId": 15,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 16,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 16,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 17,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 17,
    "identifier": "console.log",
    "args": "[\"[\",\"15:27:18\",\" \",\"DBG\",\"@\",\"ASOMCEWeb.Client.Services.AppAccessToken.AccessTokenProviderViaCached\",\"] \",\"Failed to read token from storage. Tries: \",1,\"\\n\",\"ASOMCEWeb.Client.Services.AppAccessToken.AccessTokenProviderViaCached\\u002BMissingStorageItemException: Missing storage key \\u0022oidc.user:https://localhost:5001:ASOMCEWeb.Client\\u0022\\n   at ASOMCEWeb.Client.Services.AppAccessToken.AccessTokenProviderViaCached._GetAccessTokenFromStorage() in F:\\\\Work\\\\cs\\\\ASOMCEWeb\\\\ASOMCEWeb\\\\Client\\\\Services\\\\AppAccessToken\\\\AccessTokenProviderViaCached.cs:line 68\\n   at ASOMCEWeb.Client.Services.AppAccessToken.AccessTokenProviderViaCached.GetAccessToken() in F:\\\\Work\\\\cs\\\\ASOMCEWeb\\\\ASOMCEWeb\\\\Client\\\\Services\\\\AppAccessToken\\\\AccessTokenProviderViaCached.cs:line 102\",\"MCE\"]"
  },
  {
    "type": "End",
    "taskId": 16,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 17,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "Start",
    "taskId": 18,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 18,
    "identifier": "console.log",
    "args": "[\"[\",\"15:27:18\",\" \",\"DBG\",\"@\",\"ASOMCEWeb.Client.Services.IncrementalProviderV2.RealProviders.Mce.IncrementalMceProvider\",\"] \",\"Resync started\",\"\\n\",\"MCE\"]"
  },
  {
    "type": "Start",
    "taskId": 17,
    "identifier": "mudElementRef.getBoundingClientRect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 17,
    "identifier": "mudElementRef.getBoundingClientRect",
    "args": "[{\"__internalId\":\"7\"}]"
  },
  {
    "type": "Start",
    "taskId": 18,
    "identifier": "mudElementRef.getBoundingClientRect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 18,
    "identifier": "mudElementRef.getBoundingClientRect",
    "args": "[{\"__internalId\":\"9\"}]"
  },
  {
    "type": "End",
    "taskId": 18,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 18,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 19,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 19,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"8\"},{\"__dotNetObject\":5},\"animationend\",\"AnimationEnd\",[],false]"
  },
  {
    "type": "End",
    "taskId": 17,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 17,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 20,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 20,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"6\"},{\"__dotNetObject\":6},\"animationend\",\"AnimationEnd\",[],false]"
  },
  {
    "type": "End",
    "taskId": 18,
    "succeeded": true,
    "existed": false
  }
]

OFC, feel free to remove unrelevant data.

Records were done just above the following lines:

Start

Start with args serialized

var resultType = JSCallResultTypeHelper.FromGeneric<TValue>();

Cleanup

Replaced

_pendingTasks.TryRemove(taskId, out _);

with

            if(_pendingTasks.TryRemove(taskId, out _))
            {
                TasksRecord.Add(new
                {
                    type = "Cleanup",
                    taskId = taskId,
                    existed = true,
                });
            } else
            {
                TasksRecord.Add(new
                {
                    type = "Cleanup",
                    taskId = taskId,
                    existed = true,
                });
            }

End

Replaced

if (!_pendingTasks.TryRemove(taskId, out var tcs))
{
// We should simply return if we can't find an id for the invocation.
// This likely means that the method that initiated the call defined a timeout and stopped waiting.
return;
}

with

            if (!_pendingTasks.TryRemove(taskId, out var tcs))
            {
                TasksRecord.Add(new
                {
                    type = "End",
                    taskId = taskId,
                    succeeded = succeeded,
                    existed = false,
                });
                // We should simply return if we can't find an id for the invocation.
                // This likely means that the method that initiated the call defined a timeout and stopped waiting.
                return;
            }
            TasksRecord.Add(new
            {
                type = "End",
                taskId = taskId,
                succeeded = succeeded,
                existed = true,
            });

Please don't pay attention to the dirty calls I made to fetch token from session storage manually. Using the normal authentication service triggered an error almost every time, and now that I'm thinking about it, it might be related to this issue too. But I left those calls in the record above so that you can see every calls made.

So I think that the error is that taskId 18 in the record is cleaned up before End. An uneducated thought of mine would be that it's a race condition that might be tangled with how JS engines handles tasks queues under the hood, since I have been in a state where Chrome & Firefox did both trigger the error, but not on the same page, thus not with the same timing/calling order. Unfortunatelly, I can't get you records of that state for both browsers. My DB has been modified since, and I can't rollback to that exact state.

Let me know your thoughts if you have a couple of minutes :)

@TanayParikh
Copy link
Contributor

TanayParikh commented Dec 15, 2021

Thanks for the detailed analysis @GerkinDev!

Just to clarify on your recording:

  {
    "type": "Start",
    "taskId": 18,
    "identifier": "console.log"
  },
  {
    "type": "Start with args serialized",
    "taskId": 18,
    "identifier": "console.log",
    "args": "[\"[\",\"15:27:18\",\" \",\"DBG\",\"@\",\"ASOMCEWeb.Client.Services.IncrementalProviderV2.RealProviders.Mce.IncrementalMceProvider\",\"] \",\"Resync started\",\"\\n\",\"MCE\"]"
  },
  ...,
  {
    "type": "Start",
    "taskId": 18,
    "identifier": "mudElementRef.getBoundingClientRect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 18,
    "identifier": "mudElementRef.getBoundingClientRect",
    "args": "[{\"__internalId\":\"9\"}]"
  },

Based on the identifier it appears there are two distinct tasks with taskId 18. Am I misinterpreting the trace? Could you please specify what you replaced Start and Start with args serialized with (as you specified for Cleanup).

@GerkinDev
Copy link
Author

Wow, indeed, I didn't even noticed that !

Here is the full replacement:

        internal ValueTask<TValue> InvokeAsync<[DynamicallyAccessedMembers(JsonSerialized)] TValue>(
            long targetInstanceId,
            string identifier,
            CancellationToken cancellationToken,
            object?[]? args)
        {
            var taskId = Interlocked.Increment(ref _nextPendingTaskId);
            var tcs = new TaskCompletionSource<TValue>();
            if (cancellationToken.CanBeCanceled)
            {
                _cancellationRegistrations[taskId] = cancellationToken.Register(() =>
                {
                    tcs.TrySetCanceled(cancellationToken);
                    CleanupTasksAndRegistrations(taskId);
                });
            }
            TasksRecord.Add(new
            {
                type = "Start",
                taskId = taskId,
                identifier = identifier,
            });
            _pendingTasks[taskId] = tcs;

            try
            {
                if (cancellationToken.IsCancellationRequested)
                {
                    tcs.TrySetCanceled(cancellationToken);
                    CleanupTasksAndRegistrations(taskId);

                    return new ValueTask<TValue>(tcs.Task);
                }

                var argsJson = args is not null && args.Length != 0 ?
                    JsonSerializer.Serialize(args, JsonSerializerOptions) :
                    null;
                TasksRecord.Add(new
                {
                    type = "Start with args serialized",
                    taskId = taskId,
                    identifier = identifier,
                    args = argsJson
                });
                var resultType = JSCallResultTypeHelper.FromGeneric<TValue>();

                BeginInvokeJS(taskId, identifier, argsJson, resultType, targetInstanceId);

                return new ValueTask<TValue>(tcs.Task);
            }
            catch
            {
                CleanupTasksAndRegistrations(taskId);
                throw;
            }
        }

@TanayParikh
Copy link
Contributor

TanayParikh commented Dec 15, 2021

Interlocked.Increment should guarantee thread safety here, and ensure we don't have duplicate taskId. The only explanation I can come up with for the duplicate taskId is the TasksRecord is a static collection and records from multiple JSRuntime instances are being added to it. Is that the case? Also in the interest of thread safety, TasksRecord should be a thread-safe collection.

@GerkinDev
Copy link
Author

GerkinDev commented Dec 15, 2021

Yes, you are absolutely right on the whole thing, I did the record without thread safety in mind at all, and I indeed made it static because I wasn't sure how I could get its content back. So i tried silly stuff. Hey don't look at me like that, I'm not a C# expert okay ? I'm just a poor front-end JS aficionado that had a work on Blazor !

Enough talking. Here is the exact same recording made with an instance-bound BlockingCollection:

Instance recording with blocking collection
[
  {
    "type": "End",
    "taskId": 2,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 3,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 4,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 5,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 6,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 7,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 8,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 9,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 10,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 11,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 12,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 13,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "Start",
    "taskId": 2,
    "identifier": "Blazor._internal.attachWebRendererInterop"
  },
  {
    "type": "Start with args serialized",
    "taskId": 2,
    "identifier": "Blazor._internal.attachWebRendererInterop",
    "args": "[0,{\"__dotNetObject\":1},{},{}]"
  },
  {
    "type": "Start",
    "taskId": 3,
    "identifier": "AuthenticationService.init"
  },
  {
    "type": "Start with args serialized",
    "taskId": 3,
    "identifier": "AuthenticationService.init",
    "args": "[{\"configurationEndpoint\":\"_configuration/ASOMCEWeb.Client\"}]"
  },
  {
    "type": "Start",
    "taskId": 4,
    "identifier": "import"
  },
  {
    "type": "Start with args serialized",
    "taskId": 4,
    "identifier": "import",
    "args": "[\"./_content/BlazorPro.BlazorSize/blazorSizeMediaModule.js\"]"
  },
  {
    "type": "Start",
    "taskId": 5,
    "identifier": "mudElementRef.getBoundingClientRect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 5,
    "identifier": "mudElementRef.getBoundingClientRect",
    "args": "[{\"__internalId\":\"3\"}]"
  },
  {
    "type": "Start",
    "taskId": 6,
    "identifier": "mudPopover.connect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 6,
    "identifier": "mudPopover.connect",
    "args": "[\"e511a23a-683e-41a6-98fd-af4acff9a464\"]"
  },
  {
    "type": "End",
    "taskId": 2,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 2,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 5,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 5,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 7,
    "identifier": "mudResizeListenerFactory.listenForResize"
  },
  {
    "type": "Start with args serialized",
    "taskId": 7,
    "identifier": "mudResizeListenerFactory.listenForResize",
    "args": "[{\"__dotNetObject\":2},{\"reportRate\":100,\"enableLogging\":false,\"suppressInitEvent\":true,\"notifyOnBreakpointOnly\":true,\"breakpointDefinitions\":{\"Xl\":1920,\"Lg\":1280,\"Md\":960,\"Sm\":600,\"Xs\":0}},\"cd29314b-1cdf-4b39-8540-d5b03884f01d\"]"
  },
  {
    "type": "End",
    "taskId": 6,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 6,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 8,
    "identifier": "mudPopover.initilize"
  },
  {
    "type": "Start with args serialized",
    "taskId": 8,
    "identifier": "mudPopover.initilize",
    "args": "[\"mudblazor-main-content\",0]"
  },
  {
    "type": "End",
    "taskId": 7,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 7,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 9,
    "identifier": "mudResizeListener.getBrowserWindowSize"
  },
  {
    "type": "Start with args serialized",
    "taskId": 9,
    "identifier": "mudResizeListener.getBrowserWindowSize",
    "args": null
  },
  {
    "type": "End",
    "taskId": 8,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 8,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 9,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 9,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 10,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 10,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"2\"},{\"__dotNetObject\":3},\"mouseenter\",\"OnMouseEnter\",[],true]"
  },
  {
    "type": "End",
    "taskId": 10,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 10,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 11,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 11,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"2\"},{\"__dotNetObject\":3},\"mouseleave\",\"OnMouseLeave\",[],true]"
  },
  {
    "type": "End",
    "taskId": 11,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 11,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 3,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 3,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 12,
    "identifier": "AuthenticationService.getUser"
  },
  {
    "type": "Start with args serialized",
    "taskId": 12,
    "identifier": "AuthenticationService.getUser",
    "args": null
  },
  {
    "type": "End",
    "taskId": 4,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 4,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 13,
    "identifier": "addMediaQueryList"
  },
  {
    "type": "Start with args serialized",
    "taskId": 13,
    "identifier": "addMediaQueryList",
    "args": "[{\"__dotNetObject\":4}]"
  },
  {
    "type": "End",
    "taskId": 13,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 13,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 14,
    "identifier": "addMediaQueryToList"
  },
  {
    "type": "Start with args serialized",
    "taskId": 14,
    "identifier": "addMediaQueryToList",
    "args": "[{\"__dotNetObject\":4},\"(min-width: 1280px)\"]"
  },
  {
    "type": "End",
    "taskId": 14,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 14,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 12,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 12,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 15,
    "identifier": "sessionStorage.getItem"
  },
  {
    "type": "Start with args serialized",
    "taskId": 15,
    "identifier": "sessionStorage.getItem",
    "args": "[\"Microsoft.AspNetCore.Components.WebAssembly.Authentication.CachedAuthSettings\"]"
  },
  {
    "type": "End",
    "taskId": 14,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 15,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 15,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 16,
    "identifier": "sessionStorage.getItem"
  },
  {
    "type": "Start with args serialized",
    "taskId": 16,
    "identifier": "sessionStorage.getItem",
    "args": "[\"oidc.user:https://localhost:5001:ASOMCEWeb.Client\"]"
  },
  {
    "type": "End",
    "taskId": 15,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 16,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 16,
    "existed": true
  },
  {
    "type": "End",
    "taskId": 16,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "End",
    "taskId": 17,
    "succeeded": true,
    "existed": false
  },
  {
    "type": "Start",
    "taskId": 17,
    "identifier": "mudElementRef.getBoundingClientRect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 17,
    "identifier": "mudElementRef.getBoundingClientRect",
    "args": "[{\"__internalId\":\"7\"}]"
  },
  {
    "type": "Start",
    "taskId": 18,
    "identifier": "mudElementRef.getBoundingClientRect"
  },
  {
    "type": "Start with args serialized",
    "taskId": 18,
    "identifier": "mudElementRef.getBoundingClientRect",
    "args": "[{\"__internalId\":\"9\"}]"
  },
  {
    "type": "End",
    "taskId": 18,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 18,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 19,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 19,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"8\"},{\"__dotNetObject\":5},\"animationend\",\"AnimationEnd\",[],false]"
  },
  {
    "type": "End",
    "taskId": 17,
    "succeeded": true,
    "existed": true
  },
  {
    "type": "Cleanup",
    "taskId": 17,
    "existed": true
  },
  {
    "type": "Start",
    "taskId": 20,
    "identifier": "mudElementRef.addEventListener"
  },
  {
    "type": "Start with args serialized",
    "taskId": 20,
    "identifier": "mudElementRef.addEventListener",
    "args": "[{\"__internalId\":\"6\"},{\"__dotNetObject\":6},\"animationend\",\"AnimationEnd\",[],false]"
  },
  {
    "type": "End",
    "taskId": 18,
    "succeeded": true,
    "existed": false
  }
]

Also, I precise that both records JSON are taken at the moment where the exception is being thrown

@TanayParikh
Copy link
Contributor

TanayParikh commented Dec 15, 2021

Thanks, this is great! I think I see the issue now, and your suggestion to use JsonReader.Skip() was along the right lines. Essentially, we don't want to enforce we've read till the end of the JSON if we've just abandoned the EndInvokeJS call entirely due to the task timing out. I have a PR up here, but may have to wait a bit to get the appropriate reviews given seasonal holidays.

If you're able to reproduce the issue, could you please try out that branch (taparik/doNotEnforceReadIfNotEndInvokeFailed).

@TanayParikh TanayParikh added bug This issue describes a behavior which is not expected - a bug. and removed investigate labels Dec 15, 2021
@GerkinDev
Copy link
Author

Good news ! It seems that it fixed the main issue !

Now, the surprise is to see if it solved also other errors scattered around my project :) good job and thank you very much :) hope this gets approved soon !

@ghost ghost locked as resolved and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants