apkeep icon indicating copy to clipboard operation
apkeep copied to clipboard

Can't login to Google account

Open exstrim401 opened this issue 4 years ago • 30 comments

I use two factor auth. Created app password at https://myaccount.google.com/apppasswords but apkeep says that it's incorrect. Same with my real password

exstrim401 avatar Sep 07 '21 12:09 exstrim401

Same without 2-factor.

L34T avatar Sep 07 '21 12:09 L34T

Strange, I just tested it and it works for me. Did you ensure to escape the password properly?

Hainish avatar Sep 07 '21 20:09 Hainish

For the record, I'm using an app password.

Hainish avatar Sep 07 '21 20:09 Hainish

Also, did you enter your full email address as the username?

Hainish avatar Sep 07 '21 20:09 Hainish

I tried on an account without 2 factor auth, and the Google Login still doesn't work for me.

Could not log in to Google Play.  Please check your credentials and try again later.

apkpure version works fine

./apkeep -a com.instagram.android .
Downloading com.instagram.android...

google play version fails

./apkeep -d GooglePlay --username [email protected] --password SuperSecretSauce  -a com.instagram.android .
Could not log in to Google Play.  Please check your credentials and try again later.

ryanerwin avatar Sep 08 '21 02:09 ryanerwin

@ryanerwin for accounts with 2FA you need to create an app password in account settings. Did you try with that?

Hainish avatar Sep 08 '21 02:09 Hainish

This test was on an account WITHOUT 2 factor auth

ryanerwin avatar Sep 08 '21 02:09 ryanerwin

Ah, sorry, misread that. Alright, I'm pressed for time this week so I'll have to check what's going on next week with this.

Hainish avatar Sep 08 '21 02:09 Hainish

No worries.

If you need any additional debug / reproduce information to get to the bottom of it, please let me know.

ryanerwin avatar Sep 08 '21 02:09 ryanerwin

Tried both username and with full email of two different accounts w/o 2-factor. Ps and it will be great if our passwords would not be saved in system logs(bash history at least).

L34T avatar Sep 08 '21 19:09 L34T

@ryanerwin I just removed 2FA on my test account and generated a new 25 character password which includes A-Z, a-z, 0-9 and special characters. I was unable to reproduce the bug. Can you try to see if the download works when you:

  1. Generate a new password with the format above (I used keypassxc for the password generation, but different software may include a different set of what it considers "special characters")
  2. Create a new google account with the same password as your current account

Hainish avatar Sep 14 '21 16:09 Hainish

Alright, I'm able to reproduce this on a new account I created. I was wondering if this was because I had never linked an Android device to that account, and thus never went through any Play Store TOS agreement dialogue. This doesn't seem to be the case, though, since I just added a device to the new account and I'm still getting that invalid credentials error. I'll have to inspect the traffic and see if there's a deeper error that isn't propagating up to the user.

Hainish avatar Sep 14 '21 18:09 Hainish

Inspecting the traffic, I'm seeing the following (token redacted):

Error=NeedsBrowser
Url=https://accounts.google.com/signin/continue?sarp=1&scc=1&continue=https://accounts.google.com/o/android/auth?hl%3Den_US_en%26xoauth_display_name%3DAndroid%2BLogin%2BService%26source%3DAndroid%2BLogin&plt=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ErrorDetail=To access your account, you must sign in on the web. Touch Next to start browser sign-in.

Looking this up on Google led me to this page: https://github.com/nviennot/android-checkin/issues/3

Looks like

  • "Allow less secure apps" setting needs to be turned on: https://www.google.com/settings/security/lesssecureapps
  • "Continue" needs to be clicked here: https://accounts.google.com/b/0/DisplayUnlockCaptcha

Just tried this, still getting the same error though. Might need to propagate, I'll give it a little time before trying something different.

Hainish avatar Sep 14 '21 20:09 Hainish

