MicrosoftEdge / WebView2Feedback

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

[Problem/Bug]: Fixed Version runtime distribution mode opening folder Process Crashes Bug #4629

Open tangchaoliziyo opened 2 weeks ago

tangchaoliziyo commented 2 weeks ago

What happened?

When the application uses the Fixed Version runtime distribution mode, opening folder in the web page causes the application process to crash! The same HTML code performs normally in WebView2 runtime.

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

Microsoft.WebView2.FixedVersionRuntime.126.0.2592.56.x64

SDK Version

1.0.2535.41

Framework

Winforms

Operating System

Windows 10

OS Version

19045.4529

Repro steps

html click btn then the process crashes html code <input type="file" name="dirReport" id="dirReport" multiple="multiple" webkitdirectory mozdirectory /> exe net framework version: 4.6.2 windows net framework version: 4.8.09037

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

AB#51837269

tangchaoliziyo commented 2 weeks ago

open files no problem in Fixed Version runtime distribution mode <input type="file" name="fileReport" id="fileReport" multiple="multiple" />

victorhuangwq commented 2 weeks ago

The same HTML code performs normally in WebView2 runtime.

Do you mean that using the Evergreen WebView2 runtime with same version, 126.0.2592.56, it works?

LiangTheDev commented 2 weeks ago

Thanks for reporting the issue. I am able to repro the issue and created an internal tracking work item for it. Will update when it is addressed.

tangchaoliziyo commented 2 weeks ago

The same HTML code performs normally in WebView2 runtime.

Do you mean that using the Evergreen WebView2 runtime with same version, 126.0.2592.56, it works?

yes same code

LiangTheDev commented 2 weeks ago

@tangchaoliziyo are you sure that you are testing the app in the same way? I can only repro the issue with my app if I run it as admin. How did you test both cases (fixed version and evergreen WebView2)? Is the app a UWP app or a normal Winforms app? Is the app running as admin or as normal standard user when you test it?

tangchaoliziyo commented 1 week ago

@LiangTheDev winform 使用普通权限启动 这个问题我测试了好几台机器,Win10、win11自带有runtime 常青版不管使不使用代码设置固定版本网页打开文件夹都是正常的,但是没有安装过runtime的机器(Windows server 2019/2022数据中心)上用固定版本点击打开文件夹按钮后都会出现进程崩溃 设置固定版本代码: var browserExecutableFolder = $"{Application.StartupPath}\\x64";_webview.CreationProperties = new Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties(){BrowserExecutableFolder = browserExecutableFolder};

tangchaoliziyo commented 1 week ago

@LiangTheDev winform 使用普通权限启动 这个问题我测试了好几台机器,Win10、win11自带有runtime 常青版不管使不使用代码设置固定版本网页打开文件夹都是正常的,但是没有安装过runtime的机器(Windows server 2019/2022数据中心)上用固定版本点击打开文件夹按钮后都会出现进程崩溃 设置固定版本代码: var browserExecutableFolder = $"{Application.StartupPath}\\x64";_webview.CreationProperties = new Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties(){BrowserExecutableFolder = browserExecutableFolder};

也有可能是server系列的问题,我在winserver上安装常青版runtime后使用两种方式打开都会出现进程崩溃 错误模块名称: EmbeddedBrowserWebView.dll,版本: 126.0.2592.61,时间戳: 0x666d3606 异常代码: 0x4000001f 错误偏移量: 0x0025dff0 错误进程 ID: 0x2250 错误应用程序启动时间: 0x01dac2bee0dcff23 错误应用程序路径: C:\Users\Administrator\Desktop\新建文件夹\WebViewTest.exe

LiangTheDev commented 1 week ago

My test result is that there is no difference between evergreen runtime vs fixed runtime. The app process will crash if it is a UWP app, runs elevated or using visual hosting, and will not crash if it is not. On sever skus, it is likely that you were running the app elevated and therefore it crashed.

Anyway, I believe that that the crash I am seeing is the same crash you are seeing.