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

Service worker registered too late for Lighthouse to detect #13138

Closed
2 tasks done
SirJackovich opened this issue Sep 29, 2021 · 13 comments
Closed
2 tasks done

Service worker registered too late for Lighthouse to detect #13138

SirJackovich opened this issue Sep 29, 2021 · 13 comments
Assignees

Comments

@SirJackovich
Copy link

FAQ

URL

https://beta.familysearch.org/africa/

What happened?

I have built a PWA that is installable but when I run the lighthouse check it fails saying it is not installable.

Screen Shot 2021-09-29 at 9 02 34 AM

Screen Shot 2021-09-29 at 9 03 32 AM

Screen Shot 2021-09-29 at 9 03 54 AM

What did you expect?

I expected the check to pass, the app is installable but for some reason lighthouse does not think it is.

What have you tried?

Updating the manifest.json with different config options.

How were you running Lighthouse?

Chrome DevTools

Lighthouse Version

8.3.0

Chrome Version

Version 94.0.4606.61 (Official Build) (x86_64)

Node Version

14

Relevant log output

No response

@rvsheffer
Copy link

rvsheffer commented Sep 29, 2021

@SirJackovich and I are on similar type teams within FamilySearch, and we are experiencing this with our app as well (although it is still very much a work in progress -- in beta -- the link is here):

FamilySearch Kids

@Heatmanofurioso
Copy link

Heatmanofurioso commented Nov 24, 2021

Any news on this issue?

I'm also running an app, currently testing PWA capabilities on my QA environment, and the app is installable, the service worker seems to work correctly, but according to Lighthouse, it's missing the service worker.

I'd also like to note that explicitly when running the Lighthouse report for PWAs, I'm getting an error running my service worker registration script. Although, when running the website normally, no such error occurs, and I can also see on the devtools that the app is installable

image

image

image

@connorjclark
Copy link
Collaborator

connorjclark commented Nov 24, 2021

@Heatmanofurioso Thanks for the report, that error case does look interesting, however without a URL for us to poke and prod at debugging is impossible for us :( Is there anyway you can make a smaller repro case and share, or give us access to this QA env?

Do you see the same using the latest Lighthouse Node CLI?

@Heatmanofurioso
Copy link

Heatmanofurioso commented Nov 25, 2021

Hi @connorjclark First off, thank you for taking time to check this out
I can share the url for now, and tomorrow I can do both the cli test and attempt to recreate a small reproducible use-case in an open-sourced repo or gist ‘I’m a bit tight on time for the latter, but I will try’. I did develop this solution using Angular 13 and Angular PWA. Would this be an issue regarding in getting a reproducible use-case?

As for the link for my QA. It is the following https://gigger.ddns.net

@Heatmanofurioso
Copy link

Heatmanofurioso commented Nov 25, 2021

@connorjclark I'd like to confirm that running on the latest Node CLI app, I do get a correct response saying my app is valid as a PWA.

The specs are as following "Same ones used to run the browser app":

  • Lighthouse: 9.1.0
  • Node: 16.13.0
  • OS: Windows 11 Version 10.0.22000 Build 22000
  • Browser 1: Brave: Version 1.32.106 Chromium: 96.0.4664.45 (Official Build) (64-bit)
  • Browser 2: Chrome Version 96.0.4664.45 (Official Build) (64-bit)
  • Also tested on Firefox

Mobile:
image
Desktop:
image

@Heatmanofurioso
Copy link

Any possible news on this issue?

Would it still be useful to make a reproducible example?

@Heatmanofurioso
Copy link

The issue seems to haven been fixed somehow on Web.dev and running the Chrome tool.

I have made no change to my production code whatsoever

@connorjclark
Copy link
Collaborator

connorjclark commented Dec 7, 2021

In the image in your original post, what was the "1 reason" Lighthouse found? Do you recall?

image

#13396 details a bug we have running LH in DevTools on pages w/ service workers.

EDIT

it's missing the service worker.

Ah, ok.

So it's working for you now in Stable or Canary? When was the last time it wasn't working?

@Heatmanofurioso
Copy link

Heatmanofurioso commented Dec 8, 2021

Lighthouse was saying it couldn't find the service worker, if I recall correctly.
But it was present, same way as it is right now.
It was also considered working by the browser itself and other tools.

It's running fine in stable, I believe.
Last time it wasn't working was about 3 days ago

@adamraine
Copy link
Member

Lighthouse was saying it couldn't find the service worker, if I recall correctly.

Was it "Lighthouse could not determine if there was a service worker. Please try with a newer version of Chrome." if so, that was the error added in #13396. It would make sense why the issue was fixed in that case.


For https://beta.familysearch.org/africa/ and https://beta.familysearch.org/discovery/kids, it looks like the service worker takes too long to register so Lighthouse doesn't notice it. We could mention that as a possible reason for failure in the message.

Beyond that I'm not sure if there is much we can do here. Maybe we could look for pending service workers somehow?

@Heatmanofurioso
Copy link

With no update on my app regarding this, it started working.

So, I assume a fix somewhere on Lighthouse's side was done?

@adamraine
Copy link
Member

Based on what you've reported it was most likely #13396.

@adrianaixba
Copy link
Collaborator

As per Chrome’s updated Installability Criteria, Lighthouse will be deprecating the PWA category in the next upcoming release. For future PWA testing, users will be directed to use the updated PWA documentation. Marking this as closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants