MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
450 stars 54 forks source link

WebView2 freezes (does not load) and Windows Defender uses all CPU #4345

Open maxschaf opened 8 months ago

maxschaf commented 8 months ago

What happened?

We used the winforms sample of https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WindowsFormsBrowser for .Net Framework 4.8 runtime.

The window freezes and msmpeng.exe uses all Cpu until webview2 process is closed.

Seems to be related to KB5034129 and Windows Server 2022 inplace upgrade. We have at least two machines with this issue. But Edge Browser worked.

We found out, that removing the regkey - [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedgewebview2.exe] resolved it.

See https://techcommunity.microsoft.com/t5/windows-server-for-it-pro/faulty-patches-on-server-2022/m-p/4028125

So, do you fix this for us or do we need to remove the regkey on all machines? Is this a WebView2 or a Windows issue?

image image

processdump: https://intactconsult-my.sharepoint.com/:f:/g/personal/maximilian_schafzahl_intact-systems_com/Evt38V1mhd1Ko1YG6lg_MCABp462mYwAzmkCRt1pMcoThQ?e=nYNpvW

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

121.0.2277.98

SDK Version

2357.0

Framework

Winforms

Operating System

Windows Server

OS Version

20348.2227

Repro steps

Just run any application with WebView2 on Windows Server 2022.

Repros in Edge Browser

No

Regression

Regression in newer Runtime

Last working version (if regression)

No response

lflores-ms commented 8 months ago

Hi @maxschaf, thanks for your report! We are aware of this issue and a fix has been made. This should come as a Windows update. In the meantime, the mitigation you have suggested here is the recommended mitigation.

Thanks, Luis