Closed
Bug 1410357
Opened 7 years ago
Closed 5 years ago
Network monitor does not capture requests made by extensions
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(firefox57 fix-optional)
RESOLVED
DUPLICATE
of bug 1642784
Tracking | Status | |
---|---|---|
firefox57 | --- | fix-optional |
People
(Reporter: 61.1p57, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171019222141
Steps to reproduce:
--- manifest.json ---
{
"name": "Request",
"version": "0.1",
"manifest_version": 2,
"permissions": [
"https://example.com/"
],
"background": {
"scripts": ["background.js"]
}
}
--- background.js ---
const request = new XMLHttpRequest();
request.open('GET', 'https://example.com/', true);
request.onload = function () {
if (this.status >= 200 && this.status < 400)
console.log("response received.")
};
request.send();
Load the demo above and open debug window.
Actual results:
"response received." appears in console, but nothing shows up in network monitor.
Expected results:
The request to https://example.com/ should be recorded.
Has STR: --- → yes
Component: Untriaged → Developer Tools: Netmonitor
Comment 1•7 years ago
|
||
The Network monitor is primarily used to monitor HTTP traffic related to the current page/browser tab. If I understand correctly background.js is not attached to any particular page, correct?
You might use the Browser Toolbox...
Do you see the request there?
Honza
Flags: needinfo?(61.1p57)
According to the devtool, it's attached to a _generated_background_page.html page.
The browser toolbox does show the request though, ok for a workaround but still creates inconveniences.
Flags: needinfo?(61.1p57)
Updated•7 years ago
|
status-firefox57:
--- → fix-optional
Priority: -- → P3
Comment 3•7 years ago
|
||
Since it's not explicit in the STR and in case there's confusion that has stalled this, I think "Load the demo above and open debug window." is referring to about:debugging and the devtools that open from there that are specifically for debugging an addon (not "the current page/browser tab").
If the netmonitor is not supposed to work in this context, perhaps consider hiding the Network tab so addon devs don't assume they can rely on it?
Comment 4•7 years ago
|
||
I noticed the same issue today, and was really surprised by the behaviour as well. I had the same behaviour when sending the request from a background script, and same thing with requests sent from a browser action popup. I would have assumed all requests sent from an addon to be visible from the "debug" toolbox Network Tab of this addon, but they aren't.
I found this really off-putting. Is this behaviour intended?
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•5 years ago
|
Blocks: netmonitor-columns
Updated•5 years ago
|
Comment 5•5 years ago
|
||
I did more testing in bug 1642784 and it seems to be working for me. I can see HTTP requests coming from the backround scope in the Browser Toolbox's Network panel
Closing this as duplicate, but please ping me if you have a test case that can be used to reproduce the issue.
Honza
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•