Describe the bug
As originally posted in dotnet/aspnetcore#32386 sometimes when loading/refreshing Blazor wsam site that uses signalr connection it fails with message from title. But I do not think it is resolved in net6. This error is somewhe inside
HubConnection.StartAsync(CancellationToken cancellationToken = default). Also wrom whar I observed this exception is not propageted. So if you have something like:
try{ await hc.StartAsync();}
catch{}
finally{}
catch and finally block are never called.
To Reproduce
Similar as in: dotnet/aspnetcore#32386
Exceptions (if any)
Uncaught Error: The delegate target that is being invoked is no longer available. Please check if it has been prematurely GC'd.
invoke_delegate https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_unbox_delegate_rooted https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_set_object_property https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet https://domain.com/_framework/blazor.webassembly.js:1
beginInvokeJSFromDotNet https://domain.com/_framework/blazor.webassembly.js:1
promise callbackbeginInvokeJSFromDotNet https://domain.com/_framework/blazor.webassembly.js:1
ct https://domain.com/_framework/blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_call_method_with_converted_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
call_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
set_task_result https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
js_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
promise callbackjs_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
mono_wasm_convert_return_value https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_js_with_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_call_method_with_converted_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
call_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
set_task_result https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
js_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
promise callback*js_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
mono_wasm_convert_return_value https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_js_with_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
dotnet.6.0.0-preview.5.21301.5.js:1:203039

Further technical details
ASP.NET Core version: .NET6-previev5
Image is build using tools from
Digest: sha256:789b28fbee1c28b2c637e5b1dcbc54f93bbcd01db1481447dfaccb79f8bd3fae
Status: Downloaded newer image for mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim
And run inside:
mcr.microsoft.com/dotnet/runtime-deps:6.0-bullseye-slim
Digest: sha256:37068731bf9ae0789e1d28f8d75ac52c7ef4d88e7b81574caa7017ebc8fe0320
Status: Downloaded newer image for mcr.microsoft.com/dotnet/runtime-deps:6.0-bullseye-slim
Thanks for the additional details. Given that we haven't received any other similar feedback we're closing this issue as per your statement it's working correctly in .NET 6.
Originally posted by @mkArtakMSFT in dotnet/aspnetcore#32386 (comment)
Describe the bug
As originally posted in dotnet/aspnetcore#32386 sometimes when loading/refreshing Blazor wsam site that uses signalr connection it fails with message from title. But I do not think it is resolved in net6. This error is somewhe inside
HubConnection.StartAsync(CancellationToken cancellationToken = default). Also wrom whar I observed this exception is not propageted. So if you have something like:
try{ await hc.StartAsync();}
catch{}
finally{}
catch and finally block are never called.
To Reproduce
Similar as in: dotnet/aspnetcore#32386
Exceptions (if any)
Uncaught Error: The delegate target that is being invoked is no longer available. Please check if it has been prematurely GC'd.
invoke_delegate https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_unbox_delegate_rooted https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_set_object_property https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
endInvokeJSFromDotNet https://domain.com/_framework/blazor.webassembly.js:1
beginInvokeJSFromDotNet https://domain.com/_framework/blazor.webassembly.js:1
promise callbackbeginInvokeJSFromDotNet https://domain.com/_framework/blazor.webassembly.js:1
ct https://domain.com/_framework/blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_call_method_with_converted_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
call_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
set_task_result https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
js_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
promise callbackjs_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
mono_wasm_convert_return_value https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_js_with_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_call_method_with_converted_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
call_method https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
set_task_result https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
js_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
promise callback*js_to_mono_obj https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
mono_wasm_convert_return_value https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
_mono_wasm_invoke_js_with_args https://domain.com/_framework/dotnet.6.0.0-preview.5.21301.5.js:1
dotnet.6.0.0-preview.5.21301.5.js:1:203039
Further technical details
ASP.NET Core version: .NET6-previev5
Image is build using tools from
Digest: sha256:789b28fbee1c28b2c637e5b1dcbc54f93bbcd01db1481447dfaccb79f8bd3fae
Status: Downloaded newer image for mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim
And run inside:
mcr.microsoft.com/dotnet/runtime-deps:6.0-bullseye-slim
Digest: sha256:37068731bf9ae0789e1d28f8d75ac52c7ef4d88e7b81574caa7017ebc8fe0320
Status: Downloaded newer image for mcr.microsoft.com/dotnet/runtime-deps:6.0-bullseye-slim
Thanks for the additional details. Given that we haven't received any other similar feedback we're closing this issue as per your statement it's working correctly in .NET 6.
Originally posted by @mkArtakMSFT in dotnet/aspnetcore#32386 (comment)