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

[DEV] Forts info are not updated in location-*.json

Open Gregwar opened this issue 10 years ago • 3 comments

It appear that forts infos are not updated in location-*.json When the file is created at startup forts are in it, but later the forts data disappear (Note: I'm testing the cluster strategy) EDIT: It seems that forts info are written only sometime, is that true/normal?

Gregwar avatar Aug 01 '16 08:08 Gregwar

tl;dr This should have minimal to no impact on the website as long as the bot is working correctly. However, the bot is not currently working correctly because this is not merged yet: https://github.com/PokemonGoF/PokemonGo-Bot/pull/2269

The long version: This actually helped me find another larger issue where the fort data was getting lost entirely by the bot when the server returns no fort data. I fixed this in https://github.com/PokemonGoF/PokemonGo-Bot/pull/2269 (It's still waiting for the pull request to be approved, but it should fix the issue where fort pathing randomly breaks.)

However, it does not fix the saving of the empty fort data to the location-*.json in the web directory, it only fixes the bot's internal location data.

Even so, it seems like the website updates the forts just fine as long as it picks up one of the fort updates from the bot (fort updates seem to happen when you first load the bot, spin a fort, or a lure has become active/inactive on a nearby fort).

SamuraiKal avatar Aug 01 '16 16:08 SamuraiKal

OK Is it because we ask the fort data too often? It looks like I'm also being disconnected often, just like #2184

Gregwar avatar Aug 01 '16 16:08 Gregwar

I added a new comment to the issue you referenced. The "follow cluster" task seems to be referencing the bot's internal fort cache. When the bot loses it's fort cache, the "follow cluster" task no longer has a valid fort reference for the request to the server.

Once my pull is approved, it should fix that specific behavior. You could also grab the changes and apply them manually to your local branch. The only file changes that matter for this are in pokemongo_bot/init.py

SamuraiKal avatar Aug 01 '16 17:08 SamuraiKal