Stock Blazor standalone app with AOT compilation enabled fails to load in up-to-date Chrome when the host OS is Linux #110056
Labels
arch-wasm
WebAssembly architecture
area-VM-meta-mono
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
os-browser
Browser variant of arch-wasm
untriaged
New issue has not been triaged by the area owner
Is there an existing issue for this?
Describe the bug
It was recently discovered that our existing standalone Blazor app, with AOT compilation enabled, was failing to load on Chromebooks, which my employer uses exclusively to run this particular app in its healthcare clinics. After much trial and error, the only resolution we were able to find was to disable AOT compilation.
When AOT is enabled, the only error that appears in the Chrome Developer Tools Console is the following:
Error: AggregateException_ctor_DefaultMessage (InvalidCharacterWithinString, 0x0D LineNumber: 1 | BytePositionInLine: 19.)
at Jn (dotnet.runtime.js:3:31615)
at Ll (dotnet.runtime.js:3:182497)
at dotnet.native.wasm:0x19f867
at dotnet.native.wasm:0x1a11e4
at dotnet.native.wasm:0x1a684b
at dotnet.native.wasm:0x5279d2
at dotnet.native.wasm:0x6872f2
at dotnet.native.wasm:0x6a43f6
at dotnet.native.wasm:0x683c64
at dotnet.native.wasm:0x677047
I was able to determine that the file the runtime is trying and failing to read is the app's appsettings.json file.
As a further test, I attempted to access the app with the latest version of Chrome (at the time of this writing) but from within an Ubuntu VM. The same error occurs there as well.
Furthermore, to ensure this wasn't just an issue with our app, I created a new app from the stock Blazor Standalone template in Visual Studio (17.12.0) and enabled AOT compilation. The only thing I added to this project is an appsettings.json file. I attempted to access this app from an up to date Chromebook and the Ubuntu VM. Both result in the same error. Curiously, the error does not occur in Chrome running on Android.
The stock Blazor application I tested with can be found here:
https://ibsvc2.droidspot.com/
Expected Behavior
Chrome running on a Linux host OS should be able to load a Blazor standalone app when AOT compilation is enabled.
Steps To Reproduce
Exceptions (if any)
No response
.NET Version
8.0.11 & 9.0.100
Anything else?
This issue appears in both the latest versions of .NET 8 and .NET 9 (8.0.11 & 9.0.100)
The text was updated successfully, but these errors were encountered: