MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Crash on "Page.fileChooserOpened" event callback
@LiangTheDev is already working on this.
Since Sep 2, 2022.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
await WebView2.CoreWebView2.CallDevToolsProtocolMethodAsync("Page.enable", "{}");
WebView2.CoreWebView2.GetDevToolsProtocolEventReceiver("Page.fileChooserOpened").DevToolsProtocolEventReceived += OnPageFileChooserOpened;
await WebView2.CoreWebView2.CallDevToolsProtocolMethodAsync("Page.setInterceptFileChooserDialog", "{\"enabled\": true}");
will either work, or do nothing or crash with an Access violation (write or read).
Seems to depend on how many objects were created until the callback is triggered within the WebView2
Version
SDK: AppSDK 1.1.3 & 1.1.4
Runtime: Dev 106.0.1356.0
Framework: WinUI3 Desktop
OS: Win11 22000.918
Repro Steps
- run project from https://github.com/minesworld/WindowsAppSDKBugs
- put into the text box an address where a file upload is possible, click "Go" button
- do the file upload, if the callback is triggered "OnPageFileChooserOpened" will be shown in debug output...
Expected behavior is that it will work every time.
Screenshots
Additional context
Filed a Bug under AppSDK too... https://github.com/microsoft/WindowsAppSDK/issues/2921
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.