Closed Bug 1509804 Opened 6 years ago Closed 5 years ago

Automatic export of HAR is broken due to EventEmitter refactor from last year

Categories

(DevTools :: Netmonitor, defect, P5)

63 Branch
Desktop
macOS
defect

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: jordan, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file har-automation.patch
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15

Steps to reproduce:

1. Set devtools.netmonitor.har.enableAutoExportToFile = true
2. Opened dev tools
3. Browsed around


Actual results:

No har files showed up in profile directory


Expected results:

Har files should have showed up.

This appears to be due to a bug in har-automation.js. The onTabNavigated event listener is trying to check type for 'navigated' and 'will-navigate', but that is no longer passed in so HAR files are never created.

I've attached a quick patch. I haven't tested it so it may be buggy.
Component: Untriaged → Netmonitor
OS: Unspecified → Mac OS X
Product: Firefox → DevTools
Hardware: Unspecified → Desktop
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5

This fixes several gaps:

  • event api changes
  • networkEvent no longer emitted by debugger client
  • shape of expected HAR items changed
  • use the connector from the netmon api

This is the minimum set of changes I could do to get HAR automation to save valid HAR files again.

Assignee: nobody → jdescottes

Depends on D55204

This is just a smoke test to verify that the HAR file is created.
We should probably expand this and test the content as well, but we can handle that in follow up bugs

Attachment #9112531 - Attachment description: Bug 1509804 - Add smoke test for har automation → Bug 1509804 - Add smoke test for HAR automation
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a4459904376f
Temporary fix for HAR automation r=Honza
https://hg.mozilla.org/integration/autoland/rev/76944c9ad43c
Add smoke test for HAR automation r=Honza
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: