Closed leralc closed 8 hours ago
With no knowledge of the codebase, it appears the only place FBCWardrobe
is directly handled is in https://github.com/KittenApps/WCE/blob/main/src/functions/extendedWardrobe.ts#L47, where creation only occurs on a migration from BCEWardrobe
, and not if neither presently exists.
This got broken while trying to fix incompatibilities with some other misbehaving addons in https://github.com/KittenApps/WCE/commit/d9e96661285d133897b8de5c249ffeae4d5a8d6f
I think this safeguard should really stay there, so a better fix would be to maybe check when the extended Wardrobe is enabled in settings, if the save data exists and if not create it. That reduced the number of times when something could go wrong from every addonh load to only when reenabling the extended wardrobe.
@KittenApps
Thanks! Looks like the fix works (S/O aforementioned friend for testing while I was away). Something to note though is that since the fix only initializes FBCWardrobe when the setting is toggled (from what I can tell), it won't do anything for anyone who had enabled the setting during the past 3 months in which the bug was present.
Since the bug is rather difficult to track down/pinpoint and all the normal end user would know is that "outfits past X tab disappear after relog", they may not know to toggle the setting to fix it. Ideally, there should be a retroactive fix or a prominent notice of some sort.
I know, I'm a bit hesitant for a more aggresive fix, because I know people lost their wardrobe in the past, because some other faulty addon made loading the extended wardrobe fail and WCE just overwrote the stored extended wardrobe with that faulty empty data then.
But yeah that should be announced in the changelog once it's released to stable.
Ahh, I see. Make sense then, hopefully the changelog gets the point across.
Summary
It appears that on new accounts that have not previously had the Extended Wardrobe option enabled, WCE is presently failing to initialize the ExtensionSetting for it, leading to an extended wardrobe that will appear in the UI, but whose outfits will disappear following a refresh as the values are not synced to the BC server.
This was discovered in the wild by a friend of mine (whose account was created recently and noticed the issue when outfits saved to WCE slots [slot # > 24] disappeared after refreshing), and was narrowed down after a short debugging session. They were able to replicate the issue on their main & alt (all relatively new accounts -- potentially prior to the FBC -> WCE transition, if that's related?), and I was able to replicate the issue on a completely fresh account myself, but cannot say for certain whether there was any additional factor that was overlooked.
I have included details on the environments in which the bug has been successfully reproduced, as well as detailed repro instructions below. If you're unable to replicate the bug, please let me know, and I can see if there's something I've missed, as I haven't spent too much time looking into this.
Environments
Expand for details
BC: R110 1. - OS: Windows 10 - Browser: Firefox - UserScript Manager: Violentmonkey - Scripts: FUSAM, Additional External Scripts (No Overlap w/ Other Environments) - WCE Channel: Stable 2. - OS: Windows 10 - Browser: Firefox - UserScript Manager: Tampermonkey - Scripts: FUSAM, Additional External Scripts (No Overlap w/ Other Environments) - WCE Channel: Stable 3. - OS: Windows 10 - Browser: Edge - UserScript Manager: Tampermonkey - Scripts: FUSAM, Additional External Scripts (No Overlap w/ Other Environments) - WCE Channel: StableReproduction
Player.ExtensionSettings
in console and notice thatFBCWardrobe
does not existPlayer.ExtensionSettings
in console and notice thatFBCWardrobe
does not existAdditional Notes
A hacky patch that I have successfully used to fix this bug in the meantime is to manually initialize the
FBCWardrobe
value, sync it, and refresh, after which FBC successfully updates the setting and normal functionality resumes: