New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 732622 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

workerStart (Navigation Timing 2 API) is zero even when the HTML document is served by service worker

Reported by sveerava...@linkedin.com, Jun 13 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36

Steps to reproduce the problem:
1. Browse to a website which has service workers with offline behavior and make sure that service worker is installed. ex: https://jakearchibald.github.io/trained-to-thrill/
2. Visit the site again.
3. window.performance.getEntriesByType('navigation')[0].workerStart returns zero

What is the expected behavior?
This attribute should return the time taken for worker to start. It was implemented as part of https://bugs.chromium.org/p/chromium/issues/detail?id=611276&can=1&q=workerStart&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified and worked previously. 

What went wrong?
It always returns zero

Did this work before? Yes 

Does this work in other browsers? N/A

Chrome version: 59.0.3071.86  Channel: stable
OS Version: OS X 10.12.3
Flash Version: 

It worked when I checked a few weeks back. Not sure if there was an upgrade in between which caused this to break.
 
Please change the title to "workerStart (Navigation Timing 2 API) is zero even when the HTML document is served by service worker"
Cc: sandeepkumars@chromium.org
Labels: -Pri-2 hasbisect-per-revision M-61 OS-Linux OS-Windows Pri-1
Owner: vasi...@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue using latest stable #59.0.3071.86 on Mac 10.12.4, Win 10 and Linux Ubuntu 14.04.

Below is the bisect info
========================

Good Build: 59.0.3044.0  (Revision: 457648)
Bad Build:  59.0.3045.0  (Revision: 457915)


Using per-revision bisect providing the bisect results:

You are probably looking for a change made after 457789 (known good), but no later than 457790 (first known bad).

CHANGELOG URL:
 https://chromium.googlesource.com/chromium/src/+log/a9691a68bb9cb7e7d008bfdd881fa27023c8181f..ea6b98729307be8655a597ff4ac559710b7d68c6

Review-Url: https://codereview.chromium.org/2757893002

vasilii@: Could you please take a look into this issue and reassign if this issue is not related to your change.

Note: Issue is seen in M61 as well

Thanks..!!

Owner: kenjibaheux@chromium.org
Summary: workerStart (Navigation Timing 2 API) is zero even when the HTML document is served by service worker (was: workerStart (Navigation Timing 2 API) is zero even if )
Kenji, please triage
Cc: falken@chromium.org
Owner: panicker@chromium.org
Shubhie, can you take a look?
Having a functional workerStart is critical for key PWA partners working latency mitigations.

Thanks!

Comment 5 by falken@chromium.org, Jun 16 2017

The per-revision bisect result doesn't make sense: that change just affects tests and not the Chrome binary.

I don't understand the PerformanceNavigationTiming results. workerStart is 0 but so are many other things.

Going to a random non-service worker site I see:
requestStart: 0
responseEnd: 145.85
responseStart: 0
secureConnectionStart: 0
startTime: 0
workerStart: 0

If startTime, requestStart, responseStart are 0, for a service-worker enabled site I don't know what workerStart would be.  I wonder if this is just WAI.

Comment 6 by falken@chromium.org, Jul 10 2017

I should have recorded how I tested that.

Repro steps:
1) Go to http://www.example.com/
2) In console run
performance.getEntriesByType("navigation")[0];


Cc: igrigo...@chromium.org
Labels: Hotlist-PerformanceAPIs
Looks like something is broken in our NT2 implementation.. Using the example.com test page:

> nt = performance.getEntriesByType('navigation')[0]
> (performance.timing.responseStart - performance.timing.requestStart) == (nt.responseStart - nt.requestStart)
false
> (performance.timing.responseStart - performance.timing.requestStart) 
5
> (nt.responseStart - nt.requestStart)
0

^ orthogonal to workerStart, but a good sign that something's not right in our plumbing. NT1 and NT2 should agree.

Ditto for workerStart, it seems to always report 0. Hmm...

Comment 9 by kinuko@chromium.org, Jul 11 2017

Components: Blink>Loader
Did a bit of digging, it looks time-origin_ is 0 in navigation timing case, ...because it's not initialized in navigation timing case.


Cc: ksakamoto@chromium.org
This is the change that broke it, I think: https://codereview.chromium.org/2647643004

I have a wip patch that fixes it (by the way it doesn't make (performance.timing.responseStart - performance.timing.requestStart) == (nt.responseStart - nt.requestStart) true due to precision issues)

Owner: kinuko@chromium.org
And the wpt test was broken too... will fix that as well.
Awesome, thanks! was just wondering why the tests didn't catch this :)

Status: Fixed (was: Assigned)
Matt: can you verify workerStart on ToT when you have time?
Yep, now there are sane numbers on current Dev for both the non-sw case <http://www.example.com/> and the sw case <https://jakearchibald.github.io/trained-to-thrill/>. Nice!

Sign in to add a comment