PokemonGoF / PokemonGo-Bot

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

Server busy or offline, reconnecting #5972

Closed kujourin closed 7 years ago

kujourin commented 7 years ago

debug=ture log this

[2017-03-22 23:05:35] [requests.packages.urllib3.connectionpool] [DEBUG] "POST /auth HTTP/1.1" 200 None [2017-03-22 23:05:35] [pgoapi.auth] [INFO] Google User Login successful. [2017-03-22 23:05:35] [pgoapi.auth] [DEBUG] No Access Token available! [2017-03-22 23:05:35] [pgoapi.auth] [INFO] Request Google Access Token... [2017-03-22 23:05:35] [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTPS connection (1): android.clients.google.com [2017-03-22 23:05:35] [requests.packages.urllib3.connectionpool] [DEBUG] "POST /auth HTTP/1.1" 200 None [2017-03-22 23:05:35] [pgoapi.auth] [INFO] Google Access Token successfully received. [2017-03-22 23:05:35] [pgoapi.auth] [DEBUG] Google Access Token: eyJhb**... [2017-03-22 23:05:35] [pgoapi.pgoapi] [INFO] Starting RPC login sequence (iOS app simulation) [2017-03-22 23:05:35] [pgoapi.rpc_api] [DEBUG] Generating main RPC request... [2017-03-22 23:05:35] [pgoapi.rpc_api] [DEBUG] Incremented RPC Request ID: ** [2017-03-22 23:05:35] [pgoapi.rpc_api] [DEBUG] Generating sub RPC requests... [2017-03-22 23:05:35] [pgoapi.rpc_api] [DEBUG] No Session Ticket found - using OAUTH Access Token [2017-03-22 23:05:35] [pgoapi.auth] [DEBUG] Access Token still valid for further 00:58:00 hours (1490191655 < 1490195135) [2017-03-22 23:05:35] [pgoapi.auth] [DEBUG] Using cached Google Access Token [2017-03-22 23:05:35] [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTPS connection (1): pokehash.buddyauth.com [2017-03-22 23:05:36] [PokemonGoBot] [INFO] [api_error] Server busy or offline, reconnecting in 960 seconds [2017-03-22 23:05:36] [socketIO-client] [DEBUG] 127.0.0.1:4000/socket.io [socket.io packet sent] 2["bot:broadcast", {"account": "@gmail.com", "data": {"msg": "Server busy or offline, reconnecting in 960 seconds"}, "event": "api_error"}] **: Received packet MESSAGE data 2["bot:broadcast", {"account": "@gmail.com", "data": {"msg": "Server busy or offline, reconnecting in 960 seconds"}, "event": "api_error"}] [2017-03-22 23:05:36] [ engineio] [INFO] **: Received packet MESSAGE data 2["bot:broadcast", {"account": "@gmail.com", "data": {"msg": "Server busy or offline, reconnecting in 960 seconds"}, "event": "api_error"}] received event "bot:broadcast" from ** [/] [2017-03-22 23:05:36] [ socketio] [INFO] received event "bot:broadcast" from ** [/] emitting event "api_error:@gmail.com" to all [/] [2017-03-22 23:05:36] [ socketio] [INFO] emitting event "api_error:@gmail.com" to all [/] **: Sending packet MESSAGE data 2["api_error:@gmail.com",{"account":"@gmail.com","data":{"msg":"Server busy or offline, reconnecting in 960 seconds"},"event":"api_error"}] [2017-03-22 23:05:36] [ engineio] [INFO] **: Sending packet MESSAGE data 2["api_error:@gmail.com",{"account":"@gmail.com","data":{"msg":"Server busy or offline, reconnecting in 960 seconds"},"event":"api_error"}] **: Received packet PING data None

pogarek commented 7 years ago

this is to generic :-( and doesn't look like debug:true.. Try to debug this, for example in VsCode : https://github.com/DonJayamanne/pythonVSCode/wiki/Debugging (it works on Windows/Linux/MacOS ; this is what I use).

kujourin commented 7 years ago

[2017-03-23 22:04:04] [PokemonGoBot] [INFO] Login procedure started. [2017-03-23 22:04:12] [PokemonGoBot] [INFO] Login successful. [2017-03-23 22:04:12] [PokemonGoBot] [INFO] Niantic Official API Version: 0.57.4 _inventory was not initialized _inventory was not initialized [2017-03-23 22:04:12] [ cli] [INFO] [2017-03-23 22:04:12] [ cli] [INFO] Ran for 0:00:08 [2017-03-23 22:04:12] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h [2017-03-23 22:04:12] [ cli] [INFO] Travelled 0.00km [2017-03-23 22:04:12] [ cli] [INFO] Visited 0 stops [2017-03-23 22:04:12] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before () [2017-03-23 22:04:12] [ cli] [INFO] Threw 0 pokeballs [2017-03-23 22:04:12] [ cli] [INFO] Earned 0 Stardust [2017-03-23 22:04:12] [ cli] [INFO] Hatched eggs 0 [2017-03-23 22:04:12] [ cli] [INFO] [2017-03-23 22:04:12] [ cli] [INFO] Highest CP Pokemon: [2017-03-23 22:04:12] [ cli] [INFO] Most Perfect Pokemon: Traceback (most recent call last): File "pokecli.py", line 865, in main() File "pokecli.py", line 195, in main bot = start_bot(bot, config) File "pokecli.py", line 147, in start_bot bot.start() File "/home/kujou/pkbot/PokemonGo-Bot/pokemongo_bot/init.py", line 155, in start self._setup_api() File "/home/kujou/pkbot/PokemonGo-Bot/pokemongo_bot/init.py", line 1149, in _setup_api self.login() File "/home/kujou/pkbot/PokemonGo-Bot/pokemongo_bot/init.py", line 1006, in login f = urllib2.urlopen(link) File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer> [2017-03-23 22:04:12] [sentry.errors] [ERROR] Sentry responded with an error: 'module' object has no attribute 'HTTPSHandler' (url: https://app.getsentry.com/api/90254/store/) Traceback (most recent call last): File "/home/kujou/pkbot/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/home/kujou/pkbot/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/home/kujou/pkbot/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 44, in urlopen class ValidHTTPSHandler(urllib2.HTTPSHandler): AttributeError: 'module' object has no attribute 'HTTPSHandler' [2017-03-23 22:04:12] [sentry.errors.uncaught] [ERROR] [u'URLError: <urlopen error [Errno 104] Connection reset by peer>', u' File "pokecli.py", line 865, in ', u' File "pokecli.py", line 195, in main', u' File "pokecli.py", line 147, in start_bot', u' File "pokemongo_bot/init.py", line 155, in start', u' File "pokemongo_bot/init.py", line 1149, in _setup_api', u' File "pokemongo_bot/init.py", line 1006, in login', u' File "python2.7/urllib2.py", line 127, in urlopen', u' File "python2.7/urllib2.py", line 404, in open', u' File "python2.7/urllib2.py", line 422, in _open', u' File "python2.7/urllib2.py", line 382, in _call_chain', u' File "python2.7/urllib2.py", line 1222, in https_open', u' File "python2.7/urllib2.py", line 1184, in do_open'] Thu Mar 23 22:04:13 JST 2017 Pokebot Stopped. Press any button or wait 20 seconds to continue.

pogarek commented 7 years ago

looks like network issue..

kujourin commented 7 years ago

@pogarek thank you! Now i have another question... When i login with pokebot... My all android devices are logged out... I need to log in repeatedly, per a few hours

pogarek commented 7 years ago

are they logged out from Android ? that is weird.. However I'm not an Android guy.. @MerlionRock , @Jcolomar any ideas?

kujourin commented 7 years ago

I tried to close the two-step authenticate and tried to use account password or app passwd... But did not solve the problem

Jcolomar commented 7 years ago

u mean are logged in bot and in phone same time?

kujourin commented 7 years ago

when i login in bot at linux , Google account at my phone said account information has changed, i must log in again @Jcolomar

kujourin commented 7 years ago

another question why bot have two device id? this Android and this Android they are one bot http://x777.co/data/attachment/forum/201703/24/001201t73xdi37dfdgdizz.png

Jcolomar commented 7 years ago

Thats happend to me also, and i never had to log again on phone. I dont listen it

kujourin commented 7 years ago

It seems that the problem can not be solved.

Jcolomar commented 7 years ago

i dont think is a problem. From begining i started use the bot, that notification appears (im using google account)

DeepJeep commented 7 years ago

With debug "true" I get (numbers and token modified ;))

[2017-03-23 20:36:18] [pgoapi.auth] [INFO] Google User Login successful.
[2017-03-23 20:36:18] [pgoapi.auth] [DEBUG] No Access Token available!
[2017-03-23 20:36:18] [pgoapi.auth] [INFO] Request Google Access Token...
[2017-03-23 20:36:18] [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTPS connection (1): android.clients.google.com
[2017-03-23 20:36:18] [requests.packages.urllib3.connectionpool] [DEBUG] "POST /auth HTTP/1.1" 200 None
[2017-03-23 20:36:18] [pgoapi.auth] [INFO] Google Access Token successfully received.
[2017-03-23 20:36:18] [pgoapi.auth] [DEBUG] Google Access Token: XYZ...
[2017-03-23 20:36:18] [pgoapi.pgoapi] [INFO] Starting RPC login sequence (iOS app simulation)
[2017-03-23 20:36:18] [pgoapi.rpc_api] [DEBUG] Generating main RPC request...
[2017-03-23 20:36:18] [pgoapi.rpc_api] [DEBUG] Incremented RPC Request ID: 123
[2017-03-23 20:36:18] [pgoapi.rpc_api] [DEBUG] Generating sub RPC requests...
[2017-03-23 20:36:18] [pgoapi.rpc_api] [DEBUG] No Session Ticket found - using OAUTH Access Token
[2017-03-23 20:36:18] [pgoapi.auth] [DEBUG] Access Token still valid for further 00:58:00 hours (123 < 123)
[2017-03-23 20:36:18] [pgoapi.auth] [DEBUG] Using cached Google Access Token
[2017-03-23 20:36:18] [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTPS connection (1): pokehash.buddyauth.com
[2017-03-23 20:36:18] [PokemonGoBot] [INFO] [api_error] Server busy or offline, reconnecting in 1044 seconds

So I guess hashing service is down.

Tried both with a google and a PTC account, same messages. Login from phone works on these accounts.

pogarek commented 7 years ago

yes, niantic or hashing servers have issues now

guenterneust commented 7 years ago

I'm having the same issue as DeepJeep (Server busy or offline immediately after starting new HTTPS connection to pokehash), and as the same hash key works well with pokebot ninja on another ptc account, I do not think that the bossland or niantic servers have issues.

kujourin commented 7 years ago

@Jcolomar I think it's a big problem. If I use bot, I will can't use gmail and Google play and all Google service with my android...

s1ak commented 7 years ago

I think, the hash server certificate expired: pokehash.buddyauth.com uses an invalid security certificate. The certificate expired on 2017-03-23 19:22.

Yasheshpandita commented 7 years ago

@s1ak So what do we do now ?? Wait for it or use some other hash server.

s1ak commented 7 years ago

I send a message to the buddyauth.com! We are waiting for the support... :)

neurovul commented 7 years ago

You can edit "/PokemonGo-Bot/lib/python2.7/site-packages/pgoapi/hashserver.py" and remove the 's' of "https". But it's not the best solution.

s1ak commented 7 years ago

@neurovul Thanks! This work. On linux (Ubuntu/docker): /usr/local/lib/python2.7/dist-packages/pgoapi/hash_server.py

Yasheshpandita commented 7 years ago

@neurovul @s1ak What chances are of getting banned ??

GhosterBot commented 7 years ago

better to leave https and change on the same file _session.verify = True to _session.verify = False

then remove hash_server.pyc and restart

Yasheshpandita commented 7 years ago

@GhosterBot Thanks it works. But how long do you think this will work ?

GhosterBot commented 7 years ago

People at pokehash are currently fixing certificat issue. It should be ok in a near futur (don't know exactly when, so don't ask ;-) At this time, there should be a message here telling us we could put back _session.verify = True

Yasheshpandita commented 7 years ago

Okay cool. But the server busy or offline issue still comes more frequently.

GhosterBot commented 7 years ago

@Yasheshpandita indeed. So http does less "server busy", but is less secure, all datas (and your hash key) are clearly sent over the internet. At least it's your choice ;)

DeepJeep commented 7 years ago

@s1ak did you get feedback from hashbuddy?

I tried again to start the bot today (without changing config to http or such) and it seems to work again.

So everything seems to work fine again (besides sporadic disconnect/reconnects)

pogarek commented 7 years ago

this should be solved by now. closing