New issue
Advanced search Search tips

Issue 890178 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

service worker can not skipWaiting and keeps pending after reload the page, when opened developer tools and selected 'update on reload'

Reported by dullffan...@gmail.com, Sep 28

Issue description

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

Steps to reproduce the problem:
1. open developer tool  ->  switch to application panel -> choose Service Workers and select Update on reload 
2. sw.register('/sw.js') on the page
3. update sw.js, register again, and reload the page,  has some probability to trigger the bug, behaves like below.
4. the page status keeps pending, seems to be a suspended animation, need a long time to  finish activate progress

What is the expected behavior?
service worker reload progress should not block the page reload

What went wrong?
service worker block the page reload on it updates on reload

Did this work before? Yes Google Chrome 69, 68 

Chrome version: 69.0.3497.100  Channel: stable
OS Version: OS X 10.12.6
Flash Version:
 
20180928145738.png
242 KB View Download
20180928145800.png
50.0 KB View Download
the file size of sw.js is about 61kb
Components: Blink>ServiceWorker
The "update on reload" is designed to wait for the service worker to activate before loading the tab.  AFAIK that is the main purpose of that check box so that developers can test service worker update consistently.

Even with skipWaiting() I believe the new worker must wait for the old worker to become idle.  Its possible the old service worker script was continuously servicing postMessage() events, running an infinite loop, or some other activity preventing it from stopping.

Maybe devtools should time out this operation and offer a dialog like: "The old service worker script will not exit gracefully.  Would you like to force it to stop?"  Or just do the force stop after the timeout automatically.

If you can you provide the service worker script you were trying to replace it might help us see what was going on.
Thank you for your reply, below is the service worker script.
sw.js
58.8 KB View Download
Labels: Needs-Triage-M69 Needs-Bisect
Cc: phanindra.mandapaka@chromium.org
Labels: Triaged-ET Needs-Feedback
dullffandii@ Thanks for the issue...

Tried to reproduce the issue on reported chrome 69.0.3497.100 using Mac 10.13.6. Attaching screen-cast for reference.
Steps:
-----
1. Launched reported chrome 
2. Navigated to Dev tools > Application > Selected Service Workers and selected Update on reload 
3. Dragged and dropped given file (sw.js) and clicked Update and reloaded page 
As we are not seen pending and skipwaiting 

@Reporter: Could you please check the attached screen cast and please let us know if anything missed from our end and retry this issue with New profile. Let us know whether issue still persists.

Thanks..!

890178.mp4
5.0 MB View Download
Owner: hhli@chromium.org
Status: Assigned (was: Unconfirmed)

Sign in to add a comment