Fiddler capturing traffic from a specific process stopped working in Chrome - google-chrome

Open Chrome and navigate to google.com
In Fiddler use the "Any Process" button to select that Chrome tab
In Fiddler the "Any Process" button changes to something like "chrome: 11788"
In the Chrome tab search for something
I expect traffic to be captured by Fiddler but no sessions are displayed. If I use "Any Process", traffic is captured from all applications.
The "Use Filters" checkbox is unchecked in the Filters tab.
I uninstalled and reinstalled Fiddler.
I have the latest version installed.
What else could I do?

Modern versions of Google Chrome use separate process for making requests; so the process of the main window, detected by the 'Any Process' tool, is different.
The team is considering a fix, but it is currently not implemented, see "Target Any Process" feature no longer working with Chrome.
Possible workarounds meanwhile are:
Use other filtering functionality - e.g. capture a request from Chrome, and from the Sessions view choose right click -> Filter now -> Show only process=<process number>.
Filter everything else. In Fiddler, uncheck Tools -> Options -> Connections -> Act as system proxy on startup. Then Start Chrome with manually specified proxy settings, pointing to the port on which Fiddler is listening:
chrome --proxy-server=http://localhost:8888
This way the only captured traffic will be from this instance of Chrome.

Detailed version: Why Fiddler's Process Picker tool doesn't work with Chrome anymore
Brief version: For security and performance reasons Chrome now handles network requests through a separate network service. So when you are pointing the 'Any Process' tool of Fiddler on any Chrome window/tab, you are actually pointing to the UI (browser process) of Chrome browser.
There is one quick workaround for this:
Navigate to chrome://flags/#network-service-in-process in your Chrome browser. You would see Runs network service in-process and its value would be set to Default.
Change the value from Default to Enabled. By doing this you are telling Chrome to handle network requests from the browser process which also handles the UI.
Restart Chrome. You should now be able to capture network requests by pointing the Any Process tool on any Chrome tab.
Once you are done with your development activities do not forget to set the flag back to Default. This would give better performance.
NOTE: At the point of writing this, I am using Chrome 84.

Related

Cookies are erased when opening dev tools on localhost

Anytime I have dev tools open on localhost my cookies are deleted and I am redirected to the login page on every page load which means I cannot use dev tools to debug or get insight into my site. I have localhost setup with a valid SSL cert (self-signed) and the site works normally until I open dev tools. How do I fix or disable this new "security" or setting in chrome?
After lots of issues and trying out many different things I came across this post/answer
When adding a Javascript library, Chrome complains about a missing source map, why?
Turns out that when I opened Dev Tools it would request a CSS map and the request was being sent to a different firewall causing my application to require me to re-authenticate every time this resource was requested. Turning off the CSS source map option fixed the issue

A custom extension is not listed in extensions page in some computers

I have developed a Google Extension for which I created a Windows installer package. That installer writes the corresponding registry entries as explained in https://developer.chrome.com/extensions/external_extensions#registry
All that works well in some computers. So, after I run the installer package and then run Google Chrome, a little popup appears telling me to enable the extension. I answer “Yes” to that question and from that time on, the extension works as expected.
However, in some computers, with the same version of Chrome (53.0.2785.116 m), the installer writes the corresponding entries to the registry but when I run Chrome, nothing happens and the extension is not listed in the chrome://extensions/ page.
In such cases, I can connect to web store to install the extension manually. However, this extension launches an application because it implements Native Messaging. When I install the extension manually it works (the native messaging host application is launched and works) but when I close and re-open Chrome, the host application is not run. To run it, I need to manually disable and then re-enable the extension.
Very strange what happening. Can you help me on this please?
Based from this thread, (which is somewhat related to your issue), when you close the Chrome, it will fire onDisconnect event that's why the application is not running.
Native messaging means only Chrome can start a host instance when it "connects". It's a misnomer, since connect() means "launch a new copy and talk to it".
There is no way to "attach" to an already-running process. If you close the host, stdio pipe is broken the Port object fires onDisconnect event. Then you need to re-launch the host from the extension to be able to talk to it.
You can check on this link. Just make sure that no antivirus or firewall programs on your computer are causing the problem. If you can open Google Chrome when the firewall is off, you may need to create an exception in your antivirus or firewall settings.
However, in some computers, with the same version of Chrome (53.0.2785.116 m), the installer writes the corresponding entries to the registry but when I run Chrome, nothing happens and the extension is not listed in the chrome://extensions/ page.
You may be encountering blacklisting if that extension was ever installed, then uninstalled.
What if the user uninstalls the extension?
If the user uninstalls the extension through the UI, it will no longer
be installed or updated on each startup. In other words, the external
extension is blacklisted.
How do I get off the blacklist?
If the user uninstalls your extension, you should respect that
decision. However, if you (the developer) accidentally uninstalled
your extension through the UI, you can remove the blacklist tag by
installing the extension normally through the UI, and then
uninstalling it.

Fiddler suddenly cannot capture anything from broswers

Fiddler had worked well on my laptop, but all of a sudden it cannot capture anything from my browsers. I have no ideas about what I have done may cause this problem.
The version of my fiddler is v4.6.0.5, it cannot capture http requests from all of my browsers, chrome, IE and Edge. My system is Windows 10.
I've carefully read the webpage Fiddler not capturing traffic from browsers
However, solutions works well for others do not work in my situations.
I've tried reinstalled fiddler and reset chrome hundreds of times
http://localhost.fiddler:8888/ cannot be found
http://127.0.0.1:8888 returns "This page returned a HTTP/200 response
Originating Process Information: chrome:79748"
I didn't use any filters
I have no extensions on chrome and close all kinds of VPN software.
I've checked 'Decrypt HTTPS traffic'
Anybody knows how can I solve the problem? Thank you!
I found that some of the software's http request is captured. It seems like that only the browsers' requests are not captured.
I temporarily use the developer tools in chrome for replacement(Ctrl+Shift+I, choose "NetWork"). It can capture the requests missed in Fiddler.
Your output indicates that:
Fiddler is running, and
It isn't blocked by a firewall or other software
Fiddler is not set as your system's proxy
On Fiddler's File menu, does the Capture traffic item have a checkmark next to it? While Fiddler is running, if you click Tools > WinINET Options > LAN Settings, what do you see?
Do you have any third-party antivirus software installed? Is this machine under the control of Group Policy (e.g. on a corporate network)?
If you start Chrome like so: chrome --proxy-server=http://127.0.0.1:8888, what happens?

chrome: disable internet connection or work offline

How can I disable internet connection or work offline like Firefox in Chrome? I need to check some errors when Internet is not available.
offline mode is added to Chrome v45.
Developer tools -> Network tab -> Choose "offline" from selectbox.
Offline switcher is a new handy Chrome Extension to do the job quickly. You can toogle to switch between offline and online mode.
The add-on is simple, just to set Chrome proxy to an un-existing point.
Under the network tab, go to the THrottling dropdown where you can select different speeds of web and even set it to be offline. This comes very handy when you are working with service workers and want to test your application in offline mode.
Refer to the latest answer:
https://stackoverflow.com/a/32607960/2520254
Until Chrome has a feature to disable internet but retains localhost (or local network) connections. The only way I could suggest is to just disconnect the network from the internet manually for your testing.

Chrome Web Inspector Web Socket Debugging

I can use the Network tab in the Google Chrome Web Inspector to debug the network traffic (AJAX requests, etc.). I can check what data is transferred easily. But Websocket connections only show as
Request URL:ws://localhost/...
Request Method:GET
Status Code:101 Switching Protocols
...
and I can't see the transferred data. Is there any build in feature in Google Chrome to inspect the transferred data? Or do I need to use Wireshark?
PS: I'm using the latest stable version (16.0.912.75). If a newer version (beta/dev) has this features, it would be nice.
Chrome and Chromium now have WebSocket message frame inspection. Here are the steps to test it quickly:
Navigate to the WebSocket Echo demo, hosted on the websocket.org site.
Turn on the Chrome Developer Tools.
Click Network, enable filter (3rd icon from the left on the top of Dev Tools) to filter the traffic shown by the Developer Tools, and click WebSockets.
In the Echo demo, click Connect. On the Headers tab in Google Dev Tool you can inspect the WebSocket handshake.
Click the Send button in the Echo demo.
To see the WebSocket frames in Chrome Developer Tools, under Name, click the entry representing your WebSocket connection. This refreshes the main panel on the right and makes the WebSocket Frames tab show up with the actual WebSocket message content.
I also posted the steps with screen shots and video.
After some more research I found a duplicate question here: Debugging WebSocket in Google Chrome
Chrome does't support viewing the traffic in the current stable version. I need to use Wireshark.
Another Idea, for simple web socket testing and lightweight, use Chrome plugin "Simple Web-socket. I wanted to check only if the connection can be establish or not. Following Chrome plugin "Simple Web-socket (link : https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en)" work like charm. See image.
https://lh3.googleusercontent.com/bEHoKg3ijfjaE8-RWTONDBZolc3tP2mLbyWanolCfLmpTHUyYPMSD5I4hKBfi81D2hVpVH_BfQ=w640-h400-e365