New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 903255 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Add to homescreen not working with scoped service worker

Reported by mayank.c...@cleartax.in, Nov 8

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

Steps to reproduce the problem:
1. create a manifest with start_url and scope as '/abc'
2. create a service worker in /abc with /abc/ scope
3. click on add to home screen in devtools

What is the expected behavior?
It shouldn;t throw the error

What went wrong?
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

Did this work before? N/A 

Chrome version: 70.0.3538.77  Channel: stable
OS Version: OS X 10.12.6
Flash Version: 

Full description of the problem

So i want add to home screen on https://milliodollarwebsite/abc.

So my manifest is

{
  "short_name": "abc",
  "name": "abc",
  "icons": [
    {
      "src": "milliondollarpng",
      "type": "image/png",
      "sizes": "192x192"
    }
  ],
  "start_url": "/abc/",
  "background_color": "#FFF",
  "display": "standalone",
  "scope": "/abc/",
  "theme_color": "#FFF"
}

When i'm keeping my service worker file at /abc scoped to /abc/ i'm getting this error:

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

But when i'm keeping my service worker file at root(/) scoped to / add to home screen is working fine. I don't want to keep service worker at the root directory.
 
Cc: mgiuca@chromium.org
Components: -Blink Blink>AppManifest
Can you make your scope "/abc" without a trailing slash?

Note, there is an open manifest spec issue about cases where you may need the slash to distinguish "/abc/index.html" resources from "/abcdef/index.html" resources:

https://github.com/w3c/manifest/issues/554#issuecomment-371692572
Labels: Needs-Triage-M70

Comment 3 Deleted

I was able to figure out this problem. This ticket can be closed.
Labels: Triaged-ET
Status: WontFix (was: Unconfirmed)
As per comment #4, closing the issue as wontFix.

Thanks...!!

Sign in to add a comment