How to fix failing WebView calls

Moshe Raab, PhD 241 Reputation points
2026-07-23T09:33:25.4566667+00:00

i wrote a MAUI app using Visual Studio that seems to have a problem on older android devices.

I think the problem may have something to do with the WebView because that is where it seems to fail. the app loads but when WebView is called the app just closes but seems to be in the background

I know that the app works correctly on the devices with config:

One UI version 8.5

Android version 16

Kernel Version 6.6.98

Android System WebView Version 150.7871.124

But does not work on

One UI version 8.5

Android version 16

Kernel Version 5.15.89

Android System WebView Version 150.7871.46

any ideas or suggestions?

Developer technologies | .NET | .NET Multi-platform App UI
0 comments No comments

3 answers

Sort by: Most helpful
  1. Moshe Raab, PhD 241 Reputation points
    2026-07-24T10:06:02.7433333+00:00

    Thank you for your speedy answers. much appreciated!

    i found another device with the same problem, except this one had an updated WebView: 150.7871.124 like the other devices that worked.

    I updated chrome, but still have the same problem.

    i attached the debug log from the second before the problem is started, if that helps debug.txt

    Was this answer helpful?

    0 comments No comments

  2. Nancy Vo (WICLOUD CORPORATION) 7,825 Reputation points Microsoft External Staff Moderator
    2026-07-23T10:21:26.5166667+00:00

    Hello @Moshe Raab, PhD ,

    Thanks for your question.

    The app closing unexpectedly to the background may be caused by a graphics rendering conflict with the older kernel version or a bug in the outdated Android System WebView app.

    You can refer to try to following approaches:

    First, please try to have the device user open the Google Play Store and update the Android System WebView application to the newest version.

    If updating the device is not an option, you can modify your MAUI app to use software rendering for the WebView. You can add the following code to your MauiProgram.cs file to customize the Android handler:

    #if ANDROID
    Microsoft.Maui.Handlers.WebViewHandler.Mapper.AppendToMapping("DisableHardwareAcceleration", (handler, view) =>
    {
        handler.PlatformView.SetLayerType(Android.Views.LayerType.Software, null);
    });
    #endif
    

    Please note that using software rendering instead of hardware acceleration may result in lower WebView performance. I recommend applying this workaround conditionally (for example, only for specific device models or configurations experiencing the crash) so that it does not degrade the experience for all users on newer devices.

    For more information on how to customize native controls using handlers, you can review Customize controls with handlers.

    Please try and let me know if it works. I'd be happy to investigate further if needed.

    I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback. Thank you.

    Was this answer helpful?

    0 comments No comments

  3. AI answer

    2026-07-23T09:33:44.48+00:00

    For older Android devices, start by treating this as an Android WebView component issue rather than a MAUI setting issue.

    1. Update Android System WebView on the failing device.
      • Open Play Store.
      • Search for Android System WebView.
      • Install the latest update.
    2. Update Google Chrome on the failing device.
      • In Play Store, search for Google Chrome.
      • Install the latest update.
    3. Re-test the app after both updates.
      • The documented Android WebView issue can cause apps that depend on WebView to crash on launch or when WebView is used.
      • Since the failing device has an older Android System WebView build (150.7871.46) than the working device (150.7871.124), updating WebView is the first check.
    4. If remote debugging is being used for diagnosis, make sure WebView debugging is enabled before the WebView loads.
      • Call SetWebContentsDebuggingEnabled(true) before the WebView is loaded.
      • Verify the #if DEBUG directive is active for the debug build.

    The supported guidance in the available documentation is to update Android System WebView and Google Chrome when WebView-related crashes occur on Android.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.