Skip to content

Uncaught (in promise) DOMException: The user aborted a request. when Virtualize cancels the gRPC-Web call (Blazor WASM, net7 regression) #80696

@hakenr

Description

@hakenr

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using gRPC-Web (Grpc.Net.Client.Web) call to server from Virtualize.ItemsProvider and Virtualize cancels the call, the browser sometimes (race-condition?) fails with Uncaught (in promise) DOMException: The user aborted a request.
image

Sometimes, the Virtualize component continues working, sometimes it is kept broken.

The issue was introduced starting net7.0, when I downgrade the project to net6.0, the issue disappears.

Expected Behavior

Correct handling of the request cancellation (without any browser error).

(If the error is caused by incorrect Grpc.Net.Client.Web implementation, the WASM/Blazor still should fail with regular exception and not with this type of DOM error.)

Steps To Reproduce

repro: https://github.com/hakenr/VirtualizeGrpcRepro
Start the project.
Scroll the list quickly up/down/up/down/..., the issue usually appears within few seconds.
If not reproduced, try to set browser CU throttling to 6x slowdown, the issue will appear much more likely.
2023-01-10_22-51-09

Exceptions (if any)

Uncaught (in promise) DOMException: The user aborted a request.
oa	@	dotnet.7.0.2.tt5z2s8frk.js:5
_bound_js_INTERNAL_http_wasm_abort_response	@	_bound_js_INTERNAL_h…sm_abort_response:7
Ss	@	dotnet.7.0.2.tt5z2s8frk.js:5
_mono_wasm_invoke_bound_function	@	dotnet.7.0.2.tt5z2s8frk.js:14
$func313	@	00992bd6:0x1d40d
$func283	@	00992bd6:0x1c906
$func221	@	00992bd6:0xdff6
$func220	@	00992bd6:0xce95
$func8115	@	00992bd6:0x1a2195
$func2054	@	00992bd6:0x85bba
$func2059	@	00992bd6:0x86222
$func2086	@	00992bd6:0x882e1
$mono_wasm_invoke_method_bound	@	00992bd6:0x9c6c
Module._mono_wasm_invoke_method_bound	@	dotnet.7.0.2.tt5z2s8frk.js:14
Ws	@	dotnet.7.0.2.tt5z2s8frk.js:5
b.javaScriptExports.complete_task	@	dotnet.7.0.2.tt5z2s8frk.js:5
(anonymous)	@	dotnet.7.0.2.tt5z2s8frk.js:5
Promise.catch (async)		
Kr	@	dotnet.7.0.2.tt5z2s8frk.js:5
_bound_js_INTERNAL_http_wasm_get_streamed_response_bytes	@	_bound_js_INTERNAL_h…d_response_bytes:10
Ss	@	dotnet.7.0.2.tt5z2s8frk.js:5
_mono_wasm_invoke_bound_function	@	dotnet.7.0.2.tt5z2s8frk.js:14
$func313	@	00992bd6:0x1d40d
$func283	@	00992bd6:0x1c906
$func221	@	00992bd6:0xdff6
$func220	@	00992bd6:0xce95
$func8115	@	00992bd6:0x1a2195
$func2054	@	00992bd6:0x85bba
$func2059	@	00992bd6:0x86222
$func2086	@	00992bd6:0x882e1
$mono_wasm_invoke_method_bound	@	00992bd6:0x9c6c
Module._mono_wasm_invoke_method_bound	@	dotnet.7.0.2.tt5z2s8frk.js:14
Ws	@	dotnet.7.0.2.tt5z2s8frk.js:5
b.javaScriptExports.complete_task	@	dotnet.7.0.2.tt5z2s8frk.js:5
(anonymous)	@	dotnet.7.0.2.tt5z2s8frk.js:5
Promise.then (async)		
Kr	@	dotnet.7.0.2.tt5z2s8frk.js:5
_bound_js_INTERNAL_http_wasm_fetch_bytes	@	_bound_js_INTERNAL_h…wasm_fetch_bytes:15
Ss	@	dotnet.7.0.2.tt5z2s8frk.js:5
_mono_wasm_invoke_bound_function	@	dotnet.7.0.2.tt5z2s8frk.js:14
$func313	@	00992bd6:0x1d40d
$func283	@	00992bd6:0x1c906
$func221	@	00992bd6:0xdff6
$func220	@	00992bd6:0xce95
$func8115	@	00992bd6:0x1a2195
$func2054	@	00992bd6:0x85bba
$func2052	@	00992bd6:0x85b30
$func1395	@	00992bd6:0x68681
$func313	@	00992bd6:0x1d491
$func283	@	00992bd6:0x1c906
$func221	@	00992bd6:0xdff6
$func220	@	00992bd6:0xce95
$func8115	@	00992bd6:0x1a2195
$func2054	@	00992bd6:0x85bba
$func2059	@	00992bd6:0x86222
$func2086	@	00992bd6:0x882e1
$mono_wasm_invoke_method_ref	@	00992bd6:0x9bd1
Module._mono_wasm_invoke_method_ref	@	dotnet.7.0.2.tt5z2s8frk.js:14
_Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_BeginInvokeDotNet	@	_Microsoft_AspNetCor…eginInvokeDotNet:29
beginInvokeDotNetFromJS	@	blazor.webassembly.js:1
b	@	blazor.webassembly.js:1
invokeMethodAsync	@	blazor.webassembly.js:1
(anonymous)	@	blazor.webassembly.js:1
(anonymous)

.NET Version

7.0.2

Anything else?

I published the repro to https://VirtualizeGrpcRepro.azurewebsites.net

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions