PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

API 0.55 - Unauthorized at startup #5905

Closed claudioferrari closed 7 years ago

claudioferrari commented 7 years ago

Expected Behavior

Run the bot

Actual Behavior

Bot fail to start:

Your FULL config.json (remove your username, password, gmapkey and any other private info)

Standar config.json provided by setup

Output when issue occurred

Traceback (most recent call last):
  File "pokecli.py", line 865, in <module>
    main()
  File "pokecli.py", line 195, in main
    bot = start_bot(bot, config)
  File "pokecli.py", line 147, in start_bot
    bot.start()
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/pokemongo_bot/__init__.py", line 153, in start
    self._setup_api()
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/pokemongo_bot/__init__.py", line 1076, in _setup_api
    self.login()
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/pokemongo_bot/__init__.py", line 953, in login
    str(self.config.password))
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 132, in login
    response = PGoApi.app_simulation_login(self)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/pgoapi/pgoapi.py", line 152, in app_simulation_login
    response = request.call()
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/pgoapi/pgoapi.py", line 264, in call
    response = request.request(self._api_endpoint, self._req_method_list, self.get_position())
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/pgoapi/rpc_api.py", line 153, in request
    self.request_proto = self.request_proto or self._build_main_request(subrequests, player_position)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/pgoapi/rpc_api.py", line 233, in _build_main_request
    self._hash_engine.hash(sig.timestamp, request.latitude, request.longitude, request.accuracy, ticket_serialized, sig.session_hash, request.requests)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/pgoapi/hash_server.py", line 47, in hash
    raise BadHashRequestException("400: Bad request, error: {}".format(response.text))
pgoapi.exceptions.BadHashRequestException: 400: Bad request, error: Unauthorized
[2017-02-07 18:02:11] [sentry.errors] [ERROR] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
    response = self._open(req, data)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
    '_open', req)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/Users/Claudio/Pokemon/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1042, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1082, in _send_request
    self.endheaders(body)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1038, in endheaders
    self._send_output(message_body)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 880, in _send_output
    msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
[2017-02-07 18:02:11] [sentry.errors.uncaught] [ERROR] [u'BadHashRequestException: 400: Bad request, error: Unauthorized', u'  File "pokecli.py", line 865, in <module>', u'  File "pokecli.py", line 195, in main', u'  File "pokecli.py", line 147, in start_bot', u'  File "pokemongo_bot/__init__.py", line 153, in start', u'  File "pokemongo_bot/__init__.py", line 1076, in _setup_api', u'  File "pokemongo_bot/__init__.py", line 953, in login', u'  File "pokemongo_bot/api_wrapper.py", line 132, in login', u'  File "pgoapi/pgoapi.py", line 152, in app_simulation_login', u'  File "pgoapi/pgoapi.py", line 264, in call', u'  File "pgoapi/rpc_api.py", line 153, in request', u'  File "pgoapi/rpc_api.py", line 233, in _build_main_request', u'  File "pgoapi/hash_server.py", line 47, in hash']

Steps to Reproduce

Clone dev branch and just ./run.sh

davidakachaos commented 7 years ago

Is your hash key valid/up-to-date?

DeepJeep commented 7 years ago

Same error here, hashkey is valid (bought 2 days ago)

Oooops sorry, not exactly the same message, will file new issue.

claudioferrari commented 7 years ago

SOLVED: hashkey expired

solderzzc commented 7 years ago

ok, let me close this issue.