PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

[Heroku] Exception if i try to run it on Heroku (dev)

Open DanielVolz opened this issue 10 years ago • 13 comments

I get this exception if i try to run the app on heroku: screenshot 2016-07-27 16 34 27

The funny thing is, i got the same exception on Heroku with the official PokemonGo-Map some days ago. In the meantime this error was fixed, but I can't find the commit.

The code for the auth-timeout looks the same on the PokemonGo-Map and on this bot, but maybe they changed something in the pogoapi. I really don't know.

Edit: I'm stupid, it's because the pogo server are hard to reach. Edit2: I'm actually not stupid. I get the same error on heroku again although the server are online.

DanielVolz avatar Jul 27 '16 14:07 DanielVolz

simply put, server is offline

hero16 avatar Jul 27 '16 14:07 hero16

@hero16 ohh man, I feel stupid now 😅. You're right. Strange coincidences... because now it works, but before that, I could run the bot locally without problems but on Heroku I got the said error. But now it also runs on Heroku :)

DanielVolz avatar Jul 27 '16 15:07 DanielVolz

lol how is running on Heroku working for you? just got me curious haha

hero16 avatar Jul 27 '16 15:07 hero16

The error happened again, although it runs perfectly fine locally. So it not a server problem. @hero16 I'm not a Heroku pro but I can start the app on the server and it runs good until some exceptions happen 😅 .

DanielVolz avatar Jul 27 '16 16:07 DanielVolz

Comparisson between PokemonGo-Map pogoapi und Bot pogoapi: Map pogoapi: screenshot 2016-07-27 18 21 34

Bot pogoapi: screenshot 2016-07-27 18 21 14

DanielVolz avatar Jul 27 '16 16:07 DanielVolz

I got the same problem on Heroku, but everything is fine if running on my laptop. Still curious why. Any update? screenshot from 2016-07-29 20 43 36

h4ckm03d avatar Jul 29 '16 13:07 h4ckm03d

Same problem on Heroku

h8rry avatar Jul 29 '16 13:07 h8rry

Like I mentioned before, I thinks its a PoGoApi problem. I used to have the same error 6 day ago on the PogoMap but in the meantime they fixed it. It has something to do with the order of the auth ticket values (expire_time, start, end).

Personally I changed the code of the expire logic. My bot reconnects now every 25 minutes... I think thats the values of the expiretime.

DanielVolz avatar Jul 29 '16 13:07 DanielVolz

I think the problem occurred if too many login attempt in some period, now I can running normally in heroku after waiting.

File "/app/pokemongo_bot/__init__.py", line 51, in tick self.check_session(self.position[0:2]) remaining_time = self.api._auth_provider._ticket_expire/1000 - time.time() File "/app/pokemongo_bot/__init__.py", line 203, in check_session TypeError: unsupported operand type(s) for /: 'str' and 'int' before got error above, I receive error related GET_INVENTORY and GET_GYM_DETAILS it caused the bot crashed and heroku trying restart automatically.

h4ckm03d avatar Jul 29 '16 13:07 h4ckm03d

@h4ckm03d but why is it different on the local maschine?

DanielVolz avatar Jul 29 '16 14:07 DanielVolz

@DanielVolz I don't know, but last week I running 2 bot with different version, from master branch and dev. both of them running well for several days nonstop.

Now, after restart on heroku the error is coming.

h4ckm03d avatar Jul 29 '16 14:07 h4ckm03d

I'm getting the same error. Was there a resolution for this?

GilbertChan avatar Jul 29 '16 19:07 GilbertChan

@DanielVolz @GilbertChan From my experience, the problem caused by server problem.

I got the same problem on Heroku, but everything is fine if running on my laptop.

I just realize there are EU, US, and ASIA server for PTC login. I'm stay in Asia so login through PTC Asia server so that why yesterday I can still running on my local machine, but this morning (5:38 AM UTC +7) I cannot login and got same error with heroku.

h4ckm03d avatar Jul 29 '16 22:07 h4ckm03d