Skip to content
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

Stock Blazor standalone app with AOT compilation enabled fails to load in up-to-date Chrome when the host OS is Linux #110056

Open
1 task done
kmk-irc opened this issue Nov 21, 2024 · 0 comments
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners untriaged New issue has not been triaged by the area owner

Comments

@kmk-irc
Copy link

kmk-irc commented Nov 21, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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

  1. Create a new app from the stock Blazor Standalone template in Visual Studio.
  2. Enable AOT compilation.
  3. Add an appsettings.json file.
  4. Publish and deploy the app to a web host.
  5. Access the app from Chrome running on a Linux host OS (ChromeOS, Ubuntu, Mint, ect), but not Android, which doesn't appear to have this issue.

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)

@javiercn javiercn transferred this issue from dotnet/aspnetcore Nov 21, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

1 participant