-
Notifications
You must be signed in to change notification settings - Fork 5
Network monitoring and HAR export #4
base: develop
Are you sure you want to change the base?
Conversation
3d91f86
to
fcc4131
Compare
…hout requiring devtools to be open
fcc4131
to
1562fa9
Compare
src/api.js/Monitor.js
Outdated
target, | ||
getPanel: () => {}, | ||
}; | ||
await this.getNetMonitorAPI().connect(MockToolbox); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP activity does not seem to be recorded anywhere. The HAR returned from NetMonitor is always null. What is missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will only start recording from here, when calling this.getNetMonitorAPI().connect
.
So you will have to reload the current page or load a new one in the tab in order to get some data out of NetMonitorAPI.getHar()
(and wait for the end of load).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to work currently. I can reload the page twenty times, write new URLs in the address bar of the monitored tab etc after this statement - without anything but empty HAR contents being returned by NetMonitor afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum. I don't know then.
It would be helpful to trace what is happening here:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/api.js#107
options.items
should be a non empty array.
Then ensure that this code is trigerred:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/connector/firefox-connector.js#71
Without the call to addListeners
here, nothing will be recorded.
Finally, you could also ensure the redux actions are correctly dispatched for each request, from here:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/connector/firefox-data-provider.js#76-77
Otherwise, the store
won't be populated.
If all that is correct, then I'm really out of clue.
…rying tabManager directly, followed by querying the debugger server based on the nativeTab object
0fb646f
to
2d32489
Compare
27c1776
to
11cd000
Compare
…onse bodies in HAR export
7a10d91
to
955fbbe
Compare
Stalled atm pending feedback / help with firefox-devtools/har-export-trigger#13 (comment) |
@rhelmer can you have a look at this and the corresponding issue? |
@janodvarko any idea about what can still be missing or what is going wrong with the issue mentioned in #4 (comment)? |
@motin I took another look at this, to check what may still be missing from the code that initialize the network monitor API component, and I guess that it may be related at least to the following:
@janodvarko what do you think about the above two comments? may they be the reasons for the empty HAR archive? |
Work in progress - do not merge yet.
Fixes #3
To try this out, following the clone, install and start instructions on https://github.com/motin/dataleak-pioneer-shield-study/blob/develop/docs/DEV.md#details
After Firefox has started, open a new tab (only this tab will be instrumented atm), navigate to an URL and inspect the Browser Console for what is going on.