-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Comments
Update your bot and see if that fixes things and report back. There have been updates to the API since that commit. |
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. |
It's not because you haven't validate your ptc account ? |
No it's not. I've been botting for days. Did you have the same setup without issues? |
@CyberMew Have you tried the account on the app? All of my PTC accounts work. Are you in dev branch? |
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. |
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
The text was updated successfully, but these errors were encountered: