Closed Bug 1371494 Opened 3 years ago Closed 2 years ago

Save All As HAR does not populate log.entries[x].time

Categories

(DevTools :: Netmonitor, defect)

53 Branch
defect
Not set

Tracking

(firefox-esr52 unaffected, firefox53 wontfix, firefox54- wontfix, firefox55+ verified, firefox56+ verified)

VERIFIED FIXED
Firefox 56
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- wontfix
firefox54 - wontfix
firefox55 + verified
firefox56 + verified

People

(Reporter: craig, Assigned: rickychien)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached file firefox-google.com.har
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170605134926

Steps to reproduce:

Open network tab in dev tools.
Open www.google.com/ncr.
Right click and select "Save All As HAR"


Actual results:

The HAR file is saved, but log.entries[x].time is null.

e.g. on Firefox 54:

    "entries": [
      {
        "pageref": "page_1",
        "startedDateTime": "2017-06-09T13:09:35.724+12:00",
        "time": null,


Expected results:

The HAR file is saved and log.entries[x].time is populated.

e.g. on Chrome 59.0.3071.86

    "entries": [
      {
        "startedDateTime": "2017-06-09T01:11:36.596Z",
        "time": 431.02799999905983,
Component: Untriaged → Developer Tools: Netmonitor
Regression range:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=9a03728016ff7b76c4850375303e84cce00e4ac4&tochange=28445d6f646be36233d080caae871ed1c39a242d

Regressed by bug 1309866.
Blocks: 1309866
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Ever confirmed: true
Flags: needinfo?(jsnajdr)
Keywords: regression
Version: 54 Branch → 53 Branch
Too late for 54 and track 54-.
Honza, is this regression something we might fix in time for 55?
Flags: needinfo?(odvarko)
@Ricky, since you were just working on bug 1373594, do you have any tips why the total request time isn't exported?

Honza
Flags: needinfo?(odvarko) → needinfo?(rchien)
Assignee: nobody → rchien
Status: NEW → ASSIGNED
Flags: needinfo?(rchien)
Flags: needinfo?(jsnajdr)
Honza,

I suspect this regression is derived from https://reviewboard.mozilla.org/r/90444/diff/15#index_header and find `case "totalTime":` to see there is a 

requestItem.attachment.endedMillis = requestItem.attachment.startedMillis + val;

in previous version.

After applying this big patch, we accidentally remove `endedMillis` so that cause HAR log is unable to populate "time" value properly.
Comment on attachment 8880835 [details]
Bug 1371494 - Save All As HAR does not populate log.entries[x].time

https://reviewboard.mozilla.org/r/152184/#review158292

Excellent, thanks for the patch!

R+

Ready to land.

Honza
Attachment #8880835 - Flags: review?(odvarko) → review+
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6528b6c5c0b
Save All As HAR does not populate log.entries[x].time r=Honza
https://hg.mozilla.org/mozilla-central/rev/e6528b6c5c0b
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
I have reproduced this bug with nightly 55.0a1 (2017-06-08) on "Linux Mint (64 Bit).

The bug's fix is now verified on Latest Nightly 56.0a1

Build ID 	20170630100234
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

[Bugday-20170628]
Want to uplift this to beta 55? The regression is fairly recent, so if you think it isn't too risky please go ahead and request uplift.
Flags: needinfo?(rchien)
Comment on attachment 8880835 [details]
Bug 1371494 - Save All As HAR does not populate log.entries[x].time

Approval Request Comment
[Feature/Bug causing the regression]: bug 1309866
[User impact if declined]: developer feature which developer triggers "Save All As HAR" in network monitor. 
[Is this code covered by automated tests?]: no
[Has the fix been verified in Nightly?]: no
[Needs manual test from QE? If yes, steps to reproduce]: yes, STR please see description.
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: no
[Why is the change risky/not risky?]: developer feature which will only be enabled by developer.
[String changes made/needed]: no
Flags: needinfo?(rchien)
Attachment #8880835 - Flags: approval-mozilla-beta?
Comment on attachment 8880835 [details]
Bug 1371494 - Save All As HAR does not populate log.entries[x].time

fix an issue with devtools netmonitor, beta55+
Attachment #8880835 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Ricky Chien [:rickychien] from comment #12)
> [Is this code covered by automated tests?]: no
> [Has the fix been verified in Nightly?]: no
> [Needs manual test from QE? If yes, steps to reproduce]: yes, STR please see
> description.

Flagging this for manual testing. Cipri, you might want to look at this.
Flags: qe-verify+
I have also managed to reproduce this issue by following the STR from comment 0, using an affected Nightly build (2017-06-08).

This is verified fixed on latest Nightly 56.0a1 (2017-07-07) and 55 beta 7 (20170706085221), across platforms: 
- Windows 10 x64
- Ubuntu 16.04 x64 LTS
- Mac OS X 10.11.6
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.