jberkel / sms-backup-plus

Backup Android SMS, MMS and call log to Gmail / Gcal / IMAP
https://play.google.com/store/apps/details?id=com.zegoggles.smssync
Apache License 2.0
1.8k stars 499 forks source link

[solved] Can no longer authenticate to Gmail May 1 2021 #1061

Closed boydkelly closed 3 years ago

boydkelly commented 3 years ago

Backup can no longer connect to Gmail. I tried to disconnect and reauthenticate but get a message:

This app is blocked.

This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.

Are we able to set up an application password?

Hopefully this will get sorted out. Has been a great app!

mjxyz commented 3 years ago

I have this issue as well, and my Ggl security settings do not give me an option to add an app password for SMSbackup+. I do NOT have 2-factor enabled. Is there another way to enable SMSbackup+ ?

ajhepple commented 3 years ago

Your problems are most likely due to a restriction that Google applied in June 2019. There are other issues that cover the problem extensively. See those issues for full details but essentially, the solution involves using an app password and IMAP.

Please checkout the other issues and consider closing this one if you find what you need.

boydkelly commented 3 years ago

I have this issue as well, and my Ggl security settings do not give me an option to add an app password for SMSbackup+. I do NOT have 2-factor enabled. Is there another way to enable SMSbackup+ ?

Something happend on May 1st. Google changed something. (Maybe only for Google workspace??) But otherwise I was able to get it going again with an app password. You have the option of adding an app password in the advanced settings/Custom Imap server. You need to enter imap.google.com:993 for the server and your email as username. Enter the app password as you IMAP password. Set security to TLS.

mjxyz commented 3 years ago

@ajhepple - thanks for info, i was reading post #970 but I wasn't able to set up app passwords in Gmail. It turns out that this option is only available if 2-factor authentication is on. @boydkelly - thanks for the details, exactly what I needed once 2factor was set up in Gmail. One minor correction - it's imap.gmail.com (not google) All working for me now. A link to #970 should really be in the readme.md because this issue will affect all new users and installs on new devices and it's a showstopper.

MysticMagican commented 3 years ago

I have this issue as well, and my Ggl security settings do not give me an option to add an app password for SMSbackup+. I do NOT have 2-factor enabled. Is there another way to enable SMSbackup+ ?

Something happend on May 1st. Google changed something. (Maybe only for Google workspace??) But otherwise I was able to get it going again with an app password. You have the option of adding an app password in the advanced settings/Custom Imap server. You need to enter imap.google.com:993 for the server and your email as username. Enter the app password as you IMAP password. Set security to TLS.

Had to set up SMS Backup+ on a new Device (Pixel) and can´t get it running at all. Settings as told, using app password but still get the message that boydkelly mentioned. Until now it´s the 5´th device I want to using SMS Backup+ with but it seems the journey ends here... And the only feature I´ve used in the last years is the call log calendar intgration.

mjxyz commented 3 years ago

@MysticMagican I believe that if you are getting the "tried to access sensitive data" message then it is still trying to use XOauth. I would suggest going through the setup again carefully step by step, and maybe clearing your app cache first (google how to do this on your phone). When I go into SMSbackup+, the 'Connect' setting is greyed out (just under the [backup] and [restore] buttons) but it shows [myemail]@gmail.com@imap.gmail.com:993 which confirms I am connecting with imap and not XOauth. You could also try the 3 dots in the top right and 'view log'. If I do this then I can see that sometimes it fails to connect, but usually it works.

MysticMagican commented 3 years ago

d At start after fresh (1´st time on that device) under "Legacy settings" is "XOAuth2 is no longer supported" written. Authentication shows "plain text" (hope so, my device setting is german^^) Connect button is greyed out too, but shows no account. IMAP Settings says Server adress : imap.gmail.com:993 User name : [uname]@gmail.com Password : the app password as usual Security : TLS Cert : not checked

When I hit the "Connect" button, the pop up shows the radio button pre selected with my gmail-adress. Hit ok and get the error message.

Do I have to change my user name to match your syntax?

And Log: Check boxes are active but if i want to se it, it says that it´s empty.

Sadly I havn´t a device in place anymore with running/working app.

And: the device now is again since 4 years one with 2 active SIM cards. I hope if I get it running, that I can adress this in the call log.

kurahaupo commented 3 years ago

@boydkelly Google announced the "sensitive scopes" policy about 3 years ago, and rolled it out progressively to different customer types, starting with free/consumer Gmail.com accounts in 2019, and subsequently to contracted corporate accounts.

I'd thought they had applied it to all account types some time last year, but it's possible that you were in a category that got a longer transition period.

(Google's rationale is that they want to audit which apps get access to the most sensitive of personal information: the ability to read your email, or to send email on your behalf. And they err on the side of caution: don't grant access unless they're sure. They did a write-up explaining the types of apps that would qualify. Unfortunately the word "BACKUP" in the name of this app derailed that conversation into "Gmail is not a backup storage service". A more likely approach would be "this app allows users to read their SMS and Email all in one place" (namely, the gmail app), but that will probably take renaming the app.)

The "legacy settings" section refers to XOAUTH, because we can't currently support; please avoid it for now.

@MysticMagican can you attach a log to this ticket?

boydkelly commented 3 years ago

I believe you have to enable 2 factor. Then you are good to go.

On Tue, 4 May 2021 at 11:24, mjxyz @.***> wrote:

I have this issue as well, and my Ggl security settings do not give me an option to add an app password for SMSbackup+. I do NOT have 2-factor enabled. Is there another way to enable SMSbackup+ ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jberkel/sms-backup-plus/issues/1061#issuecomment-831868538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2BH3BRDIGJESQMDXHZESLTL7KONANCNFSM436HBWAQ .

-- Boyd Kelly @.***> www: http://www.coastsystems.net Tel: +1 604 837-0765

CharlesBMiller commented 3 years ago

The app worked GREAT until today. When I tried to setup my new Android 10 phone using the IMAP procedure and the same password that was working on my older Android 8 phone that would not work. Then later I noted that the app is no longer working on my old Android 8 phone though I had not touched it.

SMS Backup+ did work on that old phone up until a few hours ago when I tried to use the same app on the new phone. I have spent the whole morning working on this. All attempts to get the app working again on the older Android 8 phone and the newer Android 10 phone have failed. The app starts, but when I "Tap to connect to your Gmail account" the message says "This app is blocked. This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access."

When I try to setup using the IMAP servers that did work in 2019, and continued to work up until today, that also fails.

If you are reading this, it is probably too late... but it appears that the app will continue working on your phone unless you make ANY changes at google.com or try installing the app on a new phone.

boydkelly commented 3 years ago

Once you set up two factor authentication, then it will work with the app password obtained from:

https://support.google.com/accounts/answer/185833?hl=en

On Mon, 24 May 2021 at 15:52, CharlesBMiller @.***> wrote:

The app worked GREAT until today. When I tried to setup my new Android 10 phone using the IMAP procedure and the same password that was working on my older Android 8 phone that would not work. Then later I noted that the app is no longer working on my old Android 8 phone though I had not touched it.

SMS Backup+ did work on that old phone up until a few hours ago when I tried to use the same app on the new phone. I have spent the whole morning working on this. All attempts to get the app working again on the older Android 8 phone and the newer Android 10 phone have failed. The app starts, but when I "Tap to connect to your Gmail account" the message says "This app is blocked. This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access."

When I try to setup using the IMAP servers that did work in 2019, and continued to work up until today, that also fails.

If you are reading this, it is probably too late... but it appears that the app will continue working on your phone unless you make ANY changes at google.com or try installing the app on a new phone.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jberkel/sms-backup-plus/issues/1061#issuecomment-847141915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2BH3ANZQBIJ6GXEO5ZPVTTPJY3DANCNFSM436HBWAQ .

-- Boyd Kelly @.***> www: http://www.coastsystems.net Tel: +1 604 837-0765

CharlesBMiller commented 3 years ago

Sorry, but that is a no-go and enabling two-factor does NOT work.

Your advice was correct in 2019 but no longer. It appears that so long as you make no changes to your "app passwords" in your Google account then SMS Backup+ will continue working... but as soon as you make any changes the app will stop working on all devices and it cannot be reactivated.

CharlesBMiller commented 3 years ago

p.s. boydkelly

Thanks for your suggestion. I respectfully urge you not to try testing it yourself. I suspect you will find as I did that once Google kills your connection with the app that you can never start it again.

boydkelly commented 3 years ago

No that is not the case. My connection was toasted with the message you describe. But using the app password fixed the issue. On May 1st. Set up 2 factor authentication. Get an app password and enter it as described above.

On Mon, May 24, 2021, 16:40 CharlesBMiller @.***> wrote:

p.s. boydkelly

Thanks for your suggestion. I respectfully urge you not to try testing it yourself. I suspect you will find as I did that once Google kills your connection with the app that you can never start it again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jberkel/sms-backup-plus/issues/1061#issuecomment-847182986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2BH3DCXI22FP7YE7OVRHTTPJ6OHANCNFSM436HBWAQ .

CharlesBMiller commented 3 years ago

Don't get me wrong; I really want this to work, but it does not. I have tried multiple times on two different phones, using the procedure described here and which DID work for me in 2019. Google has changed something. Or is it possible that only one phone can be used on an account, even if they have separate app passwords?

mjxyz commented 3 years ago

@CharlesBMiller - I have got this to work on a brand new phone in the last month. I DID have to enable 2-factor authentication, and I DID have to create a new app password specifically for SMSbackup+ and the new phone. And then in SMSbackup+ I have to choose Advanced settings | Custom IMAP server | imap.gmail.com:993 for the server and [myemail]@gmail.com as the IMAP account/e-mail address. Enter the app password as your IMAP password. Set security to TLS. (If I install SMSbackup+ on a different phone that will require another app password to be generated in my Security settings in my Google (not gmail) account). Refer to post #970 as well

CharlesBMiller commented 3 years ago

SOLVED! Setting up a new phone using the same Google Account as an existing phone requires avoiding the message that says "This app is blocked. This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access." If you encounter that message, several things seem to happen when Google blocks access:

  1. The copy of the SMS Backup+ app you are installing will never connect to the IMAP server.
  2. The copy of SMS Backup+ installed on the old phone will also stop working and will never again connect to the IMAP server, even though it was working fine before you encountered the message while installing on the other phone.
  3. The app passwords created for use with SMS Backup+ are apparently blocked and can no longer be used.

After several frustrating hours the following procedure fixed this for me:

  1. Uninstall SMS Backup+ from both the old phone and the new phone.
  2. You should already have two-factor authentication enabled in your Google Account if you have previously use the IMAP procedure. Likewise, you should already have IMAP enabled for your @gmail address.
  3. Erase the app passwords created for SMS Backup+ in your Google Account.
  4. Create new app passwords to use when you reinstall SMS Backup+.
  5. Go to the PlayStore to download and install SMS Backup+.
  6. Start SMS Backup+ / Advanced settings / Custom IMAP Server / Authentication.
  7. Choose "Plain Text"
  8. Enter your @gmail address.
  9. Enter the app password you created in your Google Account for SMS Backup+.
  10. Security = TLS
  11. I did not have to enter the server address "imap.gmail.com:993" as this populated automatically for me.
  12. Tap on the "back" arrow twice. The "Connect" field should be greyed out, but should be populated with "IMAP yourname@gmail.com@nul". If not, you probably need to enter "imap.gmail.com:993" on the Custom IMAP Server page.
  13. Repeat from step #4 for any other phones you are setting up.

If at any time you stumble into the message on either phone that says "This app is blocked. This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access" you are screwed! That message kills SMS Backup+ on both phones. For me it was necessary to go back to step #1 to reinstall both phones from the beginning.

kurahaupo commented 3 years ago

I wonder if this is because the same "app password" is being used from multiple sources concurrently, tripping some sort of alarm for that password.

I would urge people to make a separate app password for each device.

If anyone else has this issue, then I would like to hear whether simply revoking the app password and creating new one(s) is sufficient.

CharlesBMiller commented 3 years ago

No, simply revoking the app passwords and creating new ones was not sufficient. Not until I uninstalled the app from the phones and reinstalled using the new passwords did I get this to work.

kurahaupo commented 3 years ago

@CharlesBMiller Thanks for the update.

This begs the question of "how does Google know that this installation of this app is using that app password?"

It suggests that there is some communication occurring outside the actual IMAP session.

CharlesBMiller commented 3 years ago

We all know browsers announce "user agent" plus a ton of other identifying information. It does stand to reason that apps must also be doing this to some extent.

From time to time I test a connection to a mail server by using Telnet. I have never been able to make that work with pop.gmail.com. Maybe that is because Google first needs to query the app, and of course a terminal would not respond. Who knows?

CMS99 commented 1 year ago

CharlesBMiller May 25, 2021 post, which was marked " SOLVED!" - worked for me.... EXCEPT it only restored 500 texts when there were many more backed up on the old phone. I wonder what happened!