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

[ERROR] Cannot retrieve email address from token dispenser #292

Closed
pitsi opened this issue Mar 22, 2022 · 23 comments
Closed

[ERROR] Cannot retrieve email address from token dispenser #292

pitsi opened this issue Mar 22, 2022 · 23 comments

Comments

@pitsi
Copy link

pitsi commented Mar 22, 2022

Please provide those informations:

  • Operating System: Debian testing/unstable x64
  • Python version when running gplaycli (should be 3+): 3.9.11
  • GPlayCli version via gplaycli -v : [INFO] GPlayCli version 3.29 [Python3.9.11]
  • The way you installed gplaycli: apt-get install gplaycli
  • The authentication method: token from the default server

Here is the full verbose output that shows all the above, e.g. when trying to download brave

$ gplaycli -v -d com.brave.browser
[INFO] GPlayCli version 3.29 [Python3.9.11] 
[INFO] Configuration file is /etc/gplaycli/gplaycli.conf
[INFO] Device is bacon
[Errno 2] No such file or directory: '/home/user/.cache/gplaycli/token'
[INFO] Cache file does not exists or is corrupted
[INFO] Retrieving token ...
[INFO] Token URL is https://matlink.fr/token
[ERROR] Cannot retrieve email address from token dispenser
Traceback (most recent call last):
  File "/usr/bin/gplaycli", line 33, in <module>
    sys.exit(load_entry_point('gplaycli==3.29', 'console_scripts', 'gplaycli')())
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 666, in main
    cli.download(args.download)
  File "/usr/lib/python3/dist-packages/gplaycli/hooks.py", line 8, in check_connection
    ok, err = self.connect()
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 413, in connect
    self.retrieve_token()
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 194, in retrieve_token
    raise ERRORS.TOKEN_DISPENSER_SERVER_ERROR
TypeError: exceptions must derive from BaseException

Opening the token url in a browser results to a 502 error, so I assume this is the reason everything else fails. I do not have an own token, neither I want to use credentials.

@pitsi
Copy link
Author

pitsi commented Mar 23, 2022

Could this be related to #263?

@pitsi
Copy link
Author

pitsi commented Mar 23, 2022

Adding to the issue, I copied /etc/gplaycli/gplaycli.conf to my home directory, changed the dispenser url to goolag.store:1337 which supposedly works, and launched gplay cli with -c gplaycli.conf.
But it gets stuck at the token retrieval forever

$ gplaycli -v -d com.brave.browser -c gplaycli.conf 
[INFO] GPlayCli version 3.29 [Python3.9.11] 
[INFO] Configuration file is ['gplaycli.conf']
[INFO] Device is bacon
[Errno 2] No such file or directory: '/home/user/.cache/gplaycli/token'
[INFO] Cache file does not exists or is corrupted
[INFO] Retrieving token ...
[INFO] Token URL is https://goolag.store:1337/

---edit
Any previous and following posts related to 89z's app were deleted and he is now blocked on my end.

@pitsi
Copy link
Author

pitsi commented Mar 26, 2022

Adding some insult to the injury. Leaving the token aside, I decided to use gplaycli with my own google credentials.
And it fails to authenticate, saying that my username and/or password may be incorrect!

$ gplaycli -v -d com.brave.browser -c gplaycli.conf 
[INFO] GPlayCli version 3.29 [Python3.9.12] 
[INFO] Configuration file is ['gplaycli.conf']
[INFO] Device is bacon
[INFO] Using credentials to connect to API
[INFO] Using plaintext password
[ERROR] Bad authentication, login or password incorrect ('server says: BadAuthentication')

Obviously, there is nothing wrong with the credentials. I tried them in a browser and they worked with zero issues.
And it makes no difference whether I enable access to less secure apps or not.

@pabs3
Copy link

pabs3 commented Mar 27, 2022 via email

@pitsi
Copy link
Author

pitsi commented Mar 27, 2022

And how am I supposed to do that? There is no popup asking credentials so as to generate oauth password.
Does it work for you when using password in playtext? I have no one near me using debian, at the very least, so as to cross-test.

@pabs3
Copy link

pabs3 commented Mar 27, 2022 via email

@pitsi
Copy link
Author

pitsi commented Mar 27, 2022

So, with the token way not working because of server issues and the credentials way not working because of (probably) oauth issues, the app is practically useless?

@pabs3
Copy link

pabs3 commented Mar 27, 2022 via email

@matlink
Copy link
Owner

matlink commented Mar 28, 2022

I fixed some password-related issues on my token dispenser server. Apparently, application passwords had been removed by Google. Hope it helps.

@pabs3
Copy link

pabs3 commented Mar 29, 2022 via email

@pitsi
Copy link
Author

pitsi commented Mar 29, 2022

Do you also have the recommended packages installed, i.e. dummydroid, which pulls up A LOT of (mostly java related) dependencies, and frdoidserver, which pulls even more like android sdk?
On my end, the output is smaller with the --log parameter, compared with the verbose one. I get the same error like you with the stock settings that need a token

$ gplaycli --log -d com.skype.raider
[ERROR] Multiple attempts to fetch anonymous token failed.
[ERROR] Try setting 'token=False' and adding Google credentials to gplaycli.conf
[ERROR] A few packages could not be downloaded :
com.skype.raider
'Error retrieving information from server. DF-DFERH-01'

and with the credentials way

$ gplaycli --log -d com.skype.raider -c gplaycli.conf 
[ERROR] Bad authentication, login or password incorrect ('server says: BadAuthentication')

So, there is no difference from what I have already mentioned.

---edit
I just saw @matlink 's post above for the change in the token server, so ignore the part that I said about the credentials way. Is the url still correct though?
https://matlink.fr/token

@pitsi
Copy link
Author

pitsi commented Mar 30, 2022

I want to add that the output of gplaycli -v -d something is now different than before, e.g.

$ gplaycli -v -d com.brave.browser
[INFO] GPlayCli version 3.29 [Python3.9.12] 
[INFO] Configuration file is /etc/gplaycli/gplaycli.conf
[INFO] Device is bacon
----------
[INFO] Using cached token.
[INFO] Using auto retrieved token to connect to API
[INFO] Token has expired or is invalid. Retrieving a new one...
[INFO] Retrieving token ...
[INFO] Token URL is https://matlink.fr/token
[INFO] Email: [email protected]
[INFO] Token: aas_et/AKppINa0dg8bp3EiM-zYoXUzgzKVrglY41LTX1T-LsL4P1afvg-zCtv88BwRKCt3bHorP6ums6edKuqQFH-g_9j9TG6a4nEY6EsQ77NCI5_cacibhoTzVJ-R1t8j_7MUNsJKQZvVBHONImD4m9_6B0bHXll2dVN2HIl_pa9Xckb8mwU6lOV5rAZccVYirJoum9G6BxGKPmHEnwLZkvn3zzQ=
[INFO] GsfId: 3e440fdeeabd3f56
----------
[ERROR] Multiple attempts to fetch anonymous token failed.
[ERROR] Try setting 'token=False' and adding Google credentials to gplaycli.conf
[ERROR] A few packages could not be downloaded :
com.brave.browser
'Error retrieving information from server. DF-DFERH-01'

The lines in the middle of the output are repeated 4 times, each time with a different gsfid and token strings.

@pitsi
Copy link
Author

pitsi commented Mar 31, 2022

And today I am getting a different output that looks like a mixed version of the above

$ gplaycli -v -d com.brave.browser
[INFO] GPlayCli version 3.29 [Python3.9.12] 
[INFO] Configuration file is /etc/gplaycli/gplaycli.conf
[INFO] Device is bacon
[INFO] Using cached token.
[INFO] Using auto retrieved token to connect to API
[INFO] Token has expired or is invalid. Retrieving a new one...
[INFO] Retrieving token ...
[INFO] Token URL is https://matlink.fr/token
[ERROR] Token dispenser server error: 502
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 429, in connect_token
    self.api.login(authSubToken=self.token, gsfId=int(self.gsfid, 16))
  File "/usr/lib/python3/dist-packages/gpapi/googleplay.py", line 250, in login
    self.search('drv')
  File "/usr/lib/python3/dist-packages/gpapi/googleplay.py", line 362, in search
    data = self.executeRequestApi2(path)
  File "/usr/lib/python3/dist-packages/gpapi/googleplay.py", line 336, in executeRequestApi2
    raise RequestError(message.commands.displayErrorMessage)
gpapi.googleplay.RequestError: 'Error while retrieving information from server. DF-DFERH-01'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/gplaycli", line 33, in <module>
    sys.exit(load_entry_point('gplaycli==3.29', 'console_scripts', 'gplaycli')())
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 666, in main
    cli.download(args.download)
  File "/usr/lib/python3/dist-packages/gplaycli/hooks.py", line 8, in check_connection
    ok, err = self.connect()
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 414, in connect
    return self.connect_token()
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 433, in connect_token
    self.retrieve_token(force_new=True)
  File "/usr/lib/python3/dist-packages/gplaycli/gplaycli.py", line 208, in retrieve_token
    raise ERRORS.TOKEN_DISPENSER_SERVER_ERROR
TypeError: exceptions must derive from BaseException

The process stops for some seconds at [INFO] Token URL is https://matlink.fr/token before continuing to the 502 error, so I assume that is the reason of the second part of the error.

@pitsi
Copy link
Author

pitsi commented Apr 13, 2022

Is there ANY way to get ANY similar key from somewhere so as to get it working?
If the default key server did go online again for sometime those 3 weeks that I have opened the issue, then I have probably missed it.

@adtimizer
Copy link

@pitsi did you manage to come up with a workaround?
would love to hear about it

@pitsi
Copy link
Author

pitsi commented May 14, 2022

Sadly, no. In fact, I have not tried anything else for weeks now.
I tried again when I saw your post earlier, but the error is the same.

@adtimizer
Copy link

@89z in the spirit of collaboration between projects, maybe it will be good to share how you perform the login to google and fetch the token from there so someone can fix it on the python projects.
eventually we are all keen to make things work

@pitsi
Copy link
Author

pitsi commented May 15, 2022

I am pretty sure he can not see your comment here because I blocked him for his attitude, spam and comment deletion.
And blocked users can not see or comment on issues. I just made sure his remaining comment is left there to prove my point.

@adtimizer
Copy link

@pitsi I wasn't aware of it.
my bad

@MolotovCherry
Copy link

This is sad. This app is not updated and doesn't even work with the latest python, let alone, can't login or use a token.

@ghost
Copy link

ghost commented May 17, 2023

@MolotovCherry I have an alternate module and tool if it helps:

https://github.com/4cq2/googleplay

@pitsi
Copy link
Author

pitsi commented May 17, 2023

@4cq2
Aren't you 89z that I blocked last year for spamming? Thank you for keeping the same name on your project while creating a new user name. You are now blocked again.

---edit
Also, well done for deleting your old account. It also deleted that one message that I tried to keep here as a proof of your idiotic attitude.

@pitsi
Copy link
Author

pitsi commented Jun 17, 2023

One day after my comment here, gplaycli was removed from the debian repo.
https://tracker.debian.org/news/1431562/removed-329dfsg-4-from-unstable/

It is really sad to see the reasons, although they are all true :'(

@pitsi pitsi closed this as completed Jun 18, 2023
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

6 participants
@pabs3 @matlink @pitsi @MolotovCherry @adtimizer and others