Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
doskabouter opened this issue Nov 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@doskabouter
Copy link

doskabouter commented Nov 14, 2024

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

@doskabouter doskabouter added the bug Something isn't working label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants