Wasm App Do Not Start On Nightly Build #14821
Replies: 7 comments 1 reply
-
Add
with
In your |
Beta Was this translation helpful? Give feedback.
-
This will be documented in a 11.1 changelog. But in general, is caused by .NET 8 WASM SDK breaking changes, which were avoided in 11.0, but not in 11.1. |
Beta Was this translation helpful? Give feedback.
-
You also should replace |
Beta Was this translation helpful? Give feedback.
-
Hello Max, import { dotnet } from './_framework/dotnet.js'
const is_browser = typeof window != "undefined";
if (!is_browser) throw new Error(`Expected to be running in a browser`);
const dotnetRuntime = await dotnet
.withDiagnosticTracing(false)
.withApplicationArgumentsFromQuery()
.create();
const config = dotnetRuntime.getConfig();
await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]); i get the same problem. if i change the
to
then my first problem has been fixed, but dispatcher problem still kind of persists. Dispatcher seems to be working now breakpoint hits it. The problem is, it doesn't change the ui when i raise some changes.
and this is the mainview.
maybe it is related with AttachedToVisualTree event? you can not invoke the dispatcher from AttachedToVisualTree event? cause it seems it works when i add the same method to mainviewmodel constructor? |
Beta Was this translation helpful? Give feedback.
-
Try Post instead of InvokeAsync |
Beta Was this translation helpful? Give feedback.
-
Yes it works with Post, @timunie. thank you. |
Beta Was this translation helpful? Give feedback.
-
async will be on a different thread and thus notifications don't work correctly afaik. So better Post unless InvokeAsync reaaaly needed. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Hello when i want to try the latest nightly build and test it on web assembly, on console it throws an error
MONO_WASM: Failed to load config file ./blazor.boot.json SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input at https://localhost:5001/dotnet.js:3:25380 at https://localhost:5001/dotnet.js:3:25808 at async https://localhost:5001/dotnet.js:3:25082 at async https://localhost:5001/dotnet.js:3:24942 at async Object.create (https://localhost:5001/dotnet.js:3:34517) at async https://localhost:5001/main.js:6:23 Error: Failed to load config file ./blazor.boot.json SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input at https://localhost:5001/dotnet.js:3:25380 at https://localhost:5001/dotnet.js:3:25808 at async https://localhost:5001/dotnet.js:3:25082 at async https://localhost:5001/dotnet.js:3:24942 at async Object.create (https://localhost:5001/dotnet.js:3:34517) at async https://localhost:5001/main.js:6:23 at https://localhost:5001/dotnet.js:3:26612 at async https://localhost:5001/dotnet.js:3:24942 at async Object.create (https://localhost:5001/dotnet.js:3:34517) at async https://localhost:5001/main.js:6:23
dotnet.js:3Uncaught Error: Failed to load config file ./blazor.boot.json SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input
dotnet.js:35Uncaught (in promise) Error: Failed to load config file ./blazor.boot.json SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input
To Reproduce
Create a new xplat test application
Expected behavior
run normally
Screenshots
Environment
11.1.999-cibuild0045495-beta
MORE
The reason i wanted to try the latest nightly build was i having another problem with the version 11.1.999-cibuild0043825-beta
If you add Dispatcher.InvokeAsync() it stucks on splash screen. So i wanted to try the 11.1.999-cibuild0045495-beta then i got thiserror. By the way everything works fine with .net 8.0 and stable version 11.0.6. But since my app use some bug fixes for ios i didn't want to use the stable version. If you have any insight about the Dispatcher problem i would like to hear that too. Thank you for the assistance.
Beta Was this translation helpful? Give feedback.
All reactions