Closed Bug 326917 Opened 19 years ago Closed 18 years ago

Every few minutes an Auto-Update exception appears on Console

Categories

(Toolkit :: Application Update, defect)

1.8.0 Branch
Other
FreeBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: firefox, Unassigned)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.0.1) Gecko/20060204 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.0.1) Gecko/20060204 Firefox/1.5.0.1

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXULRuntime.XPCOMABI]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: file:///usr/X11R6/lib/firefox/components/nsUpdateService.js :: anonymous :: line 1689"  data: no]
Source File: file:///usr/X11R6/lib/firefox/components/nsUpdateService.js
Line: 1689


Line 1689 is this:
     url = url.replace(/%BUILD_TARGET%/g, gApp.OS + "_" + gApp.XPCOMABI);


Reproducible: Always
Component: Software Update → Extension/Theme Manager
QA Contact: software.update → extension.manager
Reversing incorrect component change, sorry for bugspam.
Component: Extension/Theme Manager → Software Update
QA Contact: extension.manager → software.update
I ran into this a few days ago with a XULRunner binary built on an AMD64x2 machine. The basic problem is that gApp.XPCOMABI throws an exception if it isn't available rather than simply returning an empty string (why?). A simple try/catch fixes this on the client side, but then you'll run into further problems when the update url is sent to AUS.

I guess the real question is why your TARGET_XPCOM_ABI var isn't being set in configure. CC'ing bsmedberg.

FWIW I think we should fix the update service to either fail gracefully or append an empty string to the update url if gApp.XPCOMABI throws this exception.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Firefox 2
Version: unspecified → 1.5 Branch
This patch simply pulls the ABI string from the update url. I don't know if this will work with AUS, though.
Attachment #211608 - Flags: review?(darin)
(In reply to comment #3)
> Created an attachment (id=211608) [edit]
> patch v1.0 that strips the ABI string from the update url if TARGET_XPCOM_ABI
> is not available

See also bug 323330. That case falls back to "unknownABI", might want to do the same here (though I'm not sure whether the server side handles these cases differently).
Comment on attachment 211608 [details] [diff] [review]
patch v1.0 that strips the ABI string from the update url if TARGET_XPCOM_ABI is not available

Having .xpcomABI throw is by design, because configure doesn't have enough information to know what the ABI is.

In this case software update should fail completely (it should not even try to update the app, because it does not have enough information to do so).
Attachment #211608 - Flags: review?(darin) → review-
So then the question is how will this become known to the user. We can add a check to the canUpdate function that will return false if the ABI is unknown, but that will just disable the service without notifying the user. We could also pop up a dialog of some sort, perhaps even using the download-failed poage from updates.xul. Thoughts?

I'm certainly curious to know which configurations cause the ABI to remain unresolved.
I think that we should silently disable all auto-update mechanisms if we don't know what the XPCOM ABI is.

configure.in has various tests to determine what the XPCOM ABI is... if either of the compiler ABI or processor architecture is uncertain the value is not set: see http://lxr.mozilla.org/mozilla/source/configure.in#1053
This patch will disable the update service in the event that TARGET_XPCOM_ABI is not set.
Attachment #211608 - Attachment is obsolete: true
Attachment #211761 - Flags: review?(benjamin)
Attachment #211761 - Flags: superreview?(darin)
Attachment #211761 - Flags: review?(benjamin)
Attachment #211761 - Flags: review+
Attachment #211761 - Flags: superreview?(darin) → superreview+
Please don't land this patch, I'm going to incorporate it into bug 323328
Depends on: 323328
Fixed by bug 323328 on trunk, 1.8, 1.8.0
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: