MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: Exception in async call from js bridge crashes application
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
I have to work with user provided network addresses, and when a fetch request fails with no status code, I try to find out a reason with a HttpClient in the .NET layer.
Sending a request there to a non-existent target causes the whole application to crash.
I already check for invalid ip-address and non-resolvable name, but sending a request (HEAD) to a port where nothing is listening also causes a crash I cannot recover from.
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
122.0.2365.59
SDK Version
1.0.2194-prerelease
Framework
WPF
Operating System
Windows 10
OS Version
10.0.19044
Repro steps
Sending the request to a valid ip address but the wrong port in a async method of the js bridge causes the crash every time.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
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.
Research direction
Start by reproducing the closed-port request from an asynchronous JavaScript bridge method in the WPF WebView2 application, then trace how the .NET HttpClient exception crosses the bridge. The payload names no files or tests; done should mean the failed request no longer crashes the application and its error remains recoverable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100