-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Description
After swapping the new default of "WasmEnableExceptionHandling" in net8.0 to false again, to support older versions of Chrome.
We are no longer able to start the webassembly app on an iOS device (v17.0.3 & latest).
Why we need it to be off in our case: A customer of ours runs Windows 7, where Chrome 109 is the latest, which forces to set this to false - otherwise we got a different error that the browser did not support the new wasm exception handling.
From my testing this has to do with a combination of AOT and WasmExceptionHandling.
The loading gets stuck on 100% when it starts to boot the WASM part.
Reproduction Steps
Base example: https://github.com/iXyles/net8-ios-aot-old-exception-handling/tree/6fac82b2e461e33b6f398e04f0e8a748dd7c6e46 & follow steps in ReadMe.
Otherwise:
- Create a new blazor webassembly standalone project
- Edit csproj to have:
<RunAOTCompilation>true</RunAOTCompilation>
<WasmEnableExceptionHandling>false</WasmEnableExceptionHandling>
<WasmEnableSIMD>false</WasmEnableSIMD> - Publish the project with Release.
- Host the published files
- Try open the webassembly app on an iOS device.
I have not tested on an iOS simulator, only a real device.
Loads fine on MacOS (latest)
Expected behavior
When setting WasmExceptionHandling to false with AOT it should still run on iOS safari as previous .net7.
Actual behavior
WASM app does not start as expected on iOS devices.
Regression?
Worked fine previously in net7.x when the exception handling was set to false by default.
Known Workarounds
Setting the Exception Handling to true (however as described above, it is not a case we can really do due to customer needs)
Configuration
iOS 17.0.3
iOS 17.2
Other information
[Warning] MONO_WASM: Exception marshalling result of JS promise to CS: – 39887112 (dotnet.runtime.8.0.0.2xhvpccfjq.js, line 3)
[Error] 39855392
___cxa_throw (dotnet.native.8.0.0.gg8ywv7cny.js:8:17161)
<?>.wasm-function[26725]
<?>.wasm-function[26488]
<?>.wasm-function[28891]
<?>.wasm-function[28266]
<?>.wasm-function[28272]
<?>.wasm-function[28296]
<?>.wasm-function[33942]
kr (dotnet.runtime.8.0.0.2xhvpccfjq.js:3:35395)
(anonymous function) (dotnet.runtime.8.0.0.2xhvpccfjq.js:3:208699)
Mr (dotnet.runtime.8.0.0.2xhvpccfjq.js:3:37421)
Pr (dotnet.runtime.8.0.0.2xhvpccfjq.js:3:37561)
Error from console when checking the web inspector with Safari on the device.