Closed Bug 1184822 Opened 9 years ago Closed 9 years ago

[Graphene] SystemUpdateService.jsm: line 30: NS_ERROR_XPC_GS_RETURNED_FAILURE

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- wontfix

People

(Reporter: paul, Assigned: etsai)

References

Details

Attachments

(3 files, 1 obsolete file)

Happens at startup, on my B2G build.

This component toolkit/mozapps/update/nsUpdateService.js is used instead of this one b2g/components/UpdatePrompt.js. They both register as "@mozilla.org/updates/update-service;1".

I don't know how xpcom components registration works exactly, but it's dangerous to have 2 components with the same id.

nsUpdateService.js should probably be disabled on B2G.
Blocks: 1037329
Blocks: graphene
Assignee: nobody → jacheng
Hi Paul,

Could you please paste your mozconfig for me?

I would like to know why you encounter this issue but I cannot reproduce.

Thanks.
Flags: needinfo?(paul)
Nothing but:

ac_add_options --enable-application=b2g

I use:

./mach build && ./mach run
Flags: needinfo?(paul)
It appears to be a Graphene specific issue.

I've been told to use B2G_UPDATER=1 and not MOZ_UPDATER.

Fabrice, you know better up how the update works for Graphene. Should we use the mechanism introduced in bug 1037329 or keep the original toolkit mechanism?
Assignee: jacheng → nobody
Flags: needinfo?(fabrice)
Summary: SystemUpdateService.jsm: line 30: NS_ERROR_XPC_GS_RETURNED_FAILURE → [Graphene] SystemUpdateService.jsm: line 30: NS_ERROR_XPC_GS_RETURNED_FAILURE
Attached patch B2G_UPDATERSplinter Review
This solves my issue, but I don't know how it plays Graphene's update.
When |ac_add_options --enable-updater|
The MOZ_UPDATER will be defined.
And we will get the wrong updater on b2g desktop.
To solve this problem, we set the active provider in settings only on Gonk platform.
Hi Fabrice,
Please help to review this change. 
Thank you very much.
Attachment #8635212 - Flags: review?(fabrice)
Went ahead an landed James' patch in Larch: https://hg.mozilla.org/projects/larch/rev/cc36d99ddad2

There's not r+ yet, Fabrice is on holidays, but I got Fabrice's verbal approval to land patches in larch with no review.
Whiteboard: graphene-larch
Whiteboard: graphene-larch → graphene-larch landed-in-larch-without-review
Hi Paul,

This patch should also land into Mozilla central  master.

Do you know when Fabrics will be back from holiday?

Or do you know anyone who can also review this patch?

Thank you!
Flags: needinfo?(paul)
(In reply to James Cheng[:JamesCheng] from comment #7)
> Hi Paul,
> 
> This patch should also land into Mozilla central master.
> 
> Do you know when Fabrics will be back from holiday?

The 27th.

> Or do you know anyone who can also review this patch?

Not me. :gerard-majax can probably do it.
Flags: needinfo?(paul)
Hi Gerard-majax,

Could you please review this patch?

Thanks.
Flags: needinfo?(lissyx+mozillians)
I'm not a peer for this, but it looks good. Dave did reviews on UpdatePrompt.js code for B2G and he's back from PTO tomorrow, maybe he can?
Flags: needinfo?(lissyx+mozillians) → needinfo?(dhylands)
Thanks Alexandre.

Hi Dave, if you can help to review this patch, i will modify the reviewer to you.

Thank you for your help~
What's Graphene?

B2G's mozconfig expects B2G_UPDATER to be set to 1, which will in turn do this:
https://github.com/mozilla-b2g/gonk-misc/blob/master/default-gecko-config#L53-L58
which enables MOZ_UPDATER

I don't think anybody has ever tested updates on b2g-desktop. To the best of my knowledge this isn't something that we've ever needed to support.

B2G definitely uses both toolkit/mozapps/update/nsUpdateService.js and b2g/components/UpdatePrompt.js

Since the patch only seems to affect b2g-desktop (I think that's the only B2G platform we build where MOZ_WIDGET_GONK is not set), the patch looks fine to me.
Flags: needinfo?(dhylands)
Update the reviewer to r=dhylands
Hi Dave,
Thanks for your feedback.
Please help me for reviewing this patch.

Thanks.
Attachment #8635212 - Attachment is obsolete: true
Attachment #8635212 - Flags: review?(fabrice)
Attachment #8636375 - Flags: review?(dhylands)
Attachment #8636375 - Flags: review?(dhylands) → review+
Assignee: nobody → jacheng
https://hg.mozilla.org/mozilla-central/rev/97a66defe146
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Initial investigation shows that we only fail to start with non packaged builds (unfortunately these are the ones we use for development). In packages, everything works fine without this patch.

I'm gonna look into fixing dev builds that properly, and revert the current change.
Flags: needinfo?(fabrice)
Hm, so actually with a build in $objdir:

Launching graphene from $objdir/dist/bin/graphene, MOZ_UPDATER is not set and we fail (I guess this is what Paul hit).

Launching graphene from $objdir/dist/graphene/graphene everything works fine. I'm switching to that locally.

So I'm gonna back out this patch because I don't think we need it, and even if we need something this is not the right fix.
Whiteboard: graphene-larch landed-in-larch-without-review
I encounter the same problem when build b2g-desktop with enable-updater.
https://dxr.mozilla.org/mozilla-central/source/dom/system/SystemUpdateService.js
Using contractId get component from nsUpdateService.js, is not a nsISystemUpdateProvider. The patch uses classId to get correct component from UpdatePrompt.js.
Attachment #8644120 - Flags: review?(fabrice)
Attachment #8644120 - Flags: review?(fabrice) → review+
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Checkin-needed for attachment 8644120 [details] [diff] [review]
Try server result:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=45a550b95132
Assignee: jacheng → etsai
Status: REOPENED → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b5b865a45414
Status: ASSIGNED → RESOLVED
Closed: 9 years ago9 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: