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

[MAUI] .NET 9 GA BlazorWebView not rendering on ARM64 Windows Desktop #26003

Closed
dcuccia opened this issue Nov 20, 2024 · 19 comments
Closed

[MAUI] .NET 9 GA BlazorWebView not rendering on ARM64 Windows Desktop #26003

dcuccia opened this issue Nov 20, 2024 · 19 comments
Assignees
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView blocked Work that is currently blocked i/regression This issue described a confirmed regression on a currently supported version partner/winui WinUI / Project Reunion platform/windows 🪟 regressed-in-9.0.0 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@dcuccia
Copy link

dcuccia commented Nov 20, 2024

🚨 Fix/workaround is here.

Description

I'm unable to properly render the Blazor Hybrid template for Windows Desktop on my new ARM64 machine (Snapdragon X Elite Thinkpad T14s Gen 6):

Image

The web version runs fine:

Image

...and it works fine on my Intel x64 desktop:

Image

I've installed the GA .NET 9 SDK and run dotnet workload update (VS 2022, VS 2022 Preview, and VS code + MAUI extension all up to date). I haven't (yet) experimented with any updating/replacing the built-in WebView2.

Here's a dump of info:

OsName OsArchitecture WindowsVersion WindowsBuildLabEx
Microsoft Windows 11 Pro ARM 64-bit Processor 2009 26100.1.arm64fre.ge_release.240331-1435
Installed Workload Id Manifest Version Installation Source
android 35.0.7/9.0.100 SDK 9.0.100, VS 17.13.35507.96, VS 17.12.35514.174
aspire 8.2.2/8.0.100 SDK 9.0.100, VS 17.13.35507.96
ios 18.0.9617/9.0.100 SDK 9.0.100, VS 17.13.35507.96, VS 17.12.35514.174
maccatalyst 18.0.9617/9.0.100 SDK 9.0.100, VS 17.13.35507.96, VS 17.12.35514.174
maui-windows 9.0.0/9.0.100 SDK 9.0.100, VS 17.13.35507.96, VS 17.12.35514.174
wasm-tools 9.0.0/9.0.100 VS 17.12.35514.174

VS 2022 Info:

Microsoft Visual Studio Community 2022 (2)
Version 17.12.1
VisualStudio.17.Release/17.12.1+35514.174
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2022   00482-90000-00000-AA885
Microsoft Visual C++ 2022

ASP.NET and Web Tools   17.12.178.10385
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.12.178.10385
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   17.12.178.10385
Azure Functions and Web Jobs Tools

C# Tools   4.12.0-3.24558.5+21192bfc323cbdd5a1f6e5dadca56ef0558c8adf
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Extensibility Message Bus   1.4.42 (main@840f8b3)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

GitHub Copilot   17.12.31.40377
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Node.js Tools   1.5.60927.1 Commit Hash:34ed3f8d94747ae6aeaeadb9ccb1dd51411eba1a
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   6.12.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.12.3.2451803+13fe97052e82683ec4c9fc916531eba5c751037f
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.12.78.0
Microsoft SQL Server Data Tools

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools   17.0.30918.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.12.0-3.24558.5+21192bfc323cbdd5a1f6e5dadca56ef0558c8adf
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.12.0-beta.24501.1+19610c0b654766eec49d044cb97ca6eaa2a63d16
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

VSPackage Extension   1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin   17.12.0.153 (d17-12@1d0906d)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.12.3.17 (remotes/origin/main@0912a005b9)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK   13.2.2.0 (d17-5/45b0e14)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: d9a6e87
    Java.Interop: xamarin/java.interop/d17-5@149d70fe
    SQLite: xamarin/sqlite/3.40.1@68c69d8
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

Steps to Reproduce

  1. Create a new .NET MAUI Blazor Hybrid + Web app using Visual Studio (e.g., File > New Project > .NET MAUI Blazor App).
  2. Build and run the app on a Windows ARM64 machine.
  3. Observe that the app window loads but the BlazorWebView content does not render.

