Closed Bug 1312668 Opened 8 years ago Closed 8 years ago

Allow ServiceWorkers over moz-extension:// protocol

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: personaldev, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 Build ID: 20161019084923 Steps to reproduce: Run the code `navigator.serviceWorker.register(url)` from a page opened from a WebExtensions add-on (the URL of the page should be moz-extension://{ID}/file.html) Actual results: An error is logged to the console: "SecurityError: The operation is insecure" Expected results: The ServiceWorker should have been registered.
OS: Unspecified → All
Hardware: Unspecified → All
Hi Druzion, Could you please attach a minimal testcase so I can test this on my end ? Thank you.
Flags: needinfo?(personaldev)
Attached simple example. Once installed, you have to wait a few seconds for the error to be logged, and Firefox sometimes shows "(unknown)" as the source of the error.
Flags: needinfo?(personaldev)
(In reply to Druzion from comment #0) > Steps to reproduce: > > Run the code `navigator.serviceWorker.register(url)` from a page opened from > a WebExtensions add-on (the URL of the page should be > moz-extension://{ID}/file.html) I've managed to install the test extension you provided, but the browser console throws a lot of errors (see attachment) and I'm at a loss how exactly I should open a page from the extension.
Flags: needinfo?(personaldev)
Attached file errors.txt
Those errors are just ones that have accumulated while browsing the internet. Just before you install the extension, clear the Browser Console. Then install the extension and you will see the error.
Flags: needinfo?(personaldev)
Component: Untriaged → DOM: Service Workers
Product: Firefox → Core
Version: 49 Branch → unspecified
Hi Ben, do we have any plans yet to support moz-extension protocol?
Flags: needinfo?(bkelly)
Don't extensions have their own way to handle network interceptions? Currently we have no plans to allow this.
Flags: needinfo?(bkelly)
Priority: -- → P3
According to comment 7, I tend to close this as WONTFIX for now. Hi Reporter, If you have a specific extension use case that the current extension interception method cannot fulfill your need, you may consider filing a bug under the product/component - Toolkit/WebExtensions:Untriaged - to get right people's attention.
Priority: P3 → --
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: