Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.
This repository was 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

Description

@kennsippell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions