New state of 'nil' is invalid.
HI, I have an issue with Docker.
The #1 time I used the bot, everything was working as expected, until the bot arrived next to a Fort. Upon arrival the bot crashed with the following exception: "New state of 'nil' is invalid.". I restarted the bot, but this time the exception was displayed right away.
I restarted the bot several time, and also docker, my computer, ... but the same error was displayed each time. Then, I tried PokemonGO on my smartphone, to let the geolocolization replace my avatar, and I started the bot again. This time, everything went as expected, until once again, the bot arrived next to a fort.
Just to be sure, I also ran Docker from the usual command prompt (not only from the powershell), because I read somewhere there could be an issue with unicode when using powershell with Docker.
Expected Behavior
The bot does not crash at start up (the first time, upon arrival at a Fort).
Actual Behavior
The bot crashes at start-up.
.... 2016-08-10 09:57:43,078 [PokemonGoBot] [INFO] [bot_start] Starting bot... 2016-08-10 09:57:43,810 [CollectLevelUpReward] [INFO] [level_up_reward] Received level up reward: [] 2016-08-10 09:57:43,811 [IncubateEggs] [INFO] [next_egg_incubates] Next egg incubates in 4.82 km 2016-08-10 09:57:44,381 [RecycleItems] [INFO] [item_discard_skipped] Skipping Recycling of Items. 256 space left in bag. New state of 'nil' is invalid.
Your config.json (remove your credentials and any other private info)
That's the default config:
{ "auth_service": "ptc", "username": "_", "password": "_", "location": "35.3974776,139.6197098", "gmapkey": "***", "libencrypt_location": "", "tasks": [ { "type": "HandleSoftBan" }, { "type": "CollectLevelUpReward" }, { "type": "IncubateEggs", "config": { "longer_eggs_first": true } }, { "type": "TransferPokemon" }, { "type": "EvolvePokemon", "config": { "evolve_all": "none", "first_evolve_by": "cp", "evolve_above_cp": 500, "evolve_above_iv": 0.8, "logic": "or", "evolve_speed": 20, "use_lucky_egg": false } }, { "type": "RecycleItems", "config": { "min_empty_space": 15, "item_filter": { "Pokeball": { "keep" : 100 }, "Potion": { "keep" : 10 }, "Super Potion": { "keep" : 20 }, "Hyper Potion": { "keep" : 30 }, "Revive": { "keep" : 30 }, "Razz Berry": { "keep" : 100 } } } }, { "type": "CatchVisiblePokemon" }, { "type": "CatchLuredPokemon" }, { "type": "SpinFort" }, { "type": "MoveToFort", "config": { "lure_attraction": true, "lure_max_distance": 2000 } }, { "type": "FollowSpiral", "config": { "diameter": 4, "step_size": 70 } } ], "map_object_cache_time": 5, "forts": { "avoid_circles": true, "max_circle_size": 50 }, "websocket_server": false, "walk": 4.16, "action_wait_min": 1, "action_wait_max": 4, "debug": false, "test": false, "health_record": false, "location_cache": true, "distance_unit": "km", "reconnecting_timeout": 15, "evolve_captured": "NONE", "catch_randomize_reticle_factor": 1.0, "catch_randomize_spin_factor": 1.0, "catch": { "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"}, "// Example of always catching Rattata:": {}, "// Rattata": { "always_catch" : true } }, "release": { "any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"}, "// Example of always releasing Rattata:": {}, "// Rattata": {"always_release": true}, "// Example of keeping 3 stronger (based on CP) Pidgey:": {}, "// Pidgey": {"keep_best_cp": 3}, "// Example of keeping 2 stronger (based on IV) Zubat:": {}, "// Zubat": {"keep_best_iv": 2}, "// Also, it is working with any": {}, "// any": {"keep_best_iv": 3}, "// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {}, "// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3} }, "vips" : { "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {}, "any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" }, "Lapras": {}, "Moltres": {}, "Zapdos": {}, "Articuno": {},
"// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
"Mewtwo": {},
"Dragonite": {},
"Snorlax": {},
"// Mew evolves to Mewtwo": {},
"Mew": {},
"Arcanine": {},
"Vaporeon": {},
"Gyarados": {},
"Exeggutor": {},
"Muk": {},
"Weezing": {},
"Flareon": {}
}
}
Steps to Reproduce
- Follow the installation instruction, with Docker
- Run docker "docker run --name=pokego-bot1 --rm -it -v $(pwd)/configs/config-account1.json:/usr/src/app/configs/config.json pokemongo-bot"
- Wait until the bot is next to a Fort
Other Information
Just in case, here is my Docker version:
Client: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 8eab29e Built: Thu Jul 28 23:54:00 2016 OS/Arch: windows/amd64
Server: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 8eab29e Built: Thu Jul 28 23:54:00 2016 OS/Arch: linux/amd64
Here is the is the command line to run with docker (from windows):
docker run --name=pokego-bot1 --rm -it -v /c/Users/adrien/Documents/pokemonBOT/PokemonGo-Bot/configs/config-account1.json:/usr/src/app/configs/config.json pokemongo-bot
Btw, I'm using Docker because I didn't manage to use encrypt.dll (like some other people here). I read one the issue where you advised to use Docker instead.
Thanks in advance for your help, and I apologize in advance if it's a "stupid" configuration error from my part.
Solved, it was indeed an issue with Docker and the way Unicode character are handled.
The issue is present with both cmd.exe and powershell.exe. I downloaded ConEmu which somehow handle unicode characters much better. As you can see, the name of the pokestop is in Japanaese, I guess that what's why:
2016-08-10 15:40:18,892 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop 秩父宮勢津子妃殿下御染筆歌碑 - 0.33km 2016-08-10 15:40:21,090 [RecycleItems] [INFO] [item_discard_skipped] Skipping Recycling of Items. 257 space left in bag. 2016-08-10 15:40:21,094 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop 秩父宮勢津子妃殿下御染筆歌碑 - 0.33km
Here is the link of the ConEmu (https://www.fosshub.com/ConEmu.html)