Closed Bug 1202951 Opened 10 years ago Closed 10 years ago

Service worker fails to register with SecurityError if the name of the script is too long

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox43 --- affected

People

(Reporter: marco, Unassigned)

Details

http://localhost:4200/aserviceworker.js gets registered http://localhost:4200/aservice-worker.js fails with SecurityError: The operation is insecure. The code I'm using to register the service worker is: if ("serviceWorker" in navigator) { navigator.serviceWorker.register("aserviceworker.js").then(function(registration) { console.log("Service worker registration successful with scope: " + registration.scope); console.log("Service worker is: " + (navigator.serviceWorker.controller ? "controlling" : "not controlling")); }).catch(function(error) { console.log("Service worker registration failed with error: " + error); }); }
Can you upload your full source tree to github and post a link here? I'd like to see what your two service worker scripts looks like. Thanks!
Flags: needinfo?(mar.castelluccio)
Actually they're the same script, I'm simply renaming it. I'll upload everything on GitHub tomorrow, basically I'm using https://github.com/marco-c/broccoli-serviceworker to generate the script.
Flags: needinfo?(mar.castelluccio)
I can't reproduce this anymore. I'm not sure if it's an effect of some of my latest changes or if there was something wrong I was doing.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
No longer blocks: WADI
You need to log in before you can comment on or make changes to this bug.