Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Site does not register a service worker." While it does #6342

Open
nicolas-t opened this Issue Oct 18, 2018 · 10 comments

Comments

Projects
None yet
7 participants
@nicolas-t
Copy link

commented Oct 18, 2018

Provide the steps to reproduce

  1. Go to https://bazaar.co/hello/ with google chrome
  2. Open chrome dev tools Audits tab, make sure Clear Storage is checked
  3. Run an audit

What is the current behavior?

It says

User will not be prompted to Install the Web App
Failures: Site does not register a service worker.

Meanwhile the Applications > Service workers tabs of the devtools says that my service worker is activated and running
I can also observe the cache effects of my service worker.

If you uncheck Clear Storage it seems to be working as expected.

What is the expected behavior?

The audit should not say Failures: Site does not register a service worker.

Environment Information

Related issues
#1815
#5527

(and thanks for you awesome work!)

@midzer

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2018

Hi @nicolas-t
While loading requested site, I've experienced service worker being installed while loading vast amounts of data. In my case it's been 22.8MB in 2minutes.
It is likely LH skips service worker detection after a certain amount of time, i.e. complete installing of service worker takes too long.

In general it's recommended to only include essential (small) resources into service worker, like .js, .css, .html files to make the app work at all. Seek for other caching opportunities for large media files like images or videos.

@nicolas-t

This comment has been minimized.

Copy link
Author

commented Oct 24, 2018

Hello !

Thanks for taking a look, can you explain me where did you see the 22.8MB download ?

Here I see around 2MB being downloaded: http://www.webpagetest.org/result/181024_X8_a38dbdaa3f958476f9dd6eed796f8f9e/

LH seems to agree :

image


More details about the page:
It's doing a lot of "prefetch requests" for all the js and css.
The service worker (workbox) then preload those js and css.
images, videos and fonts are not preloaded by workbox.

Thanks

@midzer

This comment has been minimized.

Copy link
Contributor

commented Oct 25, 2018

Thanks for taking a look, can you explain me where did you see the 22.8MB download ?

Load your page with empty cache and open Dev Tools under Network Tab, you'll see data amount and time at the bottom of the table.

@exterkamp

This comment has been minimized.

Copy link
Member

commented Dec 19, 2018

So I reran this in v4.0.0-beta and it registers a service worker and a full PWA badge, so I think this is fixed? Can you repro this still?

@nicolas-t

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

It's not a problem anymore with chrome 71.0.3578.98.

@nicolas-t nicolas-t closed this Dec 19, 2018

@joshpoulain1

This comment has been minimized.

Copy link

commented Feb 20, 2019

It's not a problem anymore with chrome 71.0.3578.98.

I'm still experiencing this. Service worker is registered and working great in Firefox. Chrome 72.0.3626.109 giving errors.

@nicolas-t

This comment has been minimized.

Copy link
Author

commented Feb 20, 2019

You are right.
The bug reappeared for me too (72.0.3626.109)

Same steps to reproduce as detailed in original post.

@pimhooghiemstra

This comment has been minimized.

Copy link

commented Feb 28, 2019

Hello, I was experiencing this as well (chrome 72.0.3626.119) today.

However, I was precaching quite large image files. Based on the comment of @midzer, I removed them (this is mere a test project) and gave it another try. The lighthouse scan passes and offers a score of 100 on PWA.

Note that I used Workbox from the CDN (https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js)

@tapankumar

This comment has been minimized.

Copy link

commented Mar 7, 2019

It is also not working for me.

i am on Version 72.0.3626.121 (Official Build) (64-bit)

Any suggestion?

@paulirish

This comment has been minimized.

Copy link
Member

commented Apr 25, 2019

From #6935: another possible repro site: https://www.ackeller.ch/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.