Author Topic: OAUTH error in Gmail account  (Read 9670 times)

Zenmaniac

  • Newbie
  • *
  • Posts: 4
OAUTH error in Gmail account
« on: February 27, 2017, 10:05:45 pm »
Greetings!

I've been using AquaMail for a little over a month, and LOVE it. So much better than the stock Gmail account. I use it with two different accounts, and it's worked great.

But about two weeks ago, around February 9th, I started getting this message on my Gmail account: "OAUTH network error: org.kman.AquaMail.mail.oauth.j: java.io.IOException: Error on service connection".

I am using the app on an Android 4.x tablet.

So far I have tried:
--Updating the app (currently on 1.8.1-193). No effect
--Deleted the account, and tried to re-add it. Now I can't even create the account.
--I have tried both the manual and new account Gmail wizard, and confirmed the settings needed for the manual.
--Tried the Gmail OAUTH tips on this page: aqua-mail.com/?page_id=227. Tried using an "Other" account to manually enter my email address and password, but despite the screen saying "Please log in", there's no place to log in.
-- My Gmail "permissions" in Security Checkup states that AquaMail has "Has access to Gmail, basic account info"

My non-Gmail account continues to work fine on the Android tablet. And I can access the Gmail account from my Windows PC and my iPhone app.

Thanks for any suggestions you may have.

Dave

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: OAUTH error in Gmail account
« Reply #1 on: February 27, 2017, 10:21:47 pm »
This is a Google Play Services issue, seems related to the device's connectivity, happens most often on mobile data.

Please remove the Aqua Mail "authorization grant" here:

https://myaccount.google.com/permissions

Switch the phone to a WiFi connection.

Add the account as Gmail type, should work, save it.

Check mail there once.

Long press on the account -> account setup -> enable the checkbox labeled "Force web based login" (below the email) and press Next

You should get new window with Google's web site inside, where you will need to log in again re-typing your password, and then grant the permission again for Aqua Mail to access your mail

Complete and save

Now Aqua Mail will use its own OAUTH2 code and not Google Play Services



If any of the above should fail:

- Please allow access to "less secure apps" here: https://www.google.com/settings/security/lesssecureapps

- Add the account into Aqua Mail as "Internet Mail" account type

PS - "less secure" means "send the password to log in, over an encrypted (of course) network connection
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Zenmaniac

  • Newbie
  • *
  • Posts: 4
Re: OAUTH error in Gmail account
« Reply #2 on: February 27, 2017, 11:46:12 pm »
Wow. Fast response -- thanks!

My tablet only works on WiFi, not on cellular data.

Your first suggestion, after deleting the AquaMail account in my Google account I still can't create the new Gmail account in AquaMail. So dead end there.

You second suggestion, to create as a "less secure", fails also, with this message from Google: "This setting is not available for accounts with 2-Step Verification enabled. Such accounts require an application-specific password for less secure apps access. Learn more"

Strange thing is, I've had 2-Step verification enabled for several years, and certainly since I first installed AquaMail. Of course, I first added the account via the Gmail wizard (which fails now).

It worked so well when I first installed it.  :(

-= Dave

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: OAUTH error in Gmail account
« Reply #3 on: February 28, 2017, 01:34:14 am »
Re: Your first suggestion, after deleting the AquaMail account in my Google account I still can't create the new Gmail account in AquaMail. So dead end there.

OK, and can you clarify the "dead end"?

"despite the screen saying "Please log in", there's no place to log in."

The "please log in" should be in the window title, and a web page from Google's web site below, with an input field for the login. That's if you tried to use "other" or "force web login".

If you didn't enable either and the account is present in the app's Settings / Accounts, then you should get a similar window ("please grant permissions") but without a field to enter the password.

Can you clarify which way you're trying and what you get on those screens exactly? Feel free to email screenshots to support / at / aqua-mail / dot com.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Zenmaniac

  • Newbie
  • *
  • Posts: 4
Re: OAUTH error in Gmail account
« Reply #4 on: February 28, 2017, 09:20:24 am »
Sorry... dead end means that I reached the point of deleting the AquaMail in Google, but could not add the account (the same error message that I related in my original post), so nothing else from that sequence of steps that you said to perform could be done.

I have attached a photo of the login page issue.

Thanks again for your support.

-= Dave

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: OAUTH error in Gmail account
« Reply #5 on: February 28, 2017, 08:31:10 pm »
Ah, looks like the window put up by Aqua Mail is there -- and it's supposed to have a piece of Google's web site in there -- that's if you use "force web login" or "other" account (for a built-in Gmail account, we use Google Play Services, the screen looks different).

And that web site is not loading for you.

The page's URL is:

https://accounts.google.com/o/oauth2/auth

Are you able to open that in a web browser on the tablet? Can you try that?

You won't get a login screen it'll just have Google's logo and "Error: invalid_request", but the page should load.

If it does not load, maybe it has the same underlying cause as the "OAUTH network errors" that happen if you pick the account from the drop-down (and then Aqua Mail uses Google Play Services to gets its OAUTH tokens, or tries to, and ends up getting network errors).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Zenmaniac

  • Newbie
  • *
  • Posts: 4
Re: OAUTH error in Gmail account
« Reply #6 on: March 01, 2017, 09:42:27 pm »
I entered that website into the browser on my tablet, I've waited 10 minutes and the page title tab still says "Loading..."

The page never loads, and the progress bar showing the status of the page load stops at about 5% across the screen and doesn't move.

Sad. Gmail used to work.

-= Dave

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: OAUTH error in Gmail account
« Reply #7 on: March 03, 2017, 07:44:55 pm »
Re: I entered that website into the browser on my tablet, I've waited 10 minutes and the page title tab still says "Loading..."

OK. So it's not an Aqua Mail bug (again!).

Either network / connectivity issues, or something else, but it's some specific to your tablet.

I can't even begin to imagine what it could be, but if that Google "auth" page doesn't load in a *web browser* then something is seriously broken.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/