-
Notifications
You must be signed in to change notification settings - Fork 5k
[browser] custom boot - Condition not met at mono/metadata/assembly.c:2718 #110738
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
Comments
Tagging subscribers to 'arch-wasm': @lewing |
Is this possibly because |
I've worked around this by using |
I see now, this is the custom boot sequence. |
<disabled>
not met at mono/metadata/assembly.c:2718
regression on .NET 9
We are probably going to disrupt this anyway, right @maraf ? |
You mean removing Could you please consider adding a way to specify a resource's buffer for cases where end-users fetch the content themselves (similar to type ResourceList = {
[name: string]: string | null | "" | ArrayBuffer;
}; — where an |
@elringus if I remember it right, you are doing this in order to webpack it ? Or what's the real use case and motivation for this extension point ? |
The main one is embedding WASM inside JavaScript module, so that we can have a single But this is also important to abstract the WASM delivery mechanism. It's not like |
BTW: you can also monkey-patch |
Not really, as I don't want to break base dotnet JS features for end-users of my library. If someone would like to use the default resource fetching mechanism, they should be able to. |
How are you doing it? Are you embedding the wasm binary as text in JS?
I'm not sure about the final schema, whether it will be |
As base64-encoded text.
I've maintained that kind of boot config since .NET 6 in my library: https://github.com/elringus/bootsharp/blob/main/src/js/src/config.ts. It works with bundlers (webpack, Vite) and runtimes (Node, Deno, Bun) alike. The one you've shared looks similar, so I guess it'll work as well. Just be aware of bundler warnings due to unresolved imports in the JS runtime and Emscripten-generated files. On my end, I'm patching them during the dotnet build. I created an issue about this a while ago: #80045 (though the title is about web extensions, the core issue is with the imports). Here is the patcher I'm using: https://github.com/elringus/bootsharp/blob/main/src/cs/Bootsharp.Publish/Pack/ModulePatcher/InternalPatcher.cs. That said, this particular bundler/boot config scenario is not directly related to the issue of customizing the binaries delivery mechanism. We still need an option to provide the content directly to the dotnet JS runtime when it initializes—so it's a runtime issue rather than a build/bundle-time one.
As long as the dotnet JS runtime allows providing binary content for the boot resources, it'll work. The assets model with the |
Description
The following error occurs randomly when booting the .NET runtime in browser:
Reproduction Steps
dotnet publish
under the root directorynpx serve
(or other HTTP server) underJSInteropTest/bin/Release/net9.0/browser-wasm/AppBundle
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
Other information
No response
The text was updated successfully, but these errors were encountered: