Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trace strange Network calls in Google Chrome?

In the developer tools, in a web app I'm working on, I'm getting a rather strange error in the console:

'GET data:'

That's it. No stack trace or anything. It is a failing network call. It shows up in the Network tab:

Request URL: data:

Request Headers

Referer: http://localhost/testapp/

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30

No error in Firefox/Firebug. Would be nice to figure out what line of HTML/Javascript caused Chrome to attempt to execute this specific request.

like image 648
Positronic Network Avatar asked Jul 04 '11 06:07

Positronic Network


People also ask

How do I trace networks on Google Chrome?

Capturing the network trace file on Google ChromeFrom the Chrome menu bar, select View > Developer > Developer Tools. From the panel that opens, select the Network tab. Look for a round record button in the upper-left corner of the tab, and make sure it is red. If it is grey, click it once to start recording.

How do I see network calls in my browser?

In common web browsers like Google Chrome or Firefox, you can "right-click" and then click "Inspect" or "Inspect Element" to open the developer tools in your browser. Then, in Developer Tools, navigate to "Network" and re-load the page.

How do I view network tab responses?

To view the response body to a request: Click the URL of the request, under the Name column of the Requests table. Click the Response tab.


2 Answers

In the Network tab, hover over the file name of the initiator and you should find the caller in the stack trace.

In the Network tab, hover over the file name of the initiator and you should find the caller in the stack trace.

like image 50
Adam Prax Avatar answered Sep 22 '22 04:09

Adam Prax


Found a related Chrome bug tracker issue: http://code.google.com/p/chromium/issues/detail?id=86286

So it looks like web developers are out of luck for tracing network request sources until these issues get resolved. Both issues require their underlying engines to be modified. So Firefox and Webkit first have to support the feature, then Firebug and Chrome can, respectively and in turn, support the feature. New versions of both browsers (and plugin) need to be released. And it sounds like it won't be easy to implement.

like image 42
Positronic Network Avatar answered Sep 26 '22 04:09

Positronic Network