K-9: Gmail App Password Fails

Created on 11 Mar 2017  路  10Comments  路  Source: k9mail/k-9

Please search to check for an existing issue (including closed issues, for which the fix may not have yet been released) before opening a new issue: https://github.com/k9mail/k-9/issues?q=is%3Aissue

Expected behavior

On entering google app password to K9, account should log in.

Actual behavior

Getting 'invalid username or password' alert from K9

Steps to reproduce

  1. In a working K9, that is able to login to gmail, export settings.
  2. In new K9 phone, import K9 settings
  3. New K9 asks for gmail password
  4. Go to google account and generate new app password
  5. Enter new app password to new K9

Environment

K-9 Mail version: 5.203

Android version: 5.1.1

Account type (IMAP, POP3, WebDAV/Exchange):
Gmail Imap

Most helpful comment

I just switched to 2SV on a couple of gmail accounts. After setting up 2SV, I generated app passwords for each account within the google account settings and updated the incoming and outgoing settings for each account in K-9 Mail without any problems at all (before generating the app passwords, I could not login anymore via K-9 Mail).

All 10 comments

I got the same errors initially. But when you check back your account, there's a security block by google that prevents signing into the account. The option for disabling this is in that email. You have to turn off that option and retry logging into gmail via K-9. There should be no problem then.
For more information, click here: https://support.google.com/accounts/answer/6010255?hl=en

Hi, IMO the answer shouldn't be lowering the security of your Gmail account; I did not look into the code yet but it is probably caused by the need of sharing your Gmail credentials with a third party.
More elaborate explanations can be found here https://security.stackexchange.com/a/7237 and here https://security.googleblog.com/2014/04/new-security-measures-will-affect-older.html

The possible solution would be to use OAuth to authenticate with Gmail and then grant access to the app.

There's already a ticket for OAuth implementation ( #1295 ). App specific passwords are supposed to work in cases where it's not available hence why I left this open.

Weird, cuz I'm importing K9 settings from another phone on which it works -- can login no problem on the other phone.

-------- Original Message --------
From: Philip notifications@github.com
Sent: March 16, 2017 11:40:27 AM PDT
To: k9mail/k-9 k-9@noreply.github.com
Cc: johnyradio johnyradio@gmail.com, Author author@noreply.github.com
Subject: Re: [k9mail/k-9] Gmail App Password Fails (#2377)

There's already a ticket for OAuth implementation ( #1295 ). App specific passwords are supposed to work in cases where it's not available hence why I left this open.

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/k9mail/k-9/issues/2377#issuecomment-287153180

I just switched to 2SV on a couple of gmail accounts. After setting up 2SV, I generated app passwords for each account within the google account settings and updated the incoming and outgoing settings for each account in K-9 Mail without any problems at all (before generating the app passwords, I could not login anymore via K-9 Mail).

Holy Crap! lauxjpn is right.
I have spent the whole morning trying to login my gmail through k9mail. It always says "Username or Password incorrect()". I checked imap/pop settings and degenerated my gmail account security level, but still failed to login, until I set up the 2-set verification and generated a app password.

I had the same (or a similar) issue today:
I tried to set up my GMail-Account and K9 keeps telling me the authentification has failed due to an invalid username/password. However I knew that both of them were correct.

I had to go to my GoogleAccount settings and enable the access for "Low security apps".

In my opinion this should not be necessary. I don't know why exactly this is happening but someone should lokk into it.

We already have issue #1295 for adding OAuth support for Gmail and issue #2000 for improving error messages on authentication failures.
This is basically a support issue which we don't want to have in the bug tracker. Closing.

I stumbled across this forum and had the same problem with K9 using Gmail. For no reason it quit working. With so many App. updates I made sure my phone, Galaxy Nexus yes the first one that ever came out that is now 10 years old now LoL! Had the Google Play Store Auto update turned off due to so many problems with the new updates. So once in a blue moon I would update but not with out checking the current reviews that were 5 stars only then do I update the app.
So for some reason something changed to my phone, or google updates daily to affect my 10 year old.

Thanks to all that found this solution.

[I had to go to my GoogleAccount settings and enable the access for "Low security apps".]

The Problem:
It was due to the Google updates over time on their web site that has a part in controlling your phone that I now have to keep current on the settings changing through the company and user interface.

Now my K9- Gmail is working again plus I found out the hard way that it helps to do the incoming password first then the out going second. I had changed it and entered it several times for the out going/sending when I needed to do the receiving, reading/fetching first.

Come to think of it I may not have had to change any password if I knew about the "Low security apps" in the first place.

Sign in to Google
My Account
Sign-In & Security
Apps With Account Access
Click on!!!
Allow Less Secure Apps.

Again Thanks to every one that came up with this solution!

From your Google Account Security page you can set individual App passwords. I've used that a couple of times for K-9 on different devices.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

digitalcraftsman picture digitalcraftsman  路  3Comments

j-ed picture j-ed  路  3Comments

NovaViper picture NovaViper  路  3Comments

Kareem-Ahmed picture Kareem-Ahmed  路  3Comments

Agno94 picture Agno94  路  3Comments