Closed Bug 1833656 Opened 1 year ago Closed 1 year ago

HAR multiple pages can miss pages if requests list is filtered

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(firefox115 fixed)

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(2 files)

In order to reconstruct the page entries, we need to make sure we have all the navigation requests available to the HAR builder. However the DevTools HAR builder actually uses the list of displayed requests as the source for the HAR.

So for instance if you filter to display only images, the HAR builder will not have access to any of the navigation requests, and will then fail to find the accurate timings for the page navigations.

I am not sure allowing to use a filtered list of requests for HAR makes sense, but if we want to preserve the feature we have a few options:

  1. Always send the full sorted requests list

This could be done from the connector (and therefore would have limited impact on the call sites), but the connector needs access to the state for this which is not guaranteed. Alternatively we can make this an explicit option, but this means a bigger impact on the netmonitor components which will now need to give access to the sorted requests list to any component which displays a context menu with HAR options.

  1. Collect navigation requests on the side

The collector (or maybe another helper class, dedicated to collect har-specific data?) could watch for network resources an keep track of all requests which have isNavigationRequest set to true. Having a separate class would probably be the best because it starts to feel really hacky if we add more and more har-specific logic in the base collector.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P3
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b3c9e8328a9f
[devtools] Support multiple pages in HAR with filtered requests r=bomsy,ochameau,devtools-reviewers
https://hg.mozilla.org/integration/autoland/rev/bbafcf23c9dd
[devtools] Use real context menu item to save as HAR from har mochitests r=bomsy,devtools-reviewers

Backed out for HAR related mochitests failures in browser_ext_devtools_network.js

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_devtools_network.js | HAR log should not be empty - Got +0, expected 1
Flags: needinfo?(jdescottes)
Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8fd82159e478
[devtools] Support multiple pages in HAR with filtered requests r=bomsy,ochameau,devtools-reviewers
https://hg.mozilla.org/integration/autoland/rev/25040b193885
[devtools] Use real context menu item to save as HAR from har mochitests r=bomsy,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: