Closed Bug 1224570 Opened 9 years ago Closed 9 years ago

[Service Workers Panel] Service Workers panel fails to show registered service workers after restart

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Tracking Status
firefox45 --- fixed

People

(Reporter: azasypkin, Assigned: ferjm)

Details

Attachments

(2 files)

Here is what I see in the logcat when I try to open Service Workers panel after restart:

I/Gecko   (  208): XXX FIXME : Dispatch a mozIACChromeEvent: inter-app-comm-permission
I/Gecko   (  208): XXX FIXME : Dispatch a mozIACContentEvent: inter-app-comm-permission
I/Gecko   (  208): AboutServiceWorkers - Got content event {"name":"init","id":"10787a39-b44b-4b89-a746-2add77dc14cd"}
E/GeckoConsole(  208): [JavaScript Error: "Error: Encountered unsupported value type writing stack-scoped structured clone" {file: "resource://gre/modules/SystemAppProxy.jsm" line: 124}]

Panel is displayed but looks broken with empty placeholder for the SW.

Service Worker is registered for app:// protocol. Here is the app that was used to install SW [1] in _packaged app_ mode.

I've tried to run this app from b2g browser but it fails with "Content JS ERROR: Registration failed with  [Exception... "Illegal value"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: no]" while it's registered successfully on Fx Desktop Nightly - but it's out of scope :)

[1] http://fxos-performance.github.io/service-worker-empty/
Hey Fernando,

Do you have any clue what is going on here?

Thanks!
Flags: needinfo?(ferjmoreno)
Assignee: nobody → ferjmoreno
Flags: needinfo?(ferjmoreno)
Attached patch v1Splinter Review
The problem is that the sw object now includes a debugger property which is not clonable. The thing is that we don't need most of the info that we are exposing so far, so this patch makes us expose only the sw origin, scope and script url.
Attachment #8697249 - Flags: review?(fabrice)
Comment on attachment 8697248 [details] [review]
[gaia] ferjm:bug1224570.aboutsw > mozilla-b2g:master

Yura, this patch simply removes the sw properties that we don't need to expose.
Attachment #8697248 - Flags: review?(yzenevich)
Comment on attachment 8697248 [details] [review]
[gaia] ferjm:bug1224570.aboutsw > mozilla-b2g:master

Thanks
Attachment #8697248 - Flags: review?(yzenevich) → review+
Comment on attachment 8697249 [details] [diff] [review]
v1

Review of attachment 8697249 [details] [diff] [review]:
-----------------------------------------------------------------

::: b2g/components/AboutServiceWorkers.jsm
@@ +34,5 @@
> +    originAttributes: aServiceWorkerInfo.principal.originAttributes
> +  };
> +
> +  ["scope",
> +   "scriptSpec"].forEach(property => {

nit: doesn't that fit on a single line? feel free to keep it that way if you think we may add more later.
Attachment #8697249 - Flags: review?(fabrice) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/7959433e79fd98b761d5fed5d5b894200f869848
Bug 1224570 - [Service Workers Panel] Service Workers panel fails to show registered service workers after restart. r=fabrice
https://hg.mozilla.org/mozilla-central/rev/7959433e79fd
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: