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

Could not retrieve a PTC Access Token #4217

Closed
CyberMew opened this issue Aug 18, 2016 · 6 comments
Closed

Could not retrieve a PTC Access Token #4217

CyberMew opened this issue Aug 18, 2016 · 6 comments

Comments

@CyberMew
Copy link

Expected Behavior

Terminate without issues

Actual Behavior

See error output

Output when issue occurred

File "pokecli.py", line 197, in report_summary
metrics.capture_stats()
File "/root/PokemonGo-Bot/pokemongo_bot/metrics.py", line 84, in capture_stats
response_dict = request.call()
File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 117, in call
result = self._call()
File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 66, in _call
return PGoApiRequest.call(self)
File "/root/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 220, in call
response = request.request(self._api_endpoint, self._req_method_list, self.get_position())
File "/root/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 126, in request
request_proto = self._build_main_request(subrequests, player_position)
File "/root/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 216, in _build_main_request
request.auth_info.token.contents = self._auth_provider.get_access_token()
File "/root/PokemonGo-Bot/src/pgoapi/pgoapi/auth_ptc.py", line 145, in get_access_token
raise AuthException("Could not retrieve a PTC Access Token")
pgoapi.exceptions.AuthException: Could not retrieve a PTC Access Token
Thu Aug 18 07:28:12 PDT 2016 Pokebot Stopped.
(cannot provide earlier logs because log to file function is not present yet)

Steps to Reproduce

Enable sleepschedule, run the bot, collect rewards, sleep for 8 hours, terminate bot via ctrl+c

Other Information

OS:
Debian 8 x64
Branch:
dev
Git Commit:
2c51350
Python Version:
Python 2.7.9

@RedViper9
Copy link
Contributor

RedViper9 commented Aug 18, 2016

Update your bot and see if that fixes things and report back. There have been updates to the API since that commit.

@CyberMew
Copy link
Author

Same issue, seems like it will give a problem if it has slept for a long time and the bot is terminated while it is still sleeping.

@p1n9
Copy link

p1n9 commented Aug 19, 2016

It's not because you haven't validate your ptc account ?
After creating new account you received an email at the adresse provided, you have 2 days to activate after that you won't be able tu use the account.

@CyberMew
Copy link
Author

No it's not. I've been botting for days. Did you have the same setup without issues?

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 19, 2016

@CyberMew Have you tried the account on the app? All of my PTC accounts work. Are you in dev branch?

@CyberMew
Copy link
Author

CyberMew commented Aug 20, 2016

Yes I did and I am on the dev branch. It seems like a token expiry issue due to prolong period of no activity due to sleepschedule (but then again I'm not sure why the token is being used when I terminate the bot).

But I guess it doesn't matter now because that account is banned. I'll recreate a new issue thread again if this happens on my next account.

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

No branches or pull requests

5 participants