GithubHelp home page GithubHelp logo

Comments (10)

Augustin-FL avatar Augustin-FL commented on June 2, 2024 2

Hi,

I'm having the same problem

It seems that :

  • Google does analyze the TLS Hello request made by python. if this request doesn't match precisely what Google expects, a "Bad Authentication" is returned.
  • urllib3 made some change on how it handle TLS at 1.26.0. Any attempt to authenticate against google servers with urllib3>=1.26.0 and default settings, will result to a Bad authentication.
  • marty0678 patched the issue, you can use https://github.com/marty0678/googleplay-api
  • the details of "what's wrong with urllib3>=1.26.0" are available here: urllib3/urllib3#2101

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).

from googleplay-api.

Exadra37 avatar Exadra37 commented on June 2, 2024 2

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)

from googleplay-api.

iamd0pey avatar iamd0pey commented on June 2, 2024 1

@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.

from googleplay-api.

Exadra37 avatar Exadra37 commented on June 2, 2024

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)

from googleplay-api.

iamd0pey avatar iamd0pey commented on June 2, 2024

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?

from googleplay-api.

therealchjones avatar therealchjones commented on June 2, 2024

@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!

from googleplay-api.

Exadra37 avatar Exadra37 commented on June 2, 2024

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.

from googleplay-api.

YsmanKhamidullin avatar YsmanKhamidullin commented on June 2, 2024

is it work now?

from googleplay-api.

Exadra37 avatar Exadra37 commented on June 2, 2024

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.

from googleplay-api.

 avatar commented on June 2, 2024

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.

from googleplay-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.