Skip to content

Service worker can't be registered. #937

@hv0905

Description

@hv0905

Environment

  • Environment: Staging(Pre-release)
  • Last git commit: aaaaaa
  • Platform: Web Desktop\Web Mobile\Electron\PWA\TWA
  • Browser: Chrome\Edge\Firefox\Safari\Others

How to repro

Service worker can't be registered.
image

Expected situation

I expect that...

Other information

  1. This is because navigator.serviceWorker.controller is null when sw isn't registered. But supportWebPush() will return false when it's null, which blocks the sw to be registered.
  2. It's improper to check supportWebPush when registering sw, since sw provides many other functions, such as caching.

Metadata

Metadata

Assignees

Labels

BugConfirmedThe way to repro a bug have been found.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions