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

gpapi.googleplay.LoginError: 'server says: BadAuthentication'

Open allaf2 opened this issue 1 year ago • 12 comments

i have problem with server says: BadAuthentication

is this problem only for me? or google has updated login method. i faced this problem within 1 month

allaf2 avatar Feb 06 '24 19:02 allaf2

I started to have this issue and the following now works for me (after previously receiving BadAuthentication)

Login: Gmail account w/ 2FA enabled and using the app password

Fork: https://github.com/marty0678/googleplay-api/

Python Packages (from my requirements.txt)

cryptography=42.0.5
protobuf==3.20.3
requests==2.28.1

Hope it helps

Zenofex avatar Mar 05 '24 23:03 Zenofex

https://github.com/3052/google

3052 avatar Mar 07 '24 00:03 3052

The solutions recommended above are great. You might also want to try my newly created Python library: https://github.com/zengxs/python-gpapi2

It supports the 2FA auth method and has no sub-dependencies.

zengxs avatar May 21 '24 07:05 zengxs

note the previous comment is misleading, as it requires both a Python and Rust install

3052 avatar May 21 '24 11:05 3052

note the previous comment is misleading, as it requires both a Python and Rust install

The previous comment is incorrect. The library does not require Rust. Most users only need to download the precompiled wheel from PyPI, which does not involve any compilation steps. You can install it with a simple pip command:

pip install python-gpapi2

There are precompiled wheel packages available for all major systems (including macOS x86-64/arm64, Windows x86-64/x86, Linux x86-64/x86/arm64 for both glibc and musl). This means you don't need to install Rust or any other additional dependencies.

If you encounter any issues or need support for a non-mainstream platform, please let me know, and I can try to add a precompiled package for that platform.

zengxs avatar May 22 '24 02:05 zengxs

wrong:

> pip install https://github.com/zengxs/python-gpapi2/archive/refs/heads/main.zip
Collecting https://github.com/zengxs/python-gpapi2/archive/refs/heads/main.zip
  Downloading https://github.com/zengxs/python-gpapi2/archive/refs/heads/main.zip
     - 29.3 kB 1.6 MB/s 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

3052 avatar May 22 '24 02:05 3052

wrong:

> pip install https://github.com/zengxs/python-gpapi2/archive/refs/heads/main.zip
Collecting https://github.com/zengxs/python-gpapi2/archive/refs/heads/main.zip
  Downloading https://github.com/zengxs/python-gpapi2/archive/refs/heads/main.zip
     - 29.3 kB 1.6 MB/s 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

The issue you mentioned arises from attempting to install directly from the GitHub source, which is not the recommended installation method for most users. As stated in the documentation, the correct way to install the library is through PyPI using the following command:

pip install python-gpapi2

This method ensures that you download the precompiled wheel packages, which do not require Rust or any compilation steps. This approach is designed to be user-friendly and straightforward.

To avoid further confusion and to respect everyone's time, I will not be engaging in further discussion on this topic. If anyone has genuine issues or questions about the installation process, please feel free to reach out directly.

zengxs avatar May 22 '24 03:05 zengxs

It supports the 2FA auth method and has no sub-dependencies

your logic is flawed. the key question here is this: who is the audience for the phrase "zero dependency"?

the "consumers" of this project are not the audience. as you said, they can download releases already built, and even every commit already built, so telling those users "zero dependency" is completely pointless, because even if project has 100 dependency, they never know because its built.

the real audience for this phrase is DEVELOPERS. people who will take the code, change it, improve it, and run it. for THAT audience, YES this project has a dependency, a BIG one Rust. so again, the phrase "zero dependency" is just objectively wrong here, regardless of any rationalizations you have.

3052 avatar May 22 '24 03:05 3052

@3052 Thank you for your correction. Indeed, my wording was inappropriate; zero dependencies do not exist.


Additionally, from other sources, I have learned that this project has compliance issues and potential risks of a GitHub account ban. Therefore, I will no longer open-source python-gpapi2. Thank you, everyone.

zengxs avatar May 22 '24 05:05 zengxs