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

After re-login from stale session, bot teleports to random pokestop

Open Dekryptid opened this issue 10 years ago • 5 comments

Expected Behavior

Expected the bot to pick up right where it left off (location) after a successful re-login

Actual Behavior

Teleported trainer to a distant pokestop (see smooth line in screenshot)

Steps to Reproduce

Run bot till session is stale and re-logs in. Then look at the web map (submodule)

Other Information

OS:

Mac

screen shot 2016-07-25 at 3 13 08 pm

Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)

Dekryptid avatar Jul 25 '16 19:07 Dekryptid

how can i show that red line route on my map to confirm this?

bimahp avatar Jul 25 '16 20:07 bimahp

On the right hand side, click "Settings", then toggle "Bot Path" on

Dekryptid avatar Jul 25 '16 20:07 Dekryptid

successful re-login, we should use location cache, and not pick a new location

fredrik-hellmangroup avatar Jul 25 '16 21:07 fredrik-hellmangroup

tagging #810 as both reference last location cache

fredrik-hellmangroup avatar Jul 25 '16 21:07 fredrik-hellmangroup

This is (probably) due to the self.position (or self.location) not being updated correctly when walking. There are multiple instances in the codebase where position is changed but self.position is not updated - so when the session is due to expire, the position used is from the last time self.position was updated, which could be any time!

Actually.. maybe not..

MikeDX avatar Jul 26 '16 10:07 MikeDX