3

I'm getting the follow error-msg in the console when I try to 'add to homescreen'

Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest

Register the service-worker did went fine and seems to be ok: chrome application-Service Worker

It must something to do with the scop since I'm running my site in a sub-domain(/webconnect/):

The manifest has the following values for scope and start_url:

"scope": "/webconnect/"

"start_url": "/webconnect/index.html"

I've gone through the troubleshoot section but this didn't helped me a lot:

Troubleshooting

If after testing you are getting the following error in your console:

No matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest
Then please make sure that 1. Your service worker is functioning properly and without errors, and 2. Your start_url matches an actual url of your website that loads. Else, you will never get the prompt to show!

Is there a specific trcik I'm missing to add the site to the homepage?

Community
  • 1
  • 1
user3166671
  • 45
  • 1
  • 7

1 Answers1

5

Place the service worker script file at the root of your website (/webconnect/), or place it wherever you want and use the scope property and the Service-Worker-Allowed HTTP header as in my other answer.

Ashraf Sabry
  • 3,081
  • 3
  • 32
  • 29