googleplay-api icon indicating copy to clipboard operation
googleplay-api copied to clipboard

Security Check Error

Open matlink opened this issue 7 years ago • 13 comments

Got some security check error recently using newly created accounts: [INFO] GPlayCli version 3.24 [Python3.6.4] [INFO] Configuration file is gplaycli.conf [INFO] Device is bacon [INFO] Using credentials to connect to API [INFO] Using plaintext password Traceback (most recent call last): File "/export/home/valois/.local/share/virtualenvs/gplaycli-b1QJ3HkK/bin/gplaycli", line 11, in sys.exit(main()) File "/export/home/valois/.local/share/virtualenvs/gplaycli-b1QJ3HkK/lib/python3.6/site-packages/gplaycli/gplaycli.py", line 723, in main cli.search(args.search_string, nb_results, not args.paid) File "/export/home/valois/.local/share/virtualenvs/gplaycli-b1QJ3HkK/lib/python3.6/site-packages/gplaycli/hooks.py", line 8, in check_connection self.connect() File "/export/home/valois/.local/share/virtualenvs/gplaycli-b1QJ3HkK/lib/python3.6/site-packages/gplaycli/gplaycli.py", line 437, in connect gsfId=gsfid) File "/export/home/valois/.local/share/virtualenvs/gplaycli-b1QJ3HkK/lib/python3.6/site-packages/gpapi/googleplay.py", line 223, in login raise SecurityCheckError() gpapi.googleplay.SecurityCheckError

Do you know where it could come from?

matlink avatar Oct 12 '18 19:10 matlink

Complete error message is: gpapi.googleplay.LoginError: 'Security check is needed, try to visit https://accounts.google.com/b/0/DisplayUnlockCaptcha to unlock, or setup an app-specific password' You should login in your google account and visit it (https://accounts.google.com/b/0/DisplayUnlockCaptcha).

komeilkamal avatar Oct 13 '18 08:10 komeilkamal

Yeah it seems to work only for the device where I unlocked the security check. It does not work for my travis build :(

matlink avatar Oct 13 '18 15:10 matlink

This is new, I think, and quite annoying. I even have 2FA and application-specific passwords enabled, and it still asks me to go to https://accounts.google.com/b/0/DisplayUnlockCaptcha to unlock. Argh, Google.

archon810 avatar Oct 17 '18 18:10 archon810

Any update on this? The issue is there for me as well.

rehmatworks avatar Dec 03 '18 08:12 rehmatworks

Recently this problem intensified, along with random errors. As far as I understand it can be caused by one of those things:

1 - frequent email+passwd logins 2 - frequent public IP change 3 - you are logged in with that account and have an opened session in your browser/android phone

In my case it does not happen in a single testing session from my PC (on the same network), but as pointed out by @matlink travis build fails almost always

NoMore201 avatar Dec 12 '18 17:12 NoMore201

Point 1 seems to be the cause. This error doesn't come up on Android phones though (even if same account is used on multiple devices). BTW I always re-use the generated token unless it is expired but still my requests were blocked. Looks like Google has set a threshold for the calls to an upper limit that an Android device would normally make and frequent requests may be flagged as the abuse of the service and it triggers this check.

rehmatworks avatar Dec 12 '18 19:12 rehmatworks

I get this error too. I'm logged in with the account on an android device though. I can rule out reason number two, as the IP does not change. Reason one might be possible, but as I get this error from the first login attempt on, I doubt it. Using the token method from my current IP works fine, so at least I know I'm not blacklisted. I also tried the https://accounts.google.com/b/0/DisplayUnlockCaptcha but this does not help either... I also tried with another account, which is not logged in anywhere right now, and I get the same error message:

[INFO] GPlayCli version 3.25 [Python3.5.3]
[INFO] Configuration file is ['credentials.conf']
[INFO] Device is bacon
[INFO] Using credentials to connect to API
[INFO] Using plaintext password
Traceback (most recent call last):
  File "./venv/bin/gplaycli", line 10, in <module>
    sys.exit(main())
  File "/mnt/tmp/googleplay2019/venv/lib/python3.5/site-packages/gplaycli/gplaycli.py", line 738, in main
    cli.download(args.packages_to_download)
  File "/mnt/tmp/googleplay2019/venv/lib/python3.5/site-packages/gplaycli/hooks.py", line 8, in check_connection
    self.connect()
  File "/mnt/tmp/googleplay2019/venv/lib/python3.5/site-packages/gplaycli/gplaycli.py", line 444, in connect
    gsfId=gsfid)
  File "/mnt/tmp/googleplay2019/venv/lib/python3.5/site-packages/gpapi/googleplay.py", line 223, in login
    raise SecurityCheckError()
gpapi.googleplay.SecurityCheckError

Is the user based login broken right now?

edit: I dumped the params in line 223 of googleply.py. I get something like this:

{'url': 'https://accounts.google.com/signin/continue?sarp=1&scc=1&continue=https://accounts.google.com/o/android/auth?redacted', 'error': 'NeedsBrowser', 'errordetail': 'To'}

But going to the URL does not really work :(

reox avatar Jun 11 '19 11:06 reox

This is now interesting: On the phone were this account was used, a notification popped up I should investigate the account. It said then further that I was logged out on the phone from the google account and should log in again. After I entered the password, it said, that suspicious activity was recorded and I have to change my password.

I changed the password and tried again with the changed password to use gplaycli but still get the SecurityCheckError

reox avatar Jun 12 '19 09:06 reox

any update on this? is there any alternative? any script for example propose?

raulperezalejo avatar Jul 16 '19 22:07 raulperezalejo

Instead of using your account password (which can generate a validation request via captcha if 2-Step-Verification is enabled), it is preferable to generate and use an App password specific to your application by following the steps mentioned here => Sign in with App Passwords (see the section "Create & use App Passwords").

ouaguid avatar Mar 26 '21 00:03 ouaguid

Did anyone find a work around for this? I'm stuck with same error. I'm using 2FA enabled and have app-specific password.

Niveshkrishna avatar Aug 18 '21 17:08 Niveshkrishna

Did anyone find a work around for this? I'm stuck with same error. I'm using 2FA enabled and have app-specific password.

Did you find a solution? The same issue is happening to me.

ahm750 avatar Aug 28 '21 04:08 ahm750

No, I could not find any solution to this yet. For me some accounts work and some throw captcha error. So it is not entirely clear on why some accounts are failing. Maybe a lot of accounts are created from my IP?

I will try to explore this approach suggested by @hoffie

Niveshkrishna avatar Aug 30 '21 08:08 Niveshkrishna