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

[ENHANCEMENT] Make client<>server token refresh so session doesnt timeout

Open ghost opened this issue 10 years ago • 9 comments

When I start the bot at my location it is good for about 1 hour, going to PokeStops catching releasing Pokémon but then once that hour or so elapses it just walks round for hours on end (currently 7 hours) doing nothing.

ghost avatar Jul 24 '16 19:07 ghost

The session token expires after about an hour (sometimes less, sometimes more). After that it needs to re-login to continue. Your only option at the moment is to restart it.

MikeDX avatar Jul 24 '16 19:07 MikeDX

Oh, I assumed that it was still running due to the walking notices. Is that not the case then?

ghost avatar Jul 24 '16 19:07 ghost

It's still moving around, but it cant perform any tasks as the session is expired (but isnt aware of it)

MikeDX avatar Jul 24 '16 20:07 MikeDX

@MikeDX Its possible to check if the session is expired? Then just needs to refresh the token.

gpires avatar Jul 24 '16 20:07 gpires

Or just renew it every hour anyway.

ghost avatar Jul 24 '16 20:07 ghost

@gpires yes, since the PokemonGo-Map repo does exactly this, it gets the session token lifetime at login.

@phupabegim no that is just a dirty hack way of doing it.

MikeDX avatar Jul 24 '16 22:07 MikeDX

This is my biggest issue right now :<

tonz134 avatar Jul 24 '16 22:07 tonz134

Currently working on a fix for this as it is driving me insane :)

MikeDX avatar Jul 24 '16 23:07 MikeDX

Submitted Pull request #735

MikeDX avatar Jul 25 '16 00:07 MikeDX