Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceWorker fetch failed (ERR_NAME_NOT_RESOLVED) #13

Open
trogper opened this issue Nov 1, 2018 · 6 comments
Open

ServiceWorker fetch failed (ERR_NAME_NOT_RESOLVED) #13

trogper opened this issue Nov 1, 2018 · 6 comments
Labels
bug Something isn't working

Comments

@trogper
Copy link

trogper commented Nov 1, 2018

Installing serviceworker using following code fails with ERR_NAME_NOT_RESOLVED
I am able to load sw.js file using ajax and via script tag just fine

navigator.serviceWorker.register('sw.js').then(function(registration) {
  console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
  console.log('ServiceWorker registration failed: ', err);
});

The result is

An unknown error occurred when fetching the script.
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
ServiceWorker registration failed:  TypeError: Failed to register a ServiceWorker: An unknown error occurred when fetching the script.
@trogper trogper changed the title ServiceWroker installation failed ServiceWroker fetch failed (ERR_NAME_NOT_RESOLVED) Nov 1, 2018
@trogper trogper changed the title ServiceWroker fetch failed (ERR_NAME_NOT_RESOLVED) ServiceWorker fetch failed (ERR_NAME_NOT_RESOLVED) Nov 1, 2018
@pavelfeldman
Copy link
Collaborator

I can look into fixing this, but you would pretty much never want to use ServiceWorker in combination with Carlo. What is your use case?

When running Carlo, your Node application is a sort of a ServiceWorker on steroids itself. I can expose fetch interception from Puppeteer so that it looked similar to ServiceWorker, but given that you already have RPC between the two, you would rarely need it.

@trogper
Copy link
Author

trogper commented Nov 1, 2018

Rich notifications, since It's only possible to create them from ServiceWorker.
Windows 10 requires an app to "be installed" and provide it's appID to create them.

@pavelfeldman
Copy link
Collaborator

Do you think something like node-notifier could do the job?

@trogper
Copy link
Author

trogper commented Nov 1, 2018

I have tried it, It also requires the appID

@pavelfeldman
Copy link
Collaborator

Got it, thanks for confirming. We would want to make sure any web content loads in Carlo, so your SW request stands as a bug report.

@jamesb3ll
Copy link

jamesb3ll commented Nov 2, 2018

Web Push support (GCM) from Service Worker pushManager would be great as electron doesn't support it: electron/electron#6697

@pavelfeldman pavelfeldman added the bug Something isn't working label Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants