MicrosoftEdge / MicrosoftEdge/WebView2Feedback
CONNECTION_ABORTED errors with NavigateWithWebResourceRequest
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
we aren't sure if this is just a lack of documentation or a bug.
Please advise.
Best regards,
Reinhold
This issue is for a:
- bug report
- feature request
- documentation issue or request
- regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
Use NavigateWithWebResourceRequest with a GET request that triggers a download - please find modified version of ScenarioNavigateWithWebResourceRequest.cpp example attached for your convenience.
(I had to rename extension to .txt to be able to upload it. )
ScenarioNavigateWithWebResourceRequest.txt
Download works perfectly, but when adding a NavigationCompletedEventHandler, we get a COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED error inside the callback.
When adding a WebResourceResponseReceivedEventHandler on top of that, WebView2 logs the following messages inside the output view:
Response loading was canceled. Reason: net::ERR_ABORTEDResponse loading was canceled. Reason: net::ERR_ABORTED
To us, it looks like CONNECTION_ABORTED error is raised by default in this scenario, even in case of success.
Expected/desired behavior
No errors reported by WV2 during/after successful download.
Questions:
a) are we doing something wrong ?
b) or is this "by design" and not a bug ?
c) if this is working as intended, how can we distinguish CONNECTION_ABORTED errors between "serious" ones and others that we can safely ignore or can CONNECTION_ABORTED errors always be ignored ?
OS and Version?
Windows 10
Versions
WebView2 1.0.902.49, 1.0.1133-prelease
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 with the attached ScenarioNavigateWithWebResourceRequest.txt and reproduce a GET download using NavigateWithWebResourceRequest. Observe NavigationCompletedEventHandler and WebResourceResponseReceivedEventHandler output, then determine whether CONNECTION_ABORTED is expected and how successful downloads should be distinguished from serious errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100