This might be an issue where Google is forcing people through a login prompt that requires you to enter your phone number before proceeding. I'm going to work on propagating the error up through https://github.com/Hainish/rs-google-play/tree/master/gpapi to the user.

Hainish avatar Sep 14 '21 21:09 Hainish

I've enabled "less secure apps" in the account I was testing with, however even that isn't enough...

Still getting:

Could not log in to Google Play.  Please check your credentials and try again later.

ryanerwin avatar Sep 15 '21 05:09 ryanerwin

@ryanerwin have you also done this: https://accounts.google.com/b/0/DisplayUnlockCaptcha

Hainish avatar Sep 15 '21 18:09 Hainish

For reference, here is how the Python library handles this error: https://github.com/NoMore201/googleplay-api/blob/664c399f8196e1eb7d2fcda4af34e5dc1fca0f20/gpapi/googleplay.py#L234

I usually follow their conventions. I'm going to add this and have it propagate up to the user. I'm unsure how else to deal with this, it seems like a problem on Google's side.

Hainish avatar Sep 15 '21 18:09 Hainish

@exstrim401 @L34T @ryanerwin

When running from the latest master commit, are you now seeing the following error message?

Security check is needed, try to visit https://accounts.google.com/b/0/DisplayUnlockCaptcha to unlock, or setup an app-specific password

Hainish avatar Sep 15 '21 19:09 Hainish

When running from the latest master commit, are you now seeing the following error message?

Security check is needed, try to visit https://accounts.google.com/b/0/DisplayUnlockCaptcha to unlock, or setup an app-specific password

tag 0.5.0-16-g5a360ed

  1. requires 'libssl-dev' package to build
  2. Got the message, account access switched. Nothing changed.
  3. Tryed debugging proxy but with env http/https_proxy have no success. Maybe you could suggest best way to use custom proxy for debugging apkeep?

L34T avatar Sep 20 '21 11:09 L34T

@Hainish

apkeep -a com.instagram.android . -d GooglePlay -u '[email protected]' -p *********
Could not log in to Google Play.  Please check your credentials and try again later.

Still Error=NeedsBrowser

Both clicking https://www.google.com/settings/security/lesssecureapps and https://accounts.google.com/b/0/DisplayUnlockCaptcha didn't help.

vadimszzz avatar Nov 11 '21 12:11 vadimszzz

Solution here: https://github.com/NoMore201/googleplay-api/pull/153 To fix it you can only PR in https://github.com/dweinstein/rs-google-play/blob/master/gpapi/src/lib.rs

vadimszzz avatar Nov 11 '21 12:11 vadimszzz

0a84406d4f1ce8f4dec7507aab4e2a7880716307 updates dependencies to implement the solution in https://github.com/EFForg/apkeep/issues/9#issuecomment-966260364. I was unable to reproduce the problem, so someone else will have to test it the current master fixes the problem.

Hainish avatar Nov 15 '21 22:11 Hainish

I just hit this problem as well with the 0.8.0 version, running this command:

apkeep-x86_64-pc-windows-msvc -a com.instagram.android -d google-play -u `
[email protected] -p PASSWORD .

I do not have any two factor set up, and I also have not turned on any "less secure apps". If it helps, I have an alternate tool that works as expected:

> googleplay -a com.instagram.android -v 321704040
POST https://android.clients.google.com/auth
GET https://android.clients.google.com/fdfe/delivery?doc=com.instagram.android&vc=321704040
GET https://play.googleapis.com/download/by-token/download?token=AOTCm0QnrByVvUgm4lid9XKdtUjaZrhz7SH26fYgeTRu8Hgjqj5zjhRtlyjA-kX-6J04mi4tCGSSUkeNLPby5nFUnpyZ7cGVmpJLbL7OVwzdpoPgFhSyEpLANjJeeRSeCQpkkhag3Av3Hy9cT0wpzmEd4maOTvAKZ_TqZz78tEU7Q189U1OA2-De5xDeU-GtFOp-5KSJx3V02Z0tCkmZbbqRuqwkCtV55z_2qC34IkUZB5M2iG_qyRBsBd9dE1t0PQhMORtYA_b6jI191QDXJizB00sikCQozi7xPF02vRXfS2gmxdBb7DYb1imkID39DiYLBANCxFD-63Go-pfNGQN8GQ-a1ZMpKgEmdE00NxlmBDV0uXcFB5zGVfCitMcQ4u7dzAl1JbI6TuSVwcKHA0xKnHBSij59WPUm&cpn=coVyBkf83hk2dhCU&server=boq
7.9%    4.145 MB        8.290 MB/s

https://github.com/89z/googleplay

89z avatar Jan 10 '22 03:01 89z

Until I get an account that can effectively debug this, it's hard for me to track the issue down.

When I turn off 2FA, I can download apps with my password.

When 2FA is enabled, I can create an app password and that works just as well.

Hainish avatar Jan 12 '22 01:01 Hainish

Same thing happens to me, I have an account with 2FA and I set up a app password:

$ ./apkeep-x86_64-unknown-linux-gnu -d GooglePlay --username [email protected] --password apppassword -a com.a2a.energia .

raffaem avatar Jan 20 '22 09:01 raffaem

0a84406 updates dependencies to implement the solution in #9 (comment). I was unable to reproduce the problem, so someone else will have to test it the current master fixes the problem.

It doesn't.

I have tried to install the latest commit with: cargo install --git https://github.com/EFForg/apkeep.git

And I still get the error:

$ apkeep -d google-play --username [email protected] --password myapppassword -a com.a2a.energia .
Could not log in to Google Play.  Please check your credentials and try again later.

The account has 2FA and I'm using an app password.

Until I get an account that can effectively debug this, it's hard for me to track the issue down.

Didn't you say that you were able to reproduce this with a new account?

Alright, I'm able to reproduce this on a new account I created.

raffaem avatar Jan 20 '22 09:01 raffaem

0a84406 updates dependencies to implement the solution in #9 (comment). I was unable to reproduce the problem, so someone else will have to test it the current master fixes the problem.

It doesn't.

I have tried to install the latest commit with: cargo install --git https://github.com/EFForg/apkeep.git

And I still get the error:

$ apkeep -d google-play --username [email protected] --password myapppassword -a com.a2a.energia .
Could not log in to Google Play.  Please check your credentials and try again later.

The account has 2FA and I'm using an app password.

Until I get an account that can effectively debug this, it's hard for me to track the issue down.

Didn't you say that you were able to reproduce this with a new account?

Alright, I'm able to reproduce this on a new account I created.

same here

exstrim401 avatar Feb 05 '22 10:02 exstrim401

version: 0.8.0

Access type: 2FA


Was able to reproduce with a specific condition. I am running a Wireguard server, a UDP based VPN protocol. When turned on and pointing to 1.1.1.1/1.0.0.1 I can't even call www.googleapis.com.

ping: www.googleapis.com: Temporary failure in name resolution

On APKeep: Could not log in to Google Play. Please check your credentials and try again later.

When turned off, I am able to call and download a test .apk package without issue.

I wasn't able to grab all info I needed as to which particular failure during resolution occurred (my internet is flaky at the moment), but that was the main block on my end as to why I could not login.

It's not a resolution because that insinuates DNS problems for everyone on this issue, but maybe try pinging www.googleapis.com and see what shakes (or doesn't shake).

zoracon avatar Feb 15 '22 22:02 zoracon

Tried both app password and own account password but getting same login error for Google play ApkPure download works fine.

I don't have a device associated with my google account Incase that makes a difference.

skjom84 avatar Jul 24 '22 11:07 skjom84

same problems remain with v0.13.0

89z avatar Oct 19 '22 02:10 89z