loathers / garbage-collector

Script for farming meat (and garbage) in 2003 web RPG Kingdom of Loathing
25 stars 57 forks source link

[BUG] Error: Abort when autumnaton isn't removed from inventory properly #1657

Closed Alium58 closed 1 year ago

Alium58 commented 1 year ago

Describe the bug After fight a vote monster (angry ghost) got this image See full stack in session log section

To Reproduce Don't know. Happened after a vote monster for me.

Expected behavior Don't hard stop

Session Log Alium_20231016.txt

Preference _concoctionDatabaseRefreshes changed from 1221 to 1222
Updating inventory...
Preference _concoctionDatabaseRefreshes changed from 1222 to 1223
*KoL says don't have that item, but KoLMafia thinks you do, so refreshing KoLMafia Inventory*
hpAutoRecoveryTarget => 0
Preference hpAutoRecoveryTarget changed from 0.0 to 0
mpAutoRecoveryTarget => 0
Preference mpAutoRecoveryTarget changed from 0.0 to 0
Preference customCombatScript changed from grimoire_macro to garbo
CCS set to garbo
Autoattack is disabled.
Autoattack is disabled.
Preference customCombatScript changed from garbo to waffleTest
CCS set to waffleTest
hpAutoRecoveryTarget => 0
Preference hpAutoRecoveryTarget changed from 0.0 to 0
mpAutoRecoveryTarget => 0
Preference mpAutoRecoveryTarget changed from 0.0 to 0
choiceAdventureScript => auto_choice_adv.ash
Preference choiceAdventureScript changed from to auto_choice_adv.ash
valueOfInventory => 2
Preference valueOfInventory changed from 2.0 to 2
choiceAdventure1467 => 1
Preference choiceAdventure1467 changed from 3 to 1
choiceAdventure1473 => 3
Preference choiceAdventure1473 changed from 1 to 3
choiceAdventure1474 => 1
Preference choiceAdventure1474 changed from 2 to 1
Preference choiceAdventure1387 changed from 2 to -1
Preference garboStashItems changed from 6860 to
You fought 44 KGEs at the beginning of the day, and an additional 0 digitized KGEs throughout the day. Good work, probably!
Including this, you have fought 63 across all ascensions today
Extreme Items:
5 autumn dollar worth 27450 total
173 meat stack worth 17300 total
1 Yeast of Boris worth 7155 total
-11 flapper fly worth -54252 total
-1 pink candy heart worth -1800 total
-23 How to Avoid Scams worth -1150 total
Preference garboResultsMeat changed from -388712 to 572554
Preference garboResultsItems changed from -28408 to -13115
Preference garboResultsTurns changed from 19 to 68
This run of garbo, across 49 turns you generated 976,559 meat, with 961,266 raw meat and 15,293 from items
So far today, across 68 turns you generated 559,439 meat, with 572,554 raw meat and -13,115 from items
JavaScript exception: Error: Cannot call maxBy on an empty array! (file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js#1067)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:1067 (maxBy)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:38506 (mostValuableUpgrade)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:38363 (bestAutumnatonLocation)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:10519 (sendTo)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:39202 (postCombatActions)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:45390 (execute)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:28396 (run)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:45446 (runGarboTasks)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:45452 (runGarboQuests)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:45907
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:38023 (withClan)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:38017 (withVIPClan)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:45879
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:38002 (withStash)
at file:/C:/Users//Desktop/Games/KoLMafia/scripts/garbage-collector/garbo.js:45878 (main)

Additional context Recently became a voter. Did hit shore trip change issue where we can't toaster gaze anymore. Manually sent on a vacation, updated garbo, ran again. Later got this error. Dunno if related

horrible-little-slime commented 1 year ago

The maxBy error happened because we were unable to populate the list of available fallbot locations. But we were unable to populate that list because you didn't actually have your fallbot.

One snippet I notice is

You acquire an item: autumn-aton
After Battle: You gain 72 Fortitude
After Battle: You gain 66 Wizardliness
After Battle: You gain 66 Cheek
You acquire an item: autumn dollar
You acquire an item: autumn breeze
You acquire an item: Yeast of Boris
After Battle: You gain 1 Enchantedness
Preference _juneCleaverFightsLeft changed from 8 to 7
Preference _juneCleaverStench changed from 27 to 28
Preference lastCopyableMonster changed from angry tourist to horrible tourist family
Preference _boomBoxFights changed from -1 to 0
Preference familiarSweat changed from 671 to 672
Preference autumnatonQuestLocation changed from The Daily Dungeon to 
Preference _concoctionDatabaseRefreshes changed from 1217 to 1218

use 1 autumn-aton
mallsearch latte
Send your autumn-aton to The Daily Dungeon
> 
> Executing Barf Turn/Vote Wanderer
> Wandering at Hero's Field for expected value 459.00 (8-bit (green))

familiar Grey Goose (68 lbs)

equip acc1 "I Voted!" sticker

notice that the autumnatonQuestLocation didn't get updated when we sent it off--I'd guess a 500 error ate the responseText, and mafia thought you still had the fallbot.

If this happens again, it might be worth looking into. Otherwise I'm going to go ahead and chalk this up to cosmic rays.

Alium58 commented 1 year ago

Oh I might be the cosmic ray... Looks like I manually did a mall search for latte when autumanton was being used

horrible-little-slime commented 1 year ago

Alium is a cosmic ray: confirmed

ktpolanski commented 11 months ago

Can confirm I just ran into this as well, and also cosmic rayed by searching the mall at the same exact time as the autumnaton check was trying to happen.

ktpolanski commented 10 months ago

I ran into this again today, but this time it happened on its own without me doing a mall search. CLI output:

Executing Postcombat/Autumn-Aton
CCS set to grimoire_macro
Autoattack is disabled.
Preference _concoctionDatabaseRefreshes changed from 1283 to 1284
Preference nextAdventure changed from None to Shadow Rift
Submitting option 2 for choice 1483
Send your autumn-aton to Shadow Rift
IOException retrieving server reply (choice.php?whichchoice=1483&option=2&heythereprogrammer=567&pwd) -- /192.168.0.10:55336: GOAWAY received.

Executing Postcombat/Autumn-Aton
Autoattack is disabled.
Updating inventory...
Preference _concoctionDatabaseRefreshes changed from 1284 to 1285
KoL says don't have that item, but KoLMafia thinks you do, so refreshing KoLMafia Inventory

And commence abort sequence. I did a refresh all and continued on my merry way without issue.

Nothing interesting in the log. Stuff happened around line 88831.

DanceCommander6_20231126.txt