Open
Description
Description
The following error occurs randomly when booting the .NET runtime in browser:
[MONO] * Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:2718, condition `<disabled>' not met
Error at Fc (http://localhost:3000/_framework/dotnet.runtime.js:3:168644)
at http://localhost:3000/_framework/dotnet.native.wasm:wasm-function[3748]:0x10334d
at http://localhost:3000/_framework/dotnet.native.wasm:wasm-function[785]:0x3c089
at http://localhost:3000/_framework/dotnet.native.wasm:wasm-function[706]:0x3a13c
at http://localhost:3000/_framework/dotnet.native.wasm:wasm-function[710]:0x3a25d
at http://localhost:3000/_framework/dotnet.native.wasm:wasm-function[712]:0x3a2a0
at http://localhost:3000/_framework/dotnet.native.wasm:wasm-function[711]:0x3a273
at http://localhost:3000/_framework/dotnet.native.wasm:wasm-function[3742]:0x1010a2
at Module._mono_wasm_load_runtime [as mono_wasm_load_runtime] (http://localhost:3000/_framework/dotnet.native.js:8:91450)
at http://localhost:3000/_framework/dotnet.runtime.js:3:184650
MONO_WASM: mono_wasm_load_runtime () failed
Reproduction Steps
- Clone the following minimal repro: https://github.com/elringus/js-interop-test
- Run
dotnet publish
under the root directory - Run
npx serve
(or other HTTP server) underJSInteropTest/bin/Release/net9.0/browser-wasm/AppBundle
- Open the served URL with a browser and start refreshing the page
Expected behavior
The app is booted and prints the debug statements on each page refresh.
Actual behavior
The app is sometimes booted and sometimes not, with the aforementioned error.
Example screen recording below:
vid.mp4
Regression?
This is a regression in .NET 9. This behavior was not observed in .NET 8.
Known Workarounds
None.
Configuration
.NET SDK:
Version: 9.0.100
Commit: 59db016f11
Workload version: 9.0.100-manifests.174c237d
MSBuild version: 17.12.7+5b8665660
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Other information
No response