Link to public reproduction project repository

No response

Version with bug

9.0.0 GA

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

net9.0-windows10.0.19041.0

Did you find any workaround?

No

Relevant log output

**********************************************************************
** Visual Studio 2022 Developer PowerShell v17.12.1
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS C:\Users\dcucc\source\repos\MauiApp2\MauiApp3\MauiApp3> dotnet run --verbosity diagnostic --framework net9.0-windows10.0.19041.0
Using launch settings from C:\Users\dcucc\source\repos\MauiApp2\MauiApp3\MauiApp3\Properties\launchSettings.json...
C:\Program Files\dotnet\sdk\9.0.100\MSBuild.dll -nologo -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\9.0.100\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\9.0.100\dotnet.dll -maxcpucount -target:Restore -tlp:default=auto -tlp:verbosity=quiet -verbosity:m -verbosity:diagnostic C:\Users\dcucc\source\repos\MauiApp2\MauiApp3\MauiApp3\MauiApp3.csproj
  C:\Users\dcucc\source\repos\MauiApp2\MauiApp3\MauiApp3\MauiApp3.csproj               Restore (0.0s)


  MauiApp3 net9.0-windows10.0.19041.0 succeeded (10.6s) → bin\Debug\net9.0-windows10.0.19041.0\win10-arm64\MauiApp3.dll


Build succeeded in 11.2s


DxDiag: 

------------------
System Information
------------------
      Time of this report: 11/20/2024, 13:48:01
             Machine name: DCUCCIA-QUALCOM
               Machine Id: {C7EFF584-853B-4D26-9580-445AA5A46CC0}
         Operating System: Windows 11 Pro 64-bit (10.0, Build 26100) (26100.ge_release.240331-1435)
                 Language: English (Regional Setting: English)
      System Manufacturer: LENOVO
             System Model: 21N10001US
                     BIOS: N42ET83W (2.13 ) (type: UEFI)
                Processor: Snapdragon(R) X Elite - X1E78100 - Qualcomm(R) Oryon(TM) CPU (12 CPUs), ~3.4GHz
                   Memory: 32768MB RAM
      Available OS Memory: 32318MB RAM
                Page File: 33180MB used, 2080MB available
              Windows Dir: C:\Windows
          DirectX Version: DirectX 12
      DX Setup Parameters: Not found
         User DPI Setting: 144 DPI (150 percent)
       System DPI Setting: 144 DPI (150 percent)
          DWM DPI Scaling: UnKnown
                 Miracast: Available, with HDCP
Microsoft Graphics Hybrid: Not Supported
 DirectX Database Version: 1.6.2
   Auto Super Res Version: 1.0.6.0
       System Mux Support: Mux Support Inactive - Ok
           Mux Target GPU: dGPU
           DxDiag Version: 10.00.26100.2161 64bit Unicode

------------
DxDiag Notes
------------
      Display Tab 1: No problems found.
        Sound Tab 1: No problems found.
          Input Tab: No problems found.

--------------------
DirectX Debug Levels
--------------------
Direct3D:    0/4 (retail)
DirectDraw:  0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay:  0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow:  0/6 (retail)

---------------
Display Devices
---------------
           Card name: Qualcomm(R) Adreno(TM) X1-85 GPU
        Manufacturer: Qualcomm Incorporated
           Chip type: Qualcomm(R) Adreno(TM) Graphics
            DAC type: InternalDAC
         Device Type: Full Device (POST)
          Device Key: Enum\ACPI\VEN_QCOM&DEV_0C36&SUBSYS_233817AA&REV_0086
       Device Status: 0180200A [DN_DRIVER_LOADED|DN_STARTED|DN_DISABLEABLE|DN_NT_ENUMERATOR|DN_NT_DRIVER] 
 Device Problem Code: No Problem
 Driver Problem Code: Unknown
      Display Memory: 16286 MB
    Dedicated Memory: 128 MB
       Shared Memory: 16158 MB
        Current Mode: 1920 x 1200 (32 bit) (60Hz)
         HDR Support: Not Supported
    Display Topology: Internal
 Display Color Space: DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
     Color Primaries: Red(0.639648,0.330078), Green(0.299805,0.599609), Blue(0.150391,0.059570), White Point(0.313477,0.329102)
   Display Luminance: Min Luminance = 4.000000, Max Luminance = 400.000000, MaxFullFrameLuminance = 400.000000
        Monitor Name: Wide viewing angle & High density FlexView Display 1920x1200
       Monitor Model: unknown
          Monitor Id: LEN403A
         Native Mode: 1920 x 1200(p) (60.001Hz)
         Output Type: Internal
