Startup exceptions in AddonManager / XPIProvider

RESOLVED FIXED in mozilla30

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Irving, Assigned: Irving)

Tracking

unspecified
mozilla30
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Created attachment 8376480 [details] [diff] [review]
Handle extensions.ini exceptions and fix some log calls

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+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/f7f9328980d0
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/f7f9328980d0
Status: ASSIGNED → RESOLVED
Last Resolved: 3 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.