Bug - Fixed problems with detecting items in closet on login

So I have several hundred different types of items in my closet due to using the stashpvp.ash script.

What I have noticed is the often food and drink items aren't detected in my closet (for example
spectral pickles). However if I hit the "Refresh" button in the Item Manager, it will then discover
all of the missing items.

So I am wondering why when logging in, all of the closet items aren't discovered, but the Refresh
button seems to work correctly.

Hopefully this is a simple fix.

Thanks!!
 

Catch-22

Active member
Under connection options do you have "Forcibly time-out laggy requests" ticked?

If so, could you try again with it disabled?

If it still happens, could you turn on debugging with "Verbosely log communication between KoLmafia and browser" also ticked and attach the debug log of your login sequence?
 
Under connection options do you have "Forcibly time-out laggy requests" ticked?

Yes I did.

If so, could you try again with it disabled?

Ok, so I disabled this, and saw the same behavior.


If it still happens, could you turn on debugging with "Verbosely log communication between KoLmafia and browser" also ticked and attach the debug log of your login sequence?

I turned on this setting, but I could not find a debug log anywhere ... are you sure it generates one.. if so, where?
 

Theraze

Active member
Did you turn on debugging? Enabling Verbosely log was only half of that request... you also need to start a debug log.
 

Veracity

Developer
Staff member
Huh. I see that your closet is full of "collapsed" sections. I wonder if there is a way to ask for a refresh with everything uncollapsed?

(This is why I have been asking - for a long long time - to have an api.php to get the closet, just like the request to get your inventory.)

I'm going to ask CDM how to read the closet reliably - and to again ask for api.php?what=closet
 

Veracity

Developer
Staff member
Bug report submitted.

As a workaround, try un-checking "Delay Loading of Collapsed Inventory Sections" on the Inventory tab of KoL's options. Tell me how it works.
 
Huh. I see that your closet is full of "collapsed" sections. I wonder if there is a way to ask for a refresh with everything uncollapsed?

(This is why I have been asking - for a long long time - to have an api.php to get the closet, just like the request to get your inventory.)

I'm going to ask CDM how to read the closet reliably - and to again ask for api.php?what=closet

That sounds like a good idea. So given this I tried an experiment. I logged into Kol in the web browser, opened every collapsed section, and then logged out.

Logged in with KolMafia and the spectral pickles were visible now in the closet (as well as hi mein's, etc..)

However in the "Food" tab, they are not.

So I have "hi mein" typed in the closet tab, and I see I have 141 of every hi mein.
I go to the Food tab, type in "hi mein" and don't see anything, but then if I click the "Refresh" button
the Hi Meins suddenly appear in the Food tab, as do the spectral pickles too.

If you need any more debugging, let me know.
 

Veracity

Developer
Staff member
Do you have autoSatisfyWithCloset checked? The Food tab will not show items in the closet unless you do.
 
Do you have autoSatisfyWithCloset checked? The Food tab will not show items in the closet unless you do.

So in the "Item Acquisition" preferences I have "Take items from the closet whenver needed", checked off. Is this the preference you are referring to?
 

Veracity

Developer
Staff member
Yes. And I should have known that, since you said that the refresh button made them appear.

That's a different problem than the collapsed-section thing.
 
Bug report submitted.

As a workaround, try un-checking "Delay Loading of Collapsed Inventory Sections" on the Inventory tab of KoL's options. Tell me how it works.

Ok, now this is very interesting... I un-checked this, and I purposefully collapsed all of the sections in my closet in the web browser.

Then I logged in the mafia, and not only did my food items appear in the closet tab, but they showed up in the food tab as well.

So it looks like all the bugs I have been seeing related to the closet are due to this option I had set in Kol to speed load time of my inventory
screens.
 

Veracity

Developer
Staff member
Revision 11190 detects when you have the "lazy inventory" option set, either when looking at api.php or when you visit the Inventory tab of KoL's Options page. If you have that setting, when we refresh Inventory (either at login or via the Inventory Manager's "refresh" button), we turn it off before looking at the closet and restore it afterwards.

That option forces two extra requests on us. I still want an api.php?what=closet feature - and it's on CDM's queue, along with dozens of other requests & unfixed bugs I have submitted - but I'm assuming we won't get it any time soon. If ever.
 
This is a great idea, and I do hope that CDM decides to make an API for the closet too.

However, I am still having one more problem. Now my food and drink work great. However usable items, such as milk of magnesium, or mojo filters, etc... that are in my closet are not detectable in the Item Manager's "Usable" menu. Hitting the "Refresh" button does not correct the situation, so I am assuming that for some reason the preference to use items from your closet as needed has not been integrated into the "Usable" section of the Item Manager.

Also I checked the "Restores" tab, and the same issue is there. I have some Red Pixel Potions in my closet that does not show up under the Restores tab either.
 

lostcalpolydude

Developer
Staff member
This is a great idea, and I do hope that CDM decides to make an API for the closet too.

However, I am still having one more problem. Now my food and drink work great. However usable items, such as milk of magnesium, or mojo filters, etc... that are in my closet are not detectable in the Item Manager's "Usable" menu. Hitting the "Refresh" button does not correct the situation, so I am assuming that for some reason the preference to use items from your closet as needed has not been integrated into the "Usable" section of the Item Manager.

Also I checked the "Restores" tab, and the same issue is there. I have some Red Pixel Potions in my closet that does not show up under the Restores tab either.

That could be a separate feature request to add those, but mafia knows you have the items and will use them if you use a CLI/ASH command to use the item, so this bug looks fixed.
 
Top