Skip to content

[Problem/Bug]: WebView2 control in an UWP crashes the entire console on Xbox One #5404

@Pasquiindustry

Description

@Pasquiindustry

What happened?

Long story short: an app with a WebView2 crashes the entire system if run on a retail Xbox One

I'm having this strange issue. The crash is not just the app closing, is the entire console that restarts itself.

Where it happens?

❌ Xbox One retail mode -> Crashes the system
✔️ Xbox One dev mode -> No issue
✔️ Xbox Series X -> No issues
⚠️ Xbox Series S -> Mostly no issues, but I got some "Out of memory" messages and 1 crash registered on the Microsoft Store (STOWED_EXCEPTION_80004003). One notable thing is that, on retail, the WebView2 takes about 8 to 12 seconds to load a simple html page loaded with SetVirtualHostNameToFolderMapping. Note that the issue happens even without a SetVirtualHostNameToFolderMapping or EnsureCoreWebView2Async
✔️ Windows PC -> No issues
✔️ HoloLens -> No issues, apart from controls which is not the issue here.

Replicate the issue

I tried multiple variants to try to find the cause of the issue. Here's one of the simpliest:

  1. Make a new C# UWP app with Visual Studio
  2. Put the app as Release x64
  3. Wait for the NuGet packages to initialize
  4. Install Microsoft.UI.Xaml from NuGet
  5. Add the WebView2 to the project. I tried multiple ways which I will explain in the section below
  6. Associate the app to an identity on the Microsoft Store
  7. Create the appxupload
  8. Upload to the Microsoft Store
  9. Run on Xbox One. The app will crash

What I tried?

I tried most of these combinations and always got a crash on Xbox One

  • Using different versions of Microsoft.UI.Xaml. The default is 2.8.7 but also tried 2.8.6
  • Using different versions of Microsoft.Web.WebView2. Usually it's a transitive package stuck on version 1.0.2849, but it's also possible to install different versions, up to 1.0.3595, which I did without success. Also tried some older versions too.
  • Manually updated Microsoft.Windows.SDK.BuildTools to 10.0.26100.6901 and Microsoft.Windows.SDK.BuildTools.MSIX to 1.7.20250829.1. They're usually stuck at 10.0.22621.3233 and 1.3.20250314.1 and they can't be updated since both are implicit SDK references
  • Used Visual Studio 17.14 (latest version), 17.10 and 18.0.1
  • Made the app by using two templates "Empty UWP App" with .NET Native and AOT (.NET 9) and "Empty UWP App (.NET Native), which should be .NET 5?
  • Tried Visual Studio 2026. I opened the project made for 17.14 and updated it to .NET 10 (Microsoft.Windows.SDK.BuildTools -> 10.0.26100.4654, Microsoft.Windows.SDK.BuildTools.MSIX -> 1.7.20250806.1, the other packages to 10.0.0)
  • Supported OS Version. Tried 26100, 19041, 17763
  • Target OS Version. Tried both 26100 and 22621
  • Also released some packages made from scratch in a newly installed copy of Windows 11 with a newly installed copy of Visual Studio 2022 Community
  • Run the app without a WebView2 and by loading the WebView2 by clicking on a button: it works until the WebView2 gets loaded, than crashes
  • Run without the App.Current.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested; We can see the web cursor before the crash
  • Made packages with and without <Capability Name="internetClientServer"/>. <Capability Name="internetClient" /> is always present.
  • Tested with and without <WebView2LoaderPreference>Static</WebView2LoaderPreference> or <WebView2LoaderPreference>Static</WebView2LoaderPreference>
  • Tested with Environment.SetEnvironmentVariable("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", [...]), including these arguments: --disable-gpu --disable-gpu-driver-bug-workarounds --ignore-gpu-blocklist --msWebView2CancelInitialNavigation --no-first-run --RendererAppContainer --UseBackgroundNativeThreadPool
  • Tested with a control from Microsoft.UI.Xaml different than WebView2: no issue there. Only the WebView2 is crashing the system
  • The crash happens even with
public App()
{
    InitializeComponent();
    UnhandledException += App_UnhandledException;
    App.Current.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested;
    Suspending += OnSuspending;
}

private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
{
    e.Handled = true;
} 

Sample code

A bare minimum example that triggers the crash is available here https://github.com/Pasquiindustry/TestWV2CrashXbo

Here are some ways I used to load the WebView2

  • <controls:WebView2 x:Name="UiWebView"> inside the MainPage.xaml file or a "secondary" page
  • Added the new WebView2() to this.Content, both inside a Loaded function (Like MainPage_Loaded) and in a function called directly after InitializeComponent();

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

144.0.7505.0

SDK Version

from 1.0.2592.51 to 1.0.3595.46

Framework

WinUI2/UWP

Operating System

Xbox

OS Version

26100

Repro steps

Install and open a UWP app with just a WebView2 control inside. The app should open, but instead crashed itself or the entire console. Here's a repro project https://github.com/Pasquiindustry/TestWV2CrashXbo

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions