Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Generated service worker doesn't claimClient or skipWaiting on Chrome 71 incognito #380

Open
kennsippell opened this issue Jan 22, 2019 · 0 comments

Comments

@kennsippell
Copy link

kennsippell commented Jan 22, 2019

I am generating a service worker script with the following config:

  const config = {
    cacheId: 'cache',
    claimsClient: true,
    skipWaiting: true,
    directoryIndex: false,
    handleFetch: true,
    staticFileGlobs: [
      path.join(staticDirectoryPath, 'manfiest.json'),
    ],
    dynamicUrlToDependencies: {
      [rootUrl]: [path.join(staticDirectoryPath, 'templates', 'inbox.html')],
    },
    stripPrefixMulti: { [staticDirectoryPath]: '' },
    maximumFileSizeToCacheInBytes: 1048576 * 20,
    verbose: true,
  };

  return swPrecache.write(outputPath, config);

The claimsClient: true and skipWaiting: true were working fine for me until I upgrade to Chrome 71. Now when I open a Chrome 71 incogneto window and navigate to the page which registers the service worker, I see the service worker in an "installing..." state. I would expect it to be Installed since it should claim the browser and skip any waiting.

I suspect this isn't an sw-precache issue, but I'm reaching out to better understand the roots for this issue and any workarounds. This same situation is happening for headless Chrome during automated testing.

screenshot from 2019-01-22 18-03-47

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

No branches or pull requests

1 participant