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

ServiceWorker registration and 200 while offline false negatives on punycoded URL #3040

Closed
hypesystem opened this issue Aug 18, 2017 · 6 comments

Comments

@hypesystem
Copy link

I have been turning my website, Mærkelex, into a PWA. Right now, the following checks are failing in Lighthouse:

  • Does not register Service Worker
  • Does not respond with 200 when offline
  • User will not be prompted to install the Web App

As far as I can tell (from debugging, running in offline, etc.) all of these are false negatives. A service worker is registered and it works with the "Offline" flag still.

The exact same code (at the time of writing; at least the exact same PWA-enabling code) is running here https://pwa--maerkelex.netlify.com/ where the tests all pass!

As far as I can tell, the only difference is that the URL for the main website is punycoded to contain the danish character "æ" (https://mærkelex.dk/ is punycoded as https://xn--mrkelex-mxa.dk/).

Any help is appreciated! Thanks 😄

@patrickhulce
Copy link
Collaborator

Great sleuthing so far! :)

We've previously had issues in our URL parser not properly handling punycoded-like URLs (#1972 and somewhat waiting on resolution from whatwg/url#53), but I'm actually seeing a 100 PWA score for your site in both the CLI and DevTools, so I'm not sure what's going on. It never reports success in your attempts or is it just flakey?

image

image

@hypesystem
Copy link
Author

Hey!

In my browser I consistently get the three above-mentioned errors, and consistently get 100 points (no errors!) on the alternate domain.

I've run it at least 5 times on each while pulling out my hair 😄

I see that it works in my mobile browser: I am prompted to add the site to my homescreen, so I'm all good, personally :-)

Let me know if I can do anything else to help.

@hypesystem
Copy link
Author

Just a quick update: the Chrome browser seems to not correctly trigger the "Add to homescreen" prompt for the website (I had a few friends try it out), but somehow my mobile browser, Brave, did.

@patrickhulce
Copy link
Collaborator

patrickhulce commented Aug 19, 2017

@hypesystem have they visited the site more than once? Part of the "Add to homescreen" prompt is a minimum engagement score which you can find at chrome://site-engagement/

EDIT: this may have been simplified to just "Is visited at least twice, with at least five minutes between visits." but still won't trigger if they're visiting for the first time :)

@hypesystem
Copy link
Author

@patrickhulce Yes, this is including people who have visited before and often.

@brendankenny
Copy link
Member

I'm not seeing an issue today, so hopefully this hasn't been an issue for some time :)

(engagement criteria have also changed quite a bit, so hopefully that's working out as well)

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

3 participants