Closed Rippletank closed 11 months ago
Ok, after looking again with fresh eyes and getting hold of the typescript files, I have found the error.
"JSExport with multi-threading enabled is not supported with assembly ${assembly} as it was generated with the .NET 7 SDK" for assembly = Uno.WASM.MetadataUpdate
As I am digging into the unknown (for me), I'm putting this here as it seems like it might make sense to someone more knowledgeable. Meanwhile, I can't immediately see where this assembly is coming from so I will keep digging.
Workaround: Unsuccessfully, tried to find a way to disable hot-reload before the app is loaded in debug mode, but Release mode works properly without an error.
Thanks for the report.
We'll likely need to build this project with net8 instead.
Thanks, can confirm the using latest builds (dev.3455) app now runs fully in debug mode with threading.
However, just for information, when multithreading is enabled, breakpoints are not hit and the browser window is disconnected from the server. The only difference in terms of console messages is the following error in multithreaded mode:
Unable to set option 'no-jiterpreter-traces-enabled' as it's read-only. dotnet.native.js
I'm guessing that's a dotnet issue, though. Work arounds are just console debugging or switching off multithreading temporarily, but at least with shorter compile times of debug mode.
UnoWASMnet80Threading.zip
Current behavior
A simple .net8.0, WASM only solution created using the latest template (according to uno-check) with all of the uno and Microsoft packages updated to latest dev/rc releases.
With no multithreading, the app starts ok.
With threading enabled using
<WasmShellEnableThreads>true</WasmShellEnableThreads>
startup aborts at line 359 of uno-bootstrap.jsawait this.setupHotReload()
The error appears to be at line 63:
let exports = await getAssemblyExports("Uno.Wasm.MetadataUpdater");
with error, "Could not load content for file:///D:/a/Uno.DotnetRuntime.WebAssembly/Uno.DotnetRuntime.WebAssembly/runtime/src/mono/wasm/runtime/invoke-cs.ts (System error: net::ERR_FILE_NOT_FOUND)"Expected behavior
Expected behaviour is for the threaded version to load fully as with the unthreaded version.
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
Affected platforms
WebAssembly
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response