Closed Bug 1101982 Opened 7 years ago Closed 7 years ago
[email/IMAP] Configurator error handler should favor IMAP error message when present and SMTP 534/5
.7 .9 errors should not map to "unknown"
Description: If a user attempts to use the Manual Setup for a gmail account that has 2 step verification enabled, half the time the user is given an 'Invalid username or password. Check for typos' error message, however the other half of the time, the user is given the following message: 'An unknown error occurred. Check your network connection or try the manual configuration option.' This error message is confusing to the user, because they are already in manual configuration, and there are not any problems with the user's network connection. Notes: -Related to bug 1073571 -2 Step verification works properly using automatic setup -If the user has an app-specific password for manual setup, they are able to proceed without an error -If the user tries an Outlook (hotmail) account with 2 step verification, they are always given the 'invalid password' error code in both manual and automatic setup, unless they are using an app specific password. Repro Steps: 1) Update a Flame device to BuildID: 20141119040205 2) Connect to WiFi or Cellular Data 3) Launch the Email app 4) Enter a gmail address that has 2 step verification enabled and select 'Manual Setup' 5) Input the IMAP/SMTP hostnames as well as the accounts primary password (not app-specific). Actual: The user is inconsistently given an error message that inaccurately directs the user to Manual Setup Expected: The user is given a consistent, accurate error message indicating they need to use an app-specific password. Environmental Variables: Device: Flame 2.2 Master (319MB) BuildID: 20141119040205 (Shallow Flash) Gaia: e64428c5b2dce5db90b75a5055077a04f4bd4819 Gecko: bc2c36dda0a9 Version: 36.0a1 (2.2 Master) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0 Repro frequency: 3/6 See attached: screenshot, logcat ------------------- This issue DOES occur on Flame 2.1. The user is inconsistently given an error message that inaccurately directs the user to Manual Setup Environmental Variables: Device: Flame 2.1 (319MB) BuildID: 20141119001205 (Shallow Flash) Gaia: 1b231b87aad384842dfc79614b2a9ca68a4b4ff3 Gecko: 95fbd7635152 Version: 34.0 (2.1) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
QA Whiteboard: [QAnalyst-Triage?]
A few things are going on here: - We intentionally removed the "application specific password" logic/string for gmail since we support OAuth2 now and our autoconfig coverage for gmail and gmail-apps-for-domains is quite good. - The IMAP probe sees that error message and returns "bad-user-or-pass" as expected. Which is a little misleading, but better. - The SMTP probe sees status 534 and enhancedStatus 5.7.9 and maps this to "unknown", which is bad and confusing. There are two bugs that I think should be addressed here: - The configurator error reporter favors the IMAP failure for server name purposes but fails to use the error from the IMAP server; it still uses the error from the first rejection that fired (SMTP in this case). - The SMTP error should probably be mapped to "bad-user-or-pass" or perhaps "server-problem". The specific code for 5.7.9/534 is defined as "This response to the AUTH command indicates that the selected authentication mechanism is weaker than server policy permits for that user. The client SHOULD retry with a new authentication mechanism." which is correct but troublesome. I'm repurposing this bug to those ends since we're not going to put back in the application specific password error message. The answer is that if the user has a gmail account, they should use autoconfig or correctly use an application specific password. If there's a moztrap case for this, it should be amended.
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
Summary: [Email][Manual Setup] Attempting Manual Setup for a gmail account with 2 factor verification gives an inconsistent, confusing error message. → [email/IMAP] Configurator error handler should favor IMAP error message when present and SMTP 534/5.7.9 errors should not map to "unknown"
I've implemented both fixes in the email.js upgrade omnibus patch. (They each get their own commit.)
Depends on: 1097421
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Fixed as part of bug 1097421's omnibus patch. Many servers were experiencing more than one bug, and we had experienced some upstream drift, and especially for uplift tracking, it made sense to land these together. See the gaia-email-libs-and-more pull request's specific commits for the specific fixes and tests. I am planning to request v2.1 uplift shortly after performing v2.1 testing.
Batching marking v2.1 fixed since the uplift of bug 1097421 occurred on Dec 9th, thereby fixing all dependent bugs of bug 1097421 on v2.1. Uplift commit comment is https://bugzilla.mozilla.org/show_bug.cgi?id=1097421#c6
Hi Martin， Please refer to the steps in the attched video. Does that mean this issue has been fixed? When I use a wrong password to log in, system will prompt "Invalid username or password. Check for typos'". And the prompt is always the same. It never show "An unknown error occurred. Check your network connection or try the manual configuration option.'" as stated in Description. When I use the correct password, it can log in successfully. If my reproduce steps are wrong, could you please provide your account and password for me?
This issue is verified fixed on Flame 2.1 and 2.2. -When using a 2-Factor authentication gmail account in Manual Setup, if the user uses the primary account password, they will always be presented with the 'Invalid username or password. Check for types' error message. The user will NOT be presented with 'An unknown error occurred. Check your network connection or try the manual configuration option.' (This is an expected error message, as 2-Factor sign-in is supported with autoconfig) -If the user inputs an Application Specific Password, they will successfully sign into the account without an error message. -If the user inputs the primary account password in autoconfig instead of Manual Setup, they will be presented with Gmail specific UI which allows them to enter the 2-factor authentication code and to sign in successfully. Environmental Variables: Device: Flame 2.2 Master (319mb)(Kitkat Base)(Full Flash) BuildID: 20150105010205 Gaia: c2bf20d23851d5fda9f8f0ef0267db5f49152376 Gecko: 636498d041b5 Gonk: a814b2e2dfdda7140cb3a357617dc4fbb1435e76 Version: 37.0a1 (2.2 Master) Firmware: V18D User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0 Environmental Variables: Device: Flame 2.1 (319mb)(Kitkat Base)(Full Flash) BuildID: 20150105001204 Gaia: 73be51f998031f06db0cd660c0e388fa621c9f4c Gecko: 05dd053f1d90 Gonk: a814b2e2dfdda7140cb3a357617dc4fbb1435e76 Version: 34.0 (2.1) Firmware: V18D User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
You need to log in before you can comment on or make changes to this bug.