Skip to content

[browser] custom boot - Condition not met at mono/metadata/assembly.c:2718 #110738

Open
@elringus

Description

@elringus

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

  1. Clone the following minimal repro: https://github.com/elringus/js-interop-test
  2. Run dotnet publish under the root directory
  3. Run npx serve (or other HTTP server) under JSInteropTest/bin/Release/net9.0/browser-wasm/AppBundle
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions