[Graphene] SystemUpdateService.jsm: line 30: NS_ERROR_XPC_GS_RETURNED_FAILURE

RESOLVED FIXED in mozilla42



DOM: Device Interfaces
3 years ago
3 years ago


(Reporter: paul, Assigned: Eric Tsai (no more review request accepted))


Dependency tree / graph

Firefox Tracking Flags

(firefox42 wontfix)



(3 attachments, 1 obsolete attachment)



3 years ago
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.


3 years ago
Blocks: 1037329


3 years ago
Blocks: 1115098
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.

Flags: needinfo?(paul)

Comment 2

3 years ago
Nothing but:

ac_add_options --enable-application=b2g

I use:

./mach build && ./mach run
Flags: needinfo?(paul)

Comment 3

3 years ago
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

Comment 4

3 years ago
Created attachment 8635199 [details] [diff] [review]

This solves my issue, but I don't know how it plays Graphene's update.
Created attachment 8635212 [details] [diff] [review]

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)

Comment 6

3 years ago
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


3 years ago
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)

Comment 8

3 years ago
(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?

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:
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)
Created attachment 8636375 [details] [diff] [review]

Update the reviewer to r=dhylands
Hi Dave,
Thanks for your feedback.
Please help me for reviewing this patch.

Attachment #8635212 - Attachment is obsolete: true
Attachment #8635212 - Flags: review?(fabrice)
Attachment #8636375 - Flags: review?(dhylands)
Attachment #8636375 - Flags: review?(dhylands) → review+
Keywords: checkin-needed
Assignee: nobody → jacheng
Last Resolved: 3 years ago
status-firefox42: --- → fixed
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
Merge of backout:
status-firefox42: fixed → wontfix
Resolution: FIXED → WONTFIX
Created attachment 8644120 [details] [diff] [review]

I encounter the same problem when build b2g-desktop with enable-updater.
Using contractId get component from nsUpdateService.js, is not a nsISystemUpdateProvider. The patch uses classId to get correct component from UpdatePrompt.js.


3 years ago
Attachment #8644120 - Flags: review?(fabrice)
Attachment #8644120 - Flags: review?(fabrice) → review+


3 years ago
Resolution: WONTFIX → ---
Checkin-needed for attachment 8644120 [details] [diff] [review]
Try server result:
Assignee: jacheng → etsai
Keywords: checkin-needed
Duplicate of this bug: 1191969
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.