Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Authentication Error #164

Open
iamd0pey opened this issue Aug 26, 2022 · 10 comments
Open

Bad Authentication Error #164

iamd0pey opened this issue Aug 26, 2022 · 10 comments

Comments

@iamd0pey
Copy link

Hello, I'm using ubuntu 22.04 and I have tried with multiple python version 3.8, 3.9 and 3.10 and it keeps appearing the error "Bad Authentication". I have tried to use https://github.com/marty0678/googleplay-api and https://github.com/gentoolinux/googleplay-api but keeps giving the same error.

@Augustin-FL
Copy link

Augustin-FL commented Sep 14, 2022

Hi,

I'm having the same problem

It seems that :

Also: both NoMore201 & gentoolinux versions were not updated following the last Google Play API changes (some new params like droidguard_results are now required by the API, etc...). I am not sure these versions can still be considered as maintained.

Edit: in addition, there is apparently an issue causing "Bad Authentication" on Ubuntu. The issue is specific to Ubuntu and does not happen on other distros (for instance, debian is not affected).

@Exadra37
Copy link

I made a pull request to fix marty's fix (marty0678#5). Let's see what happens with it..

I confirm that if use this fix I can now download apks by using an App password, with some caveats:

I need to force the installation of a specific protobuf version:

pip3 install 'protobuf<=3.20.1' --force-reinstall 

I still get this error:

/home/python/workspace/gpapi/googleplay.py:717: RuntimeWarning: Unexpected end-group tag: Not all data was converted
  response = googleplay_pb2.ResponseWrapper.FromString(response.content)

@iamd0pey
Copy link
Author

I made a pull request to fix marty's fix (marty0678#5). Let's see what happens with it..

I confirm that if use this fix I can now download apks by using an App password, with some caveats:

I need to force the installation of a specific protobuf version:

pip3 install 'protobuf<=3.20.1' --force-reinstall 

I still get this error:

/home/python/workspace/gpapi/googleplay.py:717: RuntimeWarning: Unexpected end-group tag: Not all data was converted
  response = googleplay_pb2.ResponseWrapper.FromString(response.content)

I didn't understand, can you download apks or do you get the error?

@Exadra37
Copy link

Exadra37 commented Sep 22, 2022

As I said:

I confirm that if use this fix I can now download apks by using an App password,

Check this discussion for more details:

marty0678#5 (comment)

@therealchjones
Copy link

@iamd0pey Can you confirm whether this works for you? I suspect it will still not work on Ubuntu 22.04 (unless you've made some other changes), but want to be sure. Thanks!

@iamd0pey
Copy link
Author

iamd0pey commented Oct 5, 2022

@iamd0pey Can you confirm whether this works for you? I suspect it will still not work on Ubuntu 22.04 (unless you've made some other changes), but want to be sure. Thanks!

Right now I have not tested it yet, but I think a solution for me would be using docker containers.

@Exadra37
Copy link

Exadra37 commented Oct 5, 2022

Right now I have not tested it yet, but I think a solution for me would be using docker containers.

A better Dockerfile from my fork:

https://github.com/Exadra37/googleplay-api/blob/3bebae10c63cde5617e467fa31f1f6c1abc77225/Dockerfile

The bash script to use it:

https://github.com/Exadra37/googleplay-api/blob/3bebae10c63cde5617e467fa31f1f6c1abc77225/bin/python.sh

The python CLI:

https://github.com/Exadra37/googleplay-api/blob/3bebae10c63cde5617e467fa31f1f6c1abc77225/cli/cli.py

Bear in mind that this is still a Work in Progress.

@YsmanKhamidullin
Copy link

is it work now?

@Exadra37
Copy link

See my current approach with a Dockerfile #159 (comment)

In a Nutshell you need a dedicated Gmail account without 2FA enabled and to run on Python 3.6 and use a fork of this repor that is more up to date.

@ghost
Copy link

ghost commented Jun 24, 2023

the Python 3.6 option is a brittle hack that could break at any moment. a better option is to use a TLS client hello matching an Android device, as is used with Python gpsoauth and others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants