question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PWA, Unable to fetch start URL via service worker.

See original GitHub issue

Provide the steps to reproduce

  1. Run LH (only PWA) on https://game.edendepot.com/code-lab-demo/

What is the current behavior?

Unable to fetch start URL via service worker.

What is the expected behavior?

use the start_url https://game.edendepot.com/code-lab-demo/index.html?launcher=true or / or /code-lab-demo/

Environment Information

User agent (host): Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36 User agent (network): Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse

Related issues I followed https://medium.com/coderlist/introductio-e521ad99ff89 and forked to test with GitHub pages using my own (sub) domain (master is published). Source code is at https://github.com/j2l/code-lab-demo It couldn’t find https://game.edendepot.com/code-lab-demo/manifest.json before I changed path in index.html to <link rel="manifest" href="/code-lab-demo/manifest.json"> so I guess there’s a path issue. I tried multiple ways but I’m stuck. Thanks for your help.

PS: I don’t plan to change the project path https://game.edendepot.com/code-lab-demo/ or switch hosting. I just need the right path.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
connorjclarkcommented, Jul 23, 2019

The issue you’ve encountered seems to relate to the guide you followed, so consider following up with the author in the comments section of the medium article you posted. If LH’s advice is wrong or could be more impactful, we’d be happy to hear the specifics.

I just tried looking at the URL you shared in the OP, but I don’t see a service worker being registered at all. I suppose that may be because you’ve modified the page since filing this report.

@patrickhulce

The app at that URL doesn’t seem like a working PWA. When I load the page in Chrome and go offline, nothing loads. The service worker just errors and nothing in the cache is populated.

Do we collect logs from service workers (idk if console-messages picks them up, I think we may need to manually listen to the SW target when it attaches)? Maybe we could display errors from the SW target in the PWA section of the report?

“ticket closed” = 'solved issue" is a terrible mental shortcut for everyone.

We’re optimizing for managing the actionable backlog for problems pertaining to Lighthouse, not for providing general support, which other places like Stackoverflow are much better suited for. You haven’t offered a specific problem, just a debugging story, which is not very actionable.

1reaction
j2lcommented, Jul 22, 2019

Wow, First time denial of service. Congrats Google. BTW, this pwa installs on mobile so it’s definitely a LH issue. But I guess you didn’t check.

On Jul 22, 2019 7:10 PM, “Patrick Hulce” notifications@github.com wrote:

Closed #9429 https://github.com/GoogleChrome/lighthouse/issues/9429.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleChrome/lighthouse/issues/9429?email_source=notifications&email_token=AAAP6LMIM4T4K3OENKVNRF3QAXSURA5CNFSM4IFWRBF2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSUFCVHY#event-2500471455, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAP6LOCBBHV3UKR7CJXSULQAXSURANCNFSM4IFWRBFQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Progressive Web App - Service Worker not serving start_URL
If we register the service worker file at /example/sw.js , then the service worker would only see fetch events for pages whose URL...
Read more >
Using Service Workers - Web APIs | MDN
You can attach a fetch event listener to the service worker, then call the respondWith() method on the event to hijack our HTTP...
Read more >
Service workers - web.dev
Open developer tools, then click the Application tab. · In the left pane, select Service Workers. · Check that the service worker's script...
Read more >
Service Workers - When Fetch Goes Wrong - YouTube
This is the seventh video in the Understanding Service Workers course.This video explains how you can use your Service Worker to handle an ......
Read more >
Progressive Web Apps: Going Offline - Google Developers
Write a Service Worker by hand · Add a Service Worker to an existing web application · Use the Service Worker and the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found