Skip to content

Failed to register SW #3897

Closed
Closed

Description

@havenchyk

When I'm trying to register service worker, it fails with following message

Failed to register a ServiceWorker: No URL is associated with the caller's document.

Electron 36.0, ubuntu 14.04

Here is what I'm trying to do

require('web-frame').registerURLSchemeAsPrivileged('file');

navigator.serviceWorker.register('my-worker.js', {scope: './'}).then((registration) => {
    console.log('Registration succeeded.');
}).catch(function(error) {
    console.log('Registration failed with ' + error);
});

Am I doing something wrong?

Activity

  1. havenchyk commented on Dec 23, 2015

    @havenchyk
    Author

    Is there any thoughts, guys?

  2. added
    blocked/need-info ❌
    on Dec 23, 2015
  3. zcbenz commented on Dec 23, 2015

    @zcbenz
    Contributor

    Can you provide a full example?

  4. havenchyk commented on Dec 23, 2015

    @havenchyk
    Author

    Heh, can't reproduce. Maybe I had an old version of electron-prebuilt and didn't update it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked/need-info ❌

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions