Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Trace missing in Fiddler #1901

Closed
tongyuze opened this issue Nov 2, 2021 · 6 comments
Closed

Trace missing in Fiddler #1901

tongyuze opened this issue Nov 2, 2021 · 6 comments
Assignees

Comments

@tongyuze
Copy link

tongyuze commented Nov 2, 2021

Hi there,

I have a question while integrate the webview2 with our library. When I try to use fiddler to capture the network trace from the network request, there will be some redirect sessions missing during the process.

Is there any special settings that I need to change in fiddler tool?

@champnic
Copy link
Member

champnic commented Nov 5, 2021

Hey @tongyuze, it's possible there's something else you need to do, but my expectation is that it should match the browser behavior. If you run your scenario in the Edge or Chrome browsers, do you see the missing redirects?

@champnic champnic self-assigned this Nov 5, 2021
@ericlaw1979
Copy link
Member

Hi. Fiddler developer here. Fiddler shows all of the network requests it receives unless you configure rules to hide requests. One thing you can do to verify that you're not unexpectedly hiding any requests is to use the Help > Troubleshoot command to cause Fiddler to render any requests that would be hidden in a strikethrough font.

Keep in mind that redirects can be cached by the browser; if the browser uses a previously cached redirect, that request isn't sent to the network and thus it's not visible to Fiddler.

Note that you can also configure your WebView2-based application to capture Chromium NetLogs[1], which you can then import[2] into Fiddler for easy viewing. The advantage there is that the NetLog contains requests that are serviced from the Chromium cache.

[1] https://textslashplain.com/2020/01/17/capture-network-logs-from-edge-and-chrome/#:~:text=WebView2%2Dbased%20applications
[2] https://textslashplain.com/2020/04/08/analyzing-network-traffic-logs-netlog-json/

@jasonxz
Copy link

jasonxz commented Apr 27, 2022

I'm having the same problem...even with Troubleshooting turned on, I'm not seeing traces through Fiddler. I'll see the initial request for a document but none of the javascript or image requests appear.

But my big issue is that I need the AutoResponder functionality in Fiddler to redirect requests to local debugging files and I can't do that if those requests are never making it to Fiddler. Furthermore, b/c my instance of WebView2 isn't actually added to the Visual Tree until after the managed code receives an OK from the scripts that run in the browser, I can't use the Override functionality in the DevTools, either, b/c there's no way for me to accept the popup that's required for Override permissions. The script changes that I'm trying to test center around moving from WebView to WebView2 so, without being able to use my local scripts, the scripts can't talk to the managed code to tell it to go ahead with inserting the WebView2 into the Visual Tree.

@ericlaw1979
Copy link
Member

@jasonxz: Have you confirmed that your WebView2 isn't simply reusing cached responses, either from the HTTP Disk Cache, or from a ServiceWorker that uses the Caching API?

@jasonxz
Copy link

jasonxz commented Apr 27, 2022

@ericlaw1979 No, I have not. That seems like the simplest and most-likely explanation. So, how do I go about verifying that and, if that is the problem, how do I get around it?

@ericlaw1979
Copy link
Member

@jasonxz I think the simple way to start would be trying to clear the cache for your instance; I don't know much about WV2 but it does not seem hard: #299

@MicrosoftEdge MicrosoftEdge locked and limited conversation to collaborators Oct 10, 2023
@victorhuangwq victorhuangwq converted this issue into discussion #3921 Oct 10, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants