MicrosoftEdge / MicrosoftEdge/WebView2Feedback
WinUI WebView2 causes crash with HTML input file while debugging after 30 seconds
@champnic is already working on this.
Since Jun 8, 2023.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
A WinUI app with WebView2 that hosts HTML with an <input type="file" ... /> element will cause the app to crash and not able to debug it.
Version
SDK:
Runtime:
Framework:
OS:
Repro Steps
- Create new WinUI3 Packaged app
- Change the main XAML to be
<WebView2 Source="https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_file"></WebView2>(and remove any other code from the CS file that isn't relevant) - Run the app from VS with the debugger (press F5)
- In the app click the "Choose file" in the loaded HTML page
- Don't pick any files. Just wait a minute or two.
Result: The app will crash and you cannot debug it. If you try to debug it, you get all kinds of weird exceptions from VS itself (and it weirdly loads in Dark Mode... no idea why).
Expected: No crash.
Screenshots
Additional context
This does not repro in these similar scenarios:
- WinUI app run without the debugger doesn't crash
- WinUI app run from Start Menu doesn't crash
- WPF + WebView2 doesn't crash
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.