Closed
Bug 1015775
Opened 10 years ago
Closed 10 years ago
fix exceptions thrown when creating first new account
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 32.0
People
(Reporter: aceman, Assigned: aceman)
Details
Attachments
(1 file, 2 obsolete files)
8.35 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
When creating a new mail account into a new profile I get these errors in the console (error console or terminal): Timestamp: 25.05.2014 22:08:49 Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.server] Source File: resource:///modules/activity/moveCopy.js Line: 188 Timestamp: 25.05.2014 22:11:58 Error: _smtpServerAdded is not defined Source File: resource:///modules/mailInstrumentation.js Line: 68 JavaScript strict warning: chrome://messenger/content/folderPane.js, line 1279: reference to undefined property this._persistOpenMap[mode] ************************************************************ * Call to xpconnect wrapped JSObject produced this error: * [Exception... "[JavaScript Error: "this._persistOpenMap[mode] is undefined" {file: "chrome://messenger/content/folderPane.js" line: 1279}]'[JavaScript Error: "this._persistOpenMap[mode] is undefined" {file: "chrome://messenger/content/folderPane.js" line: 1279}]' when calling method: [nsIFolderListener::OnItemRemoved]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_W [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgAccountManager.defaultAccount]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chro me://messenger/content/msgMail3PaneWindow.js :: gThreePaneIncomingServerListener.onServerUnloaded :: line 200" data: no] [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgAccountManager.defaultAccount]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: reso urce:///modules/mailInstrumentation.js :: minst_postStateObject :: line 102" data: no]
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #8428418 -
Flags: review?(mkmelin+mozilla)
Comment 2•10 years ago
|
||
Comment on attachment 8428418 [details] [diff] [review] patch Review of attachment 8428418 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. There's still some errors i get in the error console (empty and "Not Found") - but I'm not on tip now ::: mail/base/modules/mailInstrumentation.js @@ +95,5 @@ > * Writes the state object to disk. > */ > _postStateObject: function minst_postStateObject() { > // Getting defaultAccount will throw an exception if no account is set up, > // so we wrap the whole thing. This coment needs moving/removing/updating @@ +100,5 @@ > + let defaultAccount; > + try { > + defaultAccount = MailServices.accounts.defaultAccount; > + } catch (e) { > + logException(e, false, "No default account found. If there are no accounts yet, the following exception can be ignored."); Then why even bother logging it ;) @@ +108,1 @@ > try { this try/catch can now be removed
Attachment #8428418 -
Flags: review?(mkmelin+mozilla) → review+
(In reply to Magnus Melin from comment #2) > Looks good to me. There's still some errors i get in the error console > (empty and "Not Found") - but I'm not on tip now Those are from the account wizard (the automatic guessing of the account values) and I do not yet know how to fix those so they are outside of the scope of this bug. I think those happen at each account creation. > @@ +100,5 @@ > > + let defaultAccount; > > + try { > > + defaultAccount = MailServices.accounts.defaultAccount; > > + } catch (e) { > > + logException(e, false, "No default account found. If there are no accounts yet, the following exception can be ignored."); > Then why even bother logging it ;) Because we didn't know if it was the case of "no accounts" (expected failure) or really an unexpected failure. I have now added some more code to distinguish the cases and only report when really necessary.
Attachment #8428418 -
Attachment is obsolete: true
Attachment #8432108 -
Flags: review?(mkmelin+mozilla)
Comment 4•10 years ago
|
||
Comment on attachment 8432108 [details] [diff] [review] patch v2 Review of attachment 8432108 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/base/modules/mailInstrumentation.js @@ +111,5 @@ > + logException(e); > + logException(ex); > + } > + return; > + } Maybe it can be simply catch (e if (MailServices.accounts.accounts.length > 0)) { logException(e); } I don't think it's worth logging if getting the list of accounts failed. That sounds very unlikely and the exception would get to the console anyway...
OK.
Attachment #8432108 -
Attachment is obsolete: true
Attachment #8432108 -
Flags: review?(mkmelin+mozilla)
Attachment #8432128 -
Flags: review?(mkmelin+mozilla)
Comment 6•10 years ago
|
||
Comment on attachment 8432128 [details] [diff] [review] patch v2.1 Review of attachment 8432128 [details] [diff] [review]: ----------------------------------------------------------------- Sweet, r=mkmelin
Attachment #8432128 -
Flags: review?(mkmelin+mozilla) → review+
Comment 8•10 years ago
|
||
https://hg.mozilla.org/comm-central/rev/177fe519c1ee
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 32.0
You need to log in
before you can comment on or make changes to this bug.
Description
•