Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

Network monitoring and HAR export #4

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

motin
Copy link
Contributor

@motin motin commented Jul 29, 2018

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.

@motin motin force-pushed the network-monitoring-and-har-export branch from fcc4131 to 1562fa9 Compare July 30, 2018 06:59
target,
getPanel: () => {},
};
await this.getNetMonitorAPI().connect(MockToolbox);
Copy link
Contributor Author

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?

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).

Copy link
Contributor Author

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.

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
@motin motin force-pushed the network-monitoring-and-har-export branch from 0fb646f to 2d32489 Compare July 31, 2018 09:25
@motin motin force-pushed the network-monitoring-and-har-export branch from 27c1776 to 11cd000 Compare July 31, 2018 11:40
@motin motin force-pushed the network-monitoring-and-har-export branch from 7a10d91 to 955fbbe Compare July 31, 2018 13:23
@motin
Copy link
Contributor Author

motin commented Aug 6, 2018

Stalled atm pending feedback / help with firefox-devtools/har-export-trigger#13 (comment)

@lonnen
Copy link

lonnen commented Aug 6, 2018

@rhelmer can you have a look at this and the corresponding issue?

@rpl
Copy link
Member

rpl commented Aug 28, 2018

@janodvarko any idea about what can still be missing or what is going wrong with the issue mentioned in #4 (comment)?

@rpl
Copy link
Member

rpl commented Aug 31, 2018

@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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants