Closed
Bug 1119729
Opened 9 years ago
Closed 9 years ago
Service Workers are not registering in B2G OOP
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1137683
People
(Reporter: ferjm, Assigned: ferjm)
References
Details
Attachments
(3 files)
3.73 KB,
patch
|
Details | Diff | Splinter Review | |
1.42 KB,
patch
|
Details | Diff | Splinter Review | |
38.56 KB,
text/plain
|
Details |
Trying to run https://ferjm.github.io/sw/app/index.html on a B2G maple based build throws this error that causes the service worker registration to fail: 7648 Gecko I WARNING: child tried to open http IPDL channel w/o security info 7648 Gec.. I MainPage: Not registered: [Exception... "Illegal value" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: " native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0" data: no] Enabling "network.disable.ipc.security" pref solves the issue.
Assignee | ||
Comment 1•9 years ago
|
||
Printing the principal at [1] gives me: "ServiceWorkerManager CopyPrincipal - appId 1033 isInBrowserElement 1 uri https://ferjm.github.io" [1] https://hg.mozilla.org/projects/maple/file/217342aa5d11/dom/workers/ServiceWorkerManager.cpp#l768
Assignee | ||
Comment 2•9 years ago
|
||
This works on desktop and we print "ServiceWorkerManager CopyPrincipal - appId 0 isInBrowserElement 0 uri https://ferjm.github.io"
Comment 3•9 years ago
|
||
I bet it's https://hg.mozilla.org/projects/maple/file/217342aa5d11/dom/workers/ServiceWorkerManager.cpp#l629 which has no related loadgroup or callbacks associated with it, hence the IPDL security failure.
We'll need to grab a loadgroup from the document calling register(). Would you like to take a stab at this Fernando? You'll want to pass it in to the UpdateJob constructor, the way the principal is passed. Otherwise please assign it to me. I'll likely land fixes only in central from this point on, since we are starting to move things to central and the buggy code is in Bug 1113555.
Flags: needinfo?(ferjmoreno)
Assignee | ||
Comment 5•9 years ago
|
||
Ok, thanks for the pointers Nikhil. I'll try to take look during this week, but I am fairly new to this implementation, so I might end up assigning it to you :|.
Assignee: nobody → ferjmoreno
Flags: needinfo?(ferjmoreno)
Depends on: 1125961
Fernando, did baku's patch fix this? Please close this if it did.
Flags: needinfo?(ferjmoreno)
Assignee | ||
Comment 7•9 years ago
|
||
I am not aware of any patch that fixes this issue. We were using the "network.disable.ipc.security" workaround so far.
Flags: needinfo?(ferjmoreno)
Assignee | ||
Comment 8•9 years ago
|
||
I'm not sure if this is what you meant in comment 4. Unfortunately, it doesn't fix the issue.
Attachment #8568477 -
Flags: feedback?(nsm.nikhil)
not on maple, on central Bug 1133242.
Assignee | ||
Comment 10•9 years ago
|
||
Yes, I was testing on central. No more maple testing :) Unfortunately, bug 1133242 doesn't fix this issue. We are not crashing in this case. What happens here is that we fail to register the service worker and we log this message: "WARNING: child tried to open http IPDL channel w/o security info". Which seems to be the cause of the registration failure.
Can you try this patch?
Assignee | ||
Comment 13•9 years ago
|
||
Sure, but I am about to take a plane. I'll try and post the results here in a few hours. However, it seems that your patch is doing part of what my patch is also doing. Apart from passing the loadgroup associated with the document calling register when creating the new channel I also pass the principal, which is what your patch is doing. This didn't work for me, but I'll try without passing the loadgroup again.
Assignee | ||
Comment 14•9 years ago
|
||
Nikhil, I get the same error with both patches.
Flags: needinfo?(nsm.nikhil)
Assignee | ||
Updated•9 years ago
|
Summary: Service Workers are not registering in B2G OOP ( with maple branch) → Service Workers are not registering in B2G OOP
Comment on attachment 8568477 [details] [diff] [review] v1 Review of attachment 8568477 [details] [diff] [review]: ----------------------------------------------------------------- dropping flag since it doesn't fix the issue. Fernando, has the situation changed on this? I can try getting a build on my flame.
Attachment #8568477 -
Flags: feedback?(nsm.nikhil)
Assignee | ||
Comment 16•9 years ago
|
||
Assignee | ||
Comment 17•9 years ago
|
||
I gave this one another try and it seems that it might be a duplicate of bug 1125961. I attached a log where you can see that we are missing the TabChild instance at [1] and that's the reason why we fail the security checks and the service worker registration. [1] https://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/HttpChannelChild.cpp#1560
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(nsm.nikhil)
Resolution: --- → DUPLICATE
Comment 18•9 years ago
|
||
Bug 1137683 is actually more relevant.
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•