-
Notifications
You must be signed in to change notification settings - Fork 51
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
Microsoft.Web.WebView2 WebResourceRequested Set Response Not Working - Requests keeping in a pending state #568
Comments
Thanks for reporting, I've opened a bug on our backlog and we'll take a look! Just to confirm, have you put a breakpoint in |
Yes. It is hit I can change the url and make it work with the new url. But
if I try to change the response then it doesn't work.
…On Thu, Oct 22, 2020 at 6:46 PM Nic Champagne Williamson [MSFT] < ***@***.***> wrote:
Thanks for reporting, I've opened a bug on our backlog and we'll take a
look! Just to confirm, have you put a breakpoint in
CoreWebView2_WebResourceRequested and are able to see it getting hit? Our
support for custom URIs is incomplete at the moment, and I wanted to check
if it was a problem stemming from the custom URI or from creating and
setting the response. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#568 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIXWK7XZ6VPO7FL7FHCENLSMCRZRANCNFSM4S3R3OVQ>
.
--
Paulo Ortins - www.pauloortins.com
Tel.: (71) 9354-4577
|
Hello! Any news? |
No, we haven't had a chance to look at this issue yet. We're tentatively scheduled to look at it later this month. I'll keep you updated when we've had a chance to investigate the bug. Thanks! |
I received NotImplemented exception while trying to access the Environment property. Hope this help. |
I got the NotImplementedException and the (pending) requests, too. The not impemented property was not too difficult to work around, because i was already creating an own environment: this.environment = await CoreWebView2Environment.CreateAsync(userDataFolder: userDataFolder);
// Make sure that before this call the webView2 is already put inside a container, e.g. window.Content = webView2
// If you forget it, this call will hang forever, because it is waiting for the hwnd.
await webView2.EnsureCoreWebView2Async(environment); The (pending) requests seems to be caused when you are not putting a non-empty string into the e.Response = this.environment.CreateWebResourceResponse(null, (int)HttpStatusCode.NotFound, "Not Found", null);
e.Response = this.environment.CreateWebResourceResponse(null, (int)HttpStatusCode.RequestedRangeNotSatisfiable, "Range Not Satisfiable", null);
e.Response = this.environment.CreateWebResourceResponse(
LimitStream(stream, (int)length), (int)HttpStatusCode.PartialContent, "Partial Content",
$"Content-Range: bytes {from}-{from + length - 1}/{stream.Length}\r\n" +
$"Content-Length: {length}");
e.Response = this.environment.CreateWebResourceResponse(stream, (int)HttpStatusCode.OK, "Ok", null); |
Hi @pauloortins, I am the developer looking into this bug, but I don't seem to be able to repro it. I tried your code with a sample app and don't see the pending status. Would you mind share a repro a project so I can better understand the issue? |
This should be fixed in runtime 90.0.804.0+. Please give it a try and let us know if you run into any further issues. Thanks! |
I have been getting this in 1.0.824-pre - a table of img will sit in 'Pending' for quite some time before suddenly being allowed to load, and the newer images added after that also load quickly. Randomly it will not have any delay at all. None of them start at all. Look forward to updated control to see if resolved. |
Description
When trying to set the response inside the WebResourceRequested the request is freezing in the pending state instead to return the response to the browser.
Version
SDK: 1.0.674-prerelease
Runtime: 88.0.678.0
Framework: WPF
OS: Win10
Repro Steps
Screenshots
Additional context
AB#29931313
The text was updated successfully, but these errors were encountered: