MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: WebResourceResponseReceived not fired for requests done in webworkers

Open
#4,926 2 comments 4 reactions 1 assignee View on GitHub

@monica-ch is already working on this.

Since Nov 14, 2024.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

What happened?

As per the title.

I do see the WebResourceRequested events (after I added a resourcerequest filter like
webView.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All, CoreWebView2WebResourceRequestSourceKinds.All);), but I never get the WebResourceResponseReceived for those requests.

Website where an example of this can be seen: https://demos.mapbox.com/boundaries-explorer/?country=US&layer=pos4&worldview=US#14.95/40.8191/-73.04611
For most of the requests I do get a WebResourceResponseReceived event, but the ones from the webworkers (like f.e. https://api.mapbox.com/v4/mapbox.boundaries-pos4-v4/13/2433/3076.vector.pbf) I don't get the corresponding WebResourceResponseReceived event

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Prerelease (Edge Canary/Dev/Beta)

Runtime Version

No response

SDK Version

1.0.2895-prerelease

Framework

Winforms

Operating System

Other

OS Version

No response

Repro steps

Create simple form with a webview
webView.CoreWebView2InitializationCompleted += WebView_CoreWebView2InitializationCompleted; webView.EnsureCoreWebView2Async();

` private void WebView_CoreWebView2InitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e)
{
webView.CoreWebView2.WebResourceResponseReceived += CoreWebView2_WebResourceResponseReceived;
webView.CoreWebView2.WebResourceRequested += CoreWebView2_WebResourceRequested;
webView.CoreWebView2.NewWindowRequested += CoreWebView2_NewWindowRequested;
webView.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All, CoreWebView2WebResourceRequestSourceKinds.All);
}

    private void CoreWebView2_WebResourceRequested(object sender, CoreWebView2WebResourceRequestedEventArgs e)
    {
        Listbox1.Items.Add("Request " + e.Request.Uri.ToString());
    }

    private async void CoreWebView2_WebResourceResponseReceived(object sender, CoreWebView2WebResourceResponseReceivedEventArgs e)
    {
        Listbox1.Items.Add("Response " + e.Request.Uri.ToString());
    }

`
Navigate to https://demos.mapbox.com/boundaries-explorer/?country=US&layer=pos4&worldview=US#14.95/40.8191/-73.04611 and see the requests like https://api.mapbox.com/v4/mapbox.boundaries-pos4-v4/13/2433/3076.vector.pbf not appearing as Response

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.