MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: NavigationCompleted report fail when download a file
@dhveerap is already working on this.
Since Mar 24, 2025.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
NavigationCompleted event handler reports navigation failed when clicking on a file download link, while the HttpStatusCode is 0. This behavior is not documented anywhere.
This is a blocking issue, as I cannot differentiate whether the navigation is failed due to network error (I tried disconnect ethernet, it will be the same status code) or a file download.
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
No response
SDK Version
No response
Framework
Win32
Operating System
Windows 11
OS Version
No response
Repro steps
Use the official C++ win32 getting start project,
add this event handler
EventRegistrationToken token;
webview->add_NavigationCompleted(Callback<ICoreWebView2NavigationCompletedEventHandler>(
[](ICoreWebView2* webview, ICoreWebView2NavigationCompletedEventArgs* args) -> HRESULT {
BOOL isSuccess = true;
args->get_IsSuccess(&isSuccess);
if (!isSuccess)
{
MessageBox(NULL, L"Failed", L"", NULL);
}
return S_OK;
}).Get(), &token);
Navigate to the download page, like https://developer.microsoft.com/en-us/microsoft-edge/webview2
download a file, then the message box shows.
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
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.