Last Comment Bug 561517 - Exception setting up account
: Exception setting up account
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Account Manager (show other bugs)
: Trunk
: All All
: -- trivial (vote)
: Thunderbird 12.0
Assigned To: Ben Bucksch (:BenB)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-23 21:34 PDT by David Ascher (:davida)
Modified: 2011-12-28 12:17 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
FIx, v1 (1.75 KB, patch)
2010-04-24 00:16 PDT, Ben Bucksch (:BenB)
bwinton: review+
Details | Diff | Splinter Review

Description David Ascher (:davida) 2010-04-23 21:34:07 PDT
I tried to setup an account for my "david@ascher.ca" account, and it failed to complete the guessing, and dumped this:

-- Exception object --
+ _message (string) 'Supplied value not in allowed list'
+ stack (string) 2952 chars
+ message (string) 'Supplied value not in allowed list'
+ toString (function) 3 lines
*
-- Stack Trace --
Exception("Supplied value not in allowed list")@chrome://messenger/content/accountcreation/util.js:179
MalformedException("allowed_value.error",null)@chrome://messenger/content/accountcreation/sanitizeDatatypes.js:231
(null,[object Object],-1)@chrome://messenger/content/accountcreation/sanitizeDatatypes.js:216
("ascher.ca",false,null,null,0)@chrome://messenger/content/accountcreation/guessConfig.js:427
guessConfig("ascher.ca",(function (type, hostname, port, ssl, done, config) {gEmailWizardLogger.info("progress callback host " + hostname + " port " + port + " type " + type);if (type == "imap" || type == "pop3") {config.incoming.type = type;config.incoming.hostname = hostname;config.incoming.port = port;config.incoming.socketType = ssl;config.incoming._inprogress = !done;} else if (type == "smtp" && !me._userPickedOutgoingServer) {config.outgoing.hostname = hostname;config.outgoing.port = port;config.outgoing.socketType = ssl;config.outgoing._inprogress = !done;}me.updateConfig(config);}),(function (config) {me.foundConfig(config);gEmailWizardLogger.info("in success, incomingState = " + me._incomingState + " outgoingState = " + me._outgoingState);if (me._incomingState == "done" && me._outgoingState == "done") {me.stopSpinner("found_settings_guess");_hide("stop_button");_show("edit_button");} else if (me._incomingState == "done" && me._outgoingState != "probing") {if (me._outgoingState == "failed") {me.stopSpinner("failed_to_find_settings");} else {me.stopSpinner("found_settings_guess");}me.editConfigDetails();} else if (me._outgoingState == "done" && me._incomingState != "probing") {if (me._incomingState == "failed") {me.stopSpinner("failed_to_find_settings");} else {me.stopSpinner("found_settings_guess");}me.editConfigDetails();}if (me._outgoingState != "probing" && me._incomingState != "probing") {me._probeAbortable = null;}}),(function (e, config) {gEmailWizardLogger.info("guessConfig failed: " + e);me.updateConfig(config);me.stopSpinner("failed_to_find_settings");me._probeAbortable = null;me.editConfigDetails();}),(function (e, config) {gEmailWizardLogger.info("guessConfig failed for incoming: " + e);me._setIconAndTooltip("incoming", "failed", "");me._incomingState = "failed";config.incoming.hostname = -1;me.updateConfig(config);}),(function (e, config) {gEmailWizardLogger.info("guessConfig failed for outgoing: " + e);me._setIconAndTooltip("outgoing", "failed", "");me._outgoingState = "failed";if (!me._userPickedOutgoingServer) {config.outgoing.hostname = -1;}me.updateConfig(config);}),[object Object],"both")@chrome://messenger/content/accountcreation/guessConfig.js:223
("ascher.ca",[object Object],"both")@chrome://messenger/content/accountcreation/emailWizard.js:587
([object Object])@chrome://messenger/content/accountcreation/emailWizard.js:496
(false)@chrome://messenger/content/accountcreation/fetchhttp.js:213
([object ProgressEvent])@chrome://messenger/content/accountcreation/fetchhttp.js:145


on console.
Comment 1 Ben Bucksch (:BenB) 2010-04-24 00:10:30 PDT
This is just informational, not a real bug. The exception is normal and not the cause of any problem (if there's a problem, it's unrelated). I should remove that exception dump, it's confusing.


|type| is null, which means we should guess the protocol:

guessConfig.js:
415    * @param type {String-enum}@see AccountConfig type
416    *     (Optional. default, 0, undefined, null = guess it)
426     var protocol = sanitize.translate(type,
427         { "imap" : IMAP, "pop3" : POP, "smtp" : SMTP }, UNKNOWN);
sanitizeDatatypes.js:
216     var e = new MalformedException("allowed_value.error", unchecked);
217     if (typeof(defaultValue) == "undefined")
218       throw e;
219     logException(e);
220     return defaultValue;

Fix:
Remove the logException() in sanitizeDatatypes.js line 217 (and line 187).
Comment 2 Ben Bucksch (:BenB) 2010-04-24 00:12:44 PDT
eh, I mean line 219
Comment 3 Ben Bucksch (:BenB) 2010-04-24 00:16:50 PDT
Created attachment 441249 [details] [diff] [review]
FIx, v1
Comment 4 Blake Winton (:bwinton) (:☕️) 2010-04-26 07:22:46 PDT
Hey Ben,

I just noticed a second error here.  If you try to find the settings for david@ascher.ca, even though we fail to find the setting for the outgoing SMTP server, the informational message is stuck at "Looking up configuration: Trying common server names".

Would you mind fixing that in this patch as well?

Thanks,
Blake.
Comment 5 Ben Bucksch (:BenB) 2010-04-26 08:11:34 PDT
IMHO, that should be a different bug. Please also check first that bug 549045 doesn't fix that.
Comment 6 Blake Winton (:bwinton) (:☕️) 2010-04-27 09:57:26 PDT
Comment on attachment 441249 [details] [diff] [review]
FIx, v1

Okay, given that I'll be filing a new bug for the other problem, this looks good to me.
Comment 7 :aceman 2011-12-22 12:25:48 PST
What about checking it in? Any other review needed?
Comment 8 Blake Winton (:bwinton) (:☕️) 2011-12-22 12:32:13 PST
Nope, we just need someone to mark it checkin-needed…

(In theory it needs sr, cause it's in /mailnews/, but in practice, Thunderbird is the only product that uses this code, so we can get away without it.)
Comment 9 Mike Conley (:mconley) 2011-12-28 12:17:43 PST
Checked in to comm-central as http://hg.mozilla.org/comm-central/rev/472d42af0853

Note You need to log in before you can comment on or make changes to this bug.