Skip to content

[Service Worker Installation] Installing service worker failed SecurityError: The operation is insecure. #1407

Description

@ArgumentativeDonkey

I get this error on the firefox and chrome browsers when the service worker tries to initialize.

[Service Worker Installation] Installing service worker failed SecurityError: The operation is insecure. [Log.ts:34:18](https://cdn.onesignal.com/sdks/src/shared/libraries/Log.ts)
    p Log.ts:34
    be ServiceWorkerManager.ts:421
    e init.ts:23
    e OneSignal.ts:196
    Ne OneSignal.ts:203
    init OneSignal.ts:165
    <anonymous> (index):64
    push OneSignal.ts:302
    push OneSignal.ts:267
    t pageSdkInit.ts:21
    <anonymous> pageSdkInit.ts:50
    <anonymous> pageSdkInit.ts:60
    <anonymous> pageSdkInit.ts:60

then this one immediately after

 DOMException: The operation is insecure. [Log.ts:34:18](https://cdn.onesignal.com/sdks/src/shared/libraries/Log.ts)
    p Log.ts:34
    t pageSdkInit.ts:24
    <anonymous> pageSdkInit.ts:50
    <anonymous> pageSdkInit.ts:60
    <anonymous> pageSdkInit.ts:60

The page https://yoursite.com/OneSignalSDKWorker.js is accessible and is in the root directory. The site is hosted over https using firebase for a database.

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