[BUG] egg incubation not iterating when more than one empty incubator and eggs
Description: started with 5+ eggs and 5 incubators. Ran bot twice. Each time it puts one egg in the incubator successfully and then seems to try to put the same egg in the incubator over and over.
Steps to reproduce: This may only be a problem when there is more than one empty incubator and eggs. Normally each egg would be put into a single empty incubator after a hatch.
Expected behavior:
Actual behavior: 24 Jul 13:07:56: Going to transfer MAGMAR with CP 417 and IV 60%; reason: CP < 500 and IV < 80% 24 Jul 13:07:57: Walking to (34.008096, -118.49908) in 190.03771558782148 steps. 24 Jul 13:07:57: Put egg -3438766698578919875 in unused incubator 24 Jul 13:07:57: Failed to put egg in incubator; error: ERROR_INCUBATOR_ALREADY_IN_USE 24 Jul 13:07:57: Failed to put egg in incubator; error: ERROR_INCUBATOR_ALREADY_IN_USE 24 Jul 13:08:00: Getting map of (34.00751323289827, -118.49980483347952) 24 Jul 13:08:01: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 13:08:05: Getting map of (34.00758372584156, -118.49976233403495) 24 Jul 13:08:06: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 13:08:10: Getting map of (34.00768570635406, -118.49957850157764) 24 Jul 13:08:11: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 13:08:15: Getting map of (34.00780570106458, -118.49954235371324) 24 Jul 13:08:16: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 13:08:20: Getting map of (34.00787653005325, -118.4994420715369) 24 Jul 13:08:21: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 13:08:25: Getting map of (34.00790269421875, -118.49931878660202) 24 Jul 13:08:26: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 13:08:30: Getting map of (34.008049146420596, -118.49913075778557) 24 Jul 13:08:31: Found pokemon SHELLDER
Version: master v0.4.0 (same with current dev branch)
Can confirm that after stopping and starting bot three times, each time one egg was incubated and then ERROR repeated. The fourth time it was run, egg was incubated an no more errors. All incubators now full. I believe error happens when more than one empty incubator.
same as #230
Spoke too soon - later on same run, got a non-fatal exception and then the same ERRORs. I don't seem to have had an egg hatch or new egg from pokestop before it.
24 Jul 13:44:59: Getting map of (34.005603139018085, -118.48884713909446) Exception in thread "Thread-312" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at java.util.Collections$UnmodifiableList.get(Collections.java:1309) at POGOProtos.Networking.Responses.GetHatchedEggsResponseOuterClass$GetHatchedEggsResponse.getExperienceAwarded(GetHatchedEggsResponseOuterClass.java:292) at com.pokegoapi.api.inventory.Hatchery.queryHatchedEggs(Hatchery.java:77) at ink.abb.pogo.scraper.tasks.HatchEggs.run(HatchEggs.kt:34) at ink.abb.pogo.scraper.Bot.task(Bot.kt:86) at ink.abb.pogo.scraper.Bot$run$$inlined$fixedRateTimer$lambda$lambda$2.invoke(Bot.kt:80) at ink.abb.pogo.scraper.Bot$run$$inlined$fixedRateTimer$lambda$lambda$2.invoke(Bot.kt:21) at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:18) 24 Jul 13:45:04: Getting map of (34.0056811499958, -118.48873680746598) 24 Jul 13:45:04: Going to transfer MAGIKARP with CP 141 and IV 71%; reason: CP < 500 and IV < 80% 24 Jul 13:45:05: Going to transfer WEEDLE with CP 197 and IV 42%; reason: CP < 500 and IV < 80% 24 Jul 13:45:06: Put egg 670869034293027114 in unused incubator 24 Jul 13:45:09: Getting map of (34.00578515780381, -118.48857434848087) 24 Jul 13:45:09: Profile update: 375060 XP on LVL 22; 40060/100000 (40.06%) to LVL 23 24 Jul 13:45:09: XP gain: 13205 XP; Pokemon caught/transferred: 44/34; Items caught/dropped: 139/82; Pokebank 118/250; Stardust 141765 24 Jul 13:45:09: Looting nearby pokestop 0648122ee1ec436e96b5a3196f1df75a.16 24 Jul 13:45:09: Looted pokestop 0648122ee1ec436e96b5a3196f1df75a.16; +50 XP: [1xITEM_REVIVE, 2xITEM_POKE_BALL] 24 Jul 13:45:09: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 13:45:14: Getting map of (34.00578205116945, -118.48845686775284) 24 Jul 13:45:14: Dropped 2x ITEM_POKE_BALL 24 Jul 13:45:14: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING
Confirmed 0.4.0
24 Jul 16:00:57: Dropped 1x ITEM_REVIVE 24 Jul 16:00:58: Dropped 3x ITEM_POKE_BALL 24 Jul 16:00:58: Put egg 4813735324968148721 in unused incubator 24 Jul 16:00:59: Destination reached. 24 Jul 16:01:02: Getting map of (46.360348265926994, -94.2011598073849) 24 Jul 16:01:02: Walking to (46.360479, -94.200681) in 65.32745386955828 steps. 24 Jul 16:01:03: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 16:01:07: Getting map of (46.36039984200209, -94.20095114809895) 24 Jul 16:01:07: Looting nearby pokestop 4938d9b0c5774ade834734910bb5665d.16 24 Jul 16:01:07: Looted pokestop 4938d9b0c5774ade834734910bb5665d.16; +50 XP: [1xITEM_RAZZ_BERRY, 1xITEM_GREAT_BALL, 1xITEM_POKE_BALL] 24 Jul 16:01:08: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 16:01:12: Getting map of (46.36041525968697, -94.20077959915648) 24 Jul 16:01:12: Dropped 1x ITEM_POKE_BALL 24 Jul 16:01:13: Dropped 1x ITEM_GREAT_BALL 24 Jul 16:01:13: Dropped 1x ITEM_RAZZ_BERRY 24 Jul 16:01:13: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 16:01:16: Destination reached. 24 Jul 16:01:17: Getting map of (46.36051853518272, -94.20068883300445) 24 Jul 16:01:17: Walking to (46.36008, -94.200199) in 103.68585018605638 steps. 24 Jul 16:01:20: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 16:01:22: Getting map of (46.36039997507007, -94.20053278869314) 24 Jul 16:01:27: Getting map of (46.360289899492614, -94.20044250743305) 24 Jul 16:01:29: Looting nearby pokestop 9cac6cdac206451da9ed7beff7acfc4a.16 24 Jul 16:01:29: Looting nearby pokestop 9cac6cdac206451da9ed7beff7acfc4a.16 24 Jul 16:01:29: Looted pokestop 9cac6cdac206451da9ed7beff7acfc4a.16; +50 XP: [1xITEM_GREAT_BALL, 2xITEM_POKE_BALL] 24 Jul 16:01:29: Pokestop still in cooldown mode; blacklisting for 5 minutes 24 Jul 16:01:30: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 16:01:30: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING 24 Jul 16:01:32: Getting map of (46.36017320737439, -94.20032846344358) 24 Jul 16:01:32: Dropped 2x ITEM_POKE_BALL 24 Jul 16:01:33: Dropped 1x ITEM_GREAT_BALL 24 Jul 16:01:33: Failed to put egg in incubator; error: ERROR_POKEMON_ALREADY_INCUBATING
I join in nox put eggs , and use bot) xD
@cleftfairy
Exception in thread "Thread-312" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
Prebuilt v0.4.0 or compiled yourself? Because this bug should be fixed in in the prebuilt version,
Using pre-built 0.4.0 and got ERROR_POKEMON_ID_NOT_EGG instead. By the message I guess it tried to put something that's not an egg into the incubator, but restarting it also solved it. Didn't feel the need to open a seperate one as I feel it's related to the current issue.
EDIT: What is different in my case is that the incubator dropped from leveling, meaning that the incubator for egg was not present when the bot started.
Same as #229
bug in Java API... smh
Just ran into this after 28 minutes, it hatched an egg or two at first but then it spit this out and started failing.
Exception in thread "Thread-409" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at java.util.Collections$UnmodifiableList.get(Collections.java:1309) at POGOProtos.Networking.Responses.GetHatchedEggsResponseOuterClass$GetHatchedEggsResponse.getExperienceAwarded(GetHatchedEggsResponseOuterClass.java:292) at com.pokegoapi.api.inventory.Hatchery.queryHatchedEggs(Hatchery.java:77) at ink.abb.pogo.scraper.tasks.HatchEggs.run(HatchEggs.kt:34) at ink.abb.pogo.scraper.Bot.task(Bot.kt:86) at ink.abb.pogo.scraper.Bot$run$$inlined$fixedRateTimer$lambda$lambda$2.invoke(Bot.kt:80) at ink.abb.pogo.scraper.Bot$run$$inlined$fixedRateTimer$lambda$lambda$2.invoke(Bot.kt:21) at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:18)
Relevant: https://github.com/Grover-c13/PokeGOAPI-Java/issues/189
Checked my account in the app, and see 7/9 eggs and 2/2 empty incubators available all are 2km.
#204 Yea someone has a fix for the PokeGoAPI/POGOProtos, but it has not yet been commited. https://github.com/AeonLucid/POGOProtos/pull/54
#204 should not be present in the prebuilt v0.4.0 because I couldn't wait and wanted to release I manually incorporated that bug fix
Yea, I am compiling.
Bugfix for @cleftfairy's problem in https://github.com/Grover-c13/PokeGOAPI-Java/pull/190
ok @Forty-Tw0, surprised me that this bug was encountered as I thought that I fixed it in the jar haha
Just now I'm getting a lot of Failed to put egg in incubator; error: ERROR_INCUBATOR_ALREADY_IN_USE
Prebuilt jar or develop?
On develop.
Reopening because of #417
Should be fixed in 0.4.3
Thanks.