Monitor Capabilities: HDR Not Supported
Display Pixel Format: DISPLAYCONFIG_PIXELFORMAT_32BPP
      Advanced Color: Not Supported
      Using DDisplay: Yes
                 WCG: Wcg Not Supported
   Active Color Mode: DISPLAYCONFIG_ADVANCED_COLOR_MODE_SDR
         Driver Name: <>,C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_96d6d57fa7aa1310\qcdx11arm64xum.dll,C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_96d6d57fa7aa1310\qcdx11arm64xum.dll,C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_96d6d57fa7aa1310\qcdx12arm64xum.dll
 Driver File Version: 31.00.0074.0000 (English)
      Driver Version: 31.0.74.0
         DDI Version: 12
  Adapter Attributes: HARDWARE_TYPE_GPU,D3D11_GRAPHICS,D3D12_GRAPHICS,D3D12_CORE_COMPUTE,D3D12_GENERIC_ML,D3D12_GENERIC_MEDIA
      Feature Levels: 12_1,12_0,11_1,11_0,10_1,10_0,9_3,9_2,9_1,1_0_CORE
        Driver Model: WDDM 3.1
 Hardware Scheduling: DriverSupportState:AlwaysOff Enabled:False 
         Displayable: Supported 
 Graphics Preemption: DMA
  Compute Preemption: DMA
            Miracast: Not Supported by Graphics driver
      Detachable GPU: No
 Hybrid Graphics GPU: Integrated
     GPU Mux Support: None, Uninitialized - Unknown Error
      Power P-states: Not Supported
      Virtualization: Paravirtualization 
          Block List: No Blocks
  Catalog Attributes: Universal:True Declarative:True 
   Driver Attributes: Final Retail
    Driver Date/Size: 9/10/2024 4:00:00 PM, 17993704 bytes
         WHQL Logo'd: Yes
     WHQL Date Stamp: Unknown
   Device Identifier: {9AF84DB1-0070-27FC-8250-791F29C2D235}
           Vendor ID: 0x4D4F4351
           Device ID: 0x36334330
           SubSys ID: 0x41413731
         Revision ID: 0x0086
  Driver Strong Name: oem320.inf:e1a2240ecc800cae:QCDX_Inst_Base.NT:31.0.74.0:ACPI\VEN_QCOM&DEV_0C36&SUBSYS_233817AA&REV_0086
      Rank Of Driver: 00D10000
         Video Accel: 
         DXVA2 Modes: DXVA2_ModeH264_VLD_NoFGT  DXVA2_ModeHEVC_VLD_Main  DXVA2_ModeHEVC_VLD_Main10  DXVA2_ModeVP9_VLD_Profile0  DXVA2_ModeVP9_VLD_10bit_Profile2  {B8BE4CCB-CF53-46BA-8D59-D6B8A6DA5D2A}  {129F7B40-5C5B-48E5-8178-48C0CEA05A90}  {886348BD-B400-4378-A5AE-654ADC0947DC}  {4B3A8728-6585-4675-955E-D692AC71EE07}  {BDB6AC4F-8D9C-44F7-9731-52761C4924A9}  
         D3D12 Encode Modes: 
    Deinterlace Caps: {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(UYVY,UYVY) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YV12,0x32315659) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YV12,0x32315659) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC1,0x31434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC1,0x31434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC2,0x32434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC2,0x32434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC3,0x33434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC3,0x33434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC4,0x34434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC4,0x34434d49) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(S340,0x30343353) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(S340,0x30343353) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
                      {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(S342,0x32343353) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend 
                      {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(S342,0x32343353) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBLineReplicate 
        D3D9 Overlay: Not Supported
             DXVA-HD: Supported
        DDraw Status: Enabled
          D3D Status: Enabled
          AGP Status: Enabled
       MPO MaxPlanes: 9
            MPO Caps: VERTICAL_FLIP,HORIZONTAL_FLIP,RGB,YUV,STRETCH_YUV,STRETCH_RGB,HDR (MPO3)
         MPO Stretch: 20.000X - 0.250X
     MPO Media Hints: resizing, colorspace Conversion 
         MPO Formats: NV12
                          YCBCR_STUDIO_G22_LEFT_P601
                          YCBCR_FULL_G22_LEFT_P601
                          YCBCR_STUDIO_G22_LEFT_P709
                          YCBCR_FULL_G22_LEFT_P709
                          YCBCR_STUDIO_G22_LEFT_P2020
                          YCBCR_FULL_G22_LEFT_P2020
                          YCBCR_STUDIO_G22_TOPLEFT_P2020
                      P010
                          YCBCR_STUDIO_G22_LEFT_P601
                          YCBCR_FULL_G22_LEFT_P601
                          YCBCR_STUDIO_G22_LEFT_P709
                          YCBCR_FULL_G22_LEFT_P709
                          YCBCR_STUDIO_G22_LEFT_P2020
                          YCBCR_FULL_G22_LEFT_P2020
                          YCBCR_STUDIO_G22_TOPLEFT_P2020
                      R16G16B16A16_FLOAT
                          RGB_FULL_G10_NONE_P709
                      R8G8B8A8_UNORM
                          RGB_FULL_G22_NONE_P709
                          RGB_STUDIO_G22_NONE_P709
                          RGB_STUDIO_G22_NONE_P2020
                          RGB_FULL_G2084_NONE_P2020
                          RGB_STUDIO_G2084_NONE_P2020
                          RGB_FULL_G22_NONE_P2020
                          RGB_STUDIO_G24_NONE_P709
                          RGB_STUDIO_G24_NONE_P2020
                      B8G8R8A8_UNORM
                          RGB_FULL_G22_NONE_P709
                          RGB_STUDIO_G22_NONE_P709
                          RGB_STUDIO_G22_NONE_P2020
                          RGB_FULL_G2084_NONE_P2020
                          RGB_STUDIO_G2084_NONE_P2020
                          RGB_FULL_G22_NONE_P2020
                          RGB_STUDIO_G24_NONE_P709
                          RGB_STUDIO_G24_NONE_P2020
    PanelFitter Caps: VERTICAL_FLIP,HORIZONTAL_FLIP,RGB,YUV,STRETCH_YUV,STRETCH_RGB,HDR (MPO3)
 PanelFitter Stretch: 20.000X - 0.250X
   Extension Drivers: 
             Driver Name: C:\Windows\System32\DriverStore\FileRepository\qcdxext_crd8380.inf_arm64_206a6ee314c1f659\qcdxext_crd8380.inf
          Driver Version: 1.05.74.0
             Driver Date: 09/11/2024
         Driver Provider: Qualcomm Incorporated
      Catalog Attributes: Universal:False Declarative:True 
   Component Drivers: 
             Driver Name: Unknown
          Driver Version: Unknown
             Driver Date: Unknown
         Driver Provider: Unknown
      Catalog Attributes: N/A
@dcuccia dcuccia added the t/bug Something isn't working label Nov 20, 2024
@dcuccia
Copy link
Author

dcuccia commented Nov 20, 2024

Also, FWIW, attempting to install WebView2 from here fails:

Image

@dcuccia
Copy link
Author

dcuccia commented Nov 20, 2024

A C++ console app w/ Nuget package Microsoft.Web.WebView2 (version 1.0.2903.40) yields the following:

WebView2 Runtime version: 130.0.2849.80

Here's the code:

#include <iostream>
#include <windows.h>
#include <wrl.h>
#include "WebView2.h"

int main()
{
    // Initialize COM library
    HRESULT hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
    if (FAILED(hr))
    {
        std::cerr << "Failed to initialize COM library. HRESULT: " << hr << std::endl;
        return 1;
    }

    // Get the WebView2 Runtime version
    LPWSTR versionInfo = nullptr;
    hr = GetAvailableCoreWebView2BrowserVersionString(nullptr, &versionInfo);

    if (SUCCEEDED(hr) && versionInfo != nullptr)
    {
        std::wcout << L"WebView2 Runtime version: " << versionInfo << std::endl;
        CoTaskMemFree(versionInfo);
    }
    else
    {
        std::cerr << "WebView2 Runtime not found or failed to retrieve version. HRESULT: " << hr << std::endl;
    }

    // Uninitialize COM library
    CoUninitialize();
    return 0;
}

@PureWeen PureWeen added platform/windows 🪟 area-blazor Blazor Hybrid / Desktop, BlazorWebView labels Nov 21, 2024
@dcuccia dcuccia changed the title .NET 9 GA BlazorWebView not rendering on ARM64 Windows Desktop [MAUI] .NET 9 GA BlazorWebView not rendering on ARM64 Windows Desktop Nov 22, 2024
@mkArtakMSFT mkArtakMSFT added this to the .NET 10 Planning milestone Nov 25, 2024
@mkArtakMSFT
Copy link
Member

Thanks for contacting us.
Can you by any chance try out hosting Blazor WebView in a Windows Forms app and run on the same machine, to see whether that works or not? You can learn how to do that here: https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/tutorials/windows-forms?view=aspnetcore-9.0

@mkArtakMSFT mkArtakMSFT added s/needs-info Issue needs more info from the author and removed s/needs-info Issue needs more info from the author labels Nov 25, 2024
@dcuccia
Copy link
Author

dcuccia commented Nov 25, 2024

@mkArtakMSFT great idea, sorry I didn't think of that. Seems that the WinForms version works fine:

Image

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version labels Nov 27, 2024
@ninachen03
Copy link

This issue has been verified using Visual Studio 17.13.0 Preview 1.0 (9.0.10&9.0.0 ). Can repro on Windows platform. but can't repro in 8.0.100 by the way, Debug breaks from 9.0.0-rc.2.24503.2 to 9.0.0-preview.1.9973, so we can't verify it. and verify it on 8.0.100

@atanubanerjee
Copy link

I see the same behavior. BlazorWebView doesn't render with .Net 9 GA on an ARM4 laptop. This does render if I build the same BlazorHybrid Maui app with .Net 8. IIRC this app used to work fine with .Net 9 RC1 and RC2, and so possibly this is a regression from .Net 9 RC2 to GA.

@dcuccia
Copy link
Author

dcuccia commented Dec 11, 2024

Bumping this. MAUI Hybrid is broken on Qualcomm Snapdragon AI PCs, and it had worked in RC2...

@atanubanerjee
Copy link

Any update on when this is likely to get fixed?

@codemonkey85
Copy link

I too am seeing this issue on a new Surface Pro Laptop 7.

@mattleibow
Copy link
Member

Does a normal WebView control work in MAUI? Does a WebView control work in a plain WinUI application?

@mattleibow
Copy link
Member

I know for some part of .NET 9, the webview component was updated, so it is packaged differently and may be the reason.

@jfversluis
Copy link
Member

I closed 2 duplicate issues, so lets keep the discussion centralized here. In one of the issues I saw a comment that mentions

My problem was that we had AnyCPU in the csproj.

@dhindrik can you be a bit more specific? Where did you see it and what edit did you make? Can more people confirm this works?

@o-l-i-g
Copy link

o-l-i-g commented Feb 12, 2025

Hey @jfversluis thanks for efforts of putting issues into a central place.

Thanks to you linking the comment, I gave it ago and the good news is changing the configuration from AnyCPU to ARM64 DOES fix the issue.

My setup
I'm using MacBookPro (M3 chip), using Parallels to run Arm64 Windows 11 and visual studio inside of that. So I'm on apple silicon.

Steps I took
Using VS for windows, I created a MAUI Blazor hybrid app with web (this issue happens for both with or without webapp).

By default VS looks like this with one configuration.

Image

If you debug or run without debug with this, you get this:

Image

So I created a new configuration for arm64

Image

Image

Image

and voila it's working (interaction works, hot reload works). Thanks @dhindrik and @@jfversluis !

Image

Just an additional FYI, I only needed to specify the platform in the MAUI project:

Image

@dcuccia
Copy link
Author

dcuccia commented Feb 12, 2025

This is great, thanks @o-l-i-g for confirming! Wonder what the root cause is in the MAUI build system, and why the automated regression testing didn't catch it.

@atanubanerjee
Copy link

atanubanerjee commented Feb 12, 2025

I verified that @o-l-i-g's workaround (new ARM64 configuration) solved both this issue, as well as the related issue #26116, for me. I tested this with an existing .Net 9 solution containing both a .Net Maui Blazor Hybrid project as well as a .Net Maui project containing a lot of HybridWebView controls. I also verified this on two different machines - a Windows ARM laptop as well as a Mac Mini running Windows ARM through Parallels. Before testing this I updated Windows 11 and Visual Studio 2022, and on the Mac Mini (but not the Windows ARM laptop) I had to do a clean / rebuild for this to work.

Hopefully the documentation will be updated to include this setup step for those running Windows on ARM.

@mattleibow
Copy link
Member

AnyCPU is the correct way, I believe there is an issue in the new webview2 nuget package as it is not including the correct binaries.

I will investigate.

@mattleibow mattleibow self-assigned this Feb 13, 2025
@mattleibow mattleibow moved this from Todo to In Progress in MAUI SDK Ongoing Feb 13, 2025
@mattleibow
Copy link
Member

mattleibow commented Feb 14, 2025

Found the issue, there is a missing condition in the WebVIew2 targets for ARM64: MicrosoftEdge/WebView2Feedback#5104

I believe the workaround until we get a fix is to explicitly set ARM64 as the platform when running on ARM:

<Platform Condition="$(TargetFramework.Contains('-windows')) and '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'arm64'">arm64</Platform>

@mattleibow mattleibow added partner/winui WinUI / Project Reunion blocked Work that is currently blocked labels Feb 14, 2025
@mattleibow
Copy link
Member

The regression occurred because older versions of the WASDK included the WebView2 components as part of their package. In the later versions, it is a separate NuGet with its own targets.

So, this is rather an existing issue in an older package that is now used instead of WASDK duplicating the files. Hopefully we get a fix soon.

@mattleibow
Copy link
Member

MicrosoftEdge/WebView2Feedback#5104 (comment)

Windows App SDK 1.7 Preview 1 release will contain an updated WebView2 package reference (v1.0.2903.40) with a fix for this issue. A workaround is to add an explicit reference to a recent WebView2 package.

@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView blocked Work that is currently blocked i/regression This issue described a confirmed regression on a currently supported version partner/winui WinUI / Project Reunion platform/windows 🪟 regressed-in-9.0.0 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

10 participants