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.
Printing the principal at  gives me: "ServiceWorkerManager CopyPrincipal - appId 1033 isInBrowserElement 1 uri https://ferjm.github.io"  https://hg.mozilla.org/projects/maple/file/217342aa5d11/dom/workers/ServiceWorkerManager.cpp#l768
This works on desktop and we print "ServiceWorkerManager CopyPrincipal - appId 0 isInBrowserElement 0 uri https://ferjm.github.io"
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.
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
Depends on: 1125961
Fernando, did baku's patch fix this? Please close this if it did.
I am not aware of any patch that fixes this issue. We were using the "network.disable.ipc.security" workaround so far.
Created attachment 8568477 [details] [diff] [review] v1 I'm not sure if this is what you meant in comment 4. Unfortunately, it doesn't fix the issue.
not on maple, on central Bug 1133242.
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?
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.
Nikhil, I get the same error with both patches.
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.
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  and that's the reason why we fail the security checks and the service worker registration.  https://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/HttpChannelChild.cpp#1560
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1125961
You need to log in before you can comment on or make changes to this bug.