Skip to content

Uncaught (in promise) SecurityError: Failed to get a ServiceWorkerRegistration #50

@milos-dukic

Description

@milos-dukic

When starting Campfire locally, following error occurs, visible in browser console:
Uncaught (in promise) SecurityError: Failed to get a ServiceWorkerRegistration: The origin of the provided documentURL ('null') does not match the current origin ('http://localhost:3000')

Seems that the issue is mismatch of arguments in getRegistration() call.
The argument should be origin (protocol + host), but window.location.host is passed, which is only host without protocol.

I created PR #49

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions