Closed Bug 972852 Opened 10 years ago Closed 10 years ago

Startup exceptions in AddonManager / XPIProvider

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: Irving, Assigned: Irving)

References

Details

Attachments

(1 file)

The telemetry added in bug 952543 has recorded a few exceptions (in order of number of occurrences in the last three-ish weeks of Nightly builds):

305	{"message": "[Exception... \"Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setIntPref]\"  nsresult: \"0x8000ffff (NS_ERROR_UNEXPECTED)\"  location: \"JS frame :: resource://gre/modules/AddonManager.jsm :: AMI_startup :: line 503\"  data: no]", "module": "AMI", "context": "startup failed"}
75	{"context": "startup failed", "message": "ReferenceError: id is not defined", "module": "XPI", "line": 2407, "file": "resource://gre/modules/XPIProvider.jsm"}
14	{"message": "[Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFile.moveTo]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm -> resource://gre/modules/XPIProviderUtils.js :: XPIDB_writeAddonsList :: line 1481\"  data: no]", "module": "XPI", "context": "startup failed"}
7	{"message": "[Exception... \"Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]\"  nsresult: \"0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm -> resource://gre/modules/XPIProviderUtils.js :: XPIDB_writeAddonsList :: line 1481\"  data: no]", "module": "XPI", "context": "startup failed"}
5	{"context": "startup failed", "message": "ReferenceError: id is not defined", "module": "XPI", "line": 2415, "file": "resource://gre/modules/XPIProvider.jsm"}
4	{"context": "startup failed", "message": "ReferenceError: id is not defined", "module": "XPI", "line": 2423, "file": "resource://gre/modules/XPIProvider.jsm"}
2	{"message": "[Exception... \"Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.persistentDescriptor]\"  nsresult: \"0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm :: XPI_startup :: line 2072\"  data: no]", "module": "XPI-BOOTSTRAP", "context": "startup failed"}
1	{"message": "[Exception... \"Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.isDirectory]\"  nsresult: \"0x80520012 (NS_ERROR_FILE_NOT_FOUND)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm :: XPI_processPendingFileChanges/< :: line 2456\"  data: no]", "module": "XPI", "context": "startup failed"}
1	{"message": "[Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFileOutputStream.write]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm -> resource://gre/modules/XPIProviderUtils.js :: XPIDB_writeAddonsList :: line 1479\"  data: no]", "module": "XPI", "context": "startup failed"}
The most common error:

[Exception... \"Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setIntPref]\"  nsresult: \"0x8000ffff (NS_ERROR_UNEXPECTED)\"  location: \"JS frame :: resource://gre/modules/AddonManager.jsm :: AMI_startup :: line 503\"  data: no]

Based on reading the code, the most likely cause for this is that the stored preferences file defines the 'extensions.blocklist.pingcountversion' pref to be something other than Int. I can't see anything else that would lead to this error.
This should either fix or catch&log all the exceptions except the first (setIntPref).

We should do something better with the writeAddonsList() failures, but I'd prefer to leave that for when we convert it to async I/O.

In other news, I hate it when my warning-logging code throws. What's Latin for "Who exception-catches the exception-catchers?"
Attachment #8376480 - Flags: review?(dtownsend+bugmail)
Attachment #8376480 - Flags: review?(dtownsend+bugmail) → review+
https://hg.mozilla.org/mozilla-central/rev/f7f9328980d0
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: