Skip to content

BlazorWebView may have compatibility issues with Android 12.0 and earlier. #32860

@kxt116

Description

@kxt116

Description

The official release of .NET 10 is an exciting milestone. I immediately tried to create a .NET 10 MAUI Blazor sample application to test it out. However, I was disappointed to find that the application did not function correctly in my testing environment.
To isolate the problem, I ran the sample app on multiple Android emulators with different OS versions. My tests revealed that the BlazorWebViewcomponent fails to work properly (manifesting as a white screen or content failing to load) on Android 11.0 (API 30)​ and Android 12.0 (API 31). In contrast, it functions as expected on Android 12.1 (API 32)​ and later versions.
I am unsure if this is caused by a specific configuration in my local environment or if it indicates a potential compatibility issue with .NET MAUI 10.0 itself. I would greatly appreciate any insight into the root cause of this behavior and guidance on how to resolve it.

Steps to Reproduce

1.Create a new project using the ".NET MAUI Blazor Hybrid App"​ template (the one that includes sample pages).

2.Build and deploy the application to an Android emulator running Android 12.0 (API 31)​ or an earlier version (e.g., Android 11.0 / API 30).

3.Launch the application on the emulator.

Expected Result:
The application loads correctly, displaying the sample Blazor content and UI without issues.

Actual Result:
The application fails to render the Blazor content properly.

Link to public reproduction project repository

No response

Version with bug

10.0.0

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 12.0 and earlier

Did you find any workaround?

No, I have not found any workaround. The application only functions correctly on Android 12.1 (API 32) and above.

Relevant log output

11-25 15:29:57.296 I/chromium( 5949): [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token '{'", source: https://0.0.0.1/_framework/blazor.webview.js (1)
11-25 15:29:57.362 I/chromium( 5949): [INFO:CONSOLE(2)] "Uncaught ReferenceError: Blazor is not defined", source: https://0.0.0.1/ (2)
11-25 15:29:58.569 D/EGL_emulation( 5949): app_time_stats: avg=146.35ms min=2.18ms max=1134.14ms count=9
11-25 15:30:02.257 D/ProfileInstaller( 5949): Installing profile for com.companyname.mauiapp1

Metadata

Metadata

Assignees

Labels

area-blazorBlazor Hybrid / Desktop, BlazorWebViewplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions