saif-ellafi / foundryvtt-sidebar-resizer

Allows users to resize the sidebar of Foundry VTT
MIT License
1 stars 2 forks source link

[Bug Report] Exiting a world with popped out sidebar tabs causes error on future world load #3

Closed esheyw closed 2 years ago

esheyw commented 2 years ago

I found this while trying a full 'build module list/settings back up from scratch' world, so the only things active are this module, libwrapper, module management+, and DF settings clarity.

If you exit a world (either log out or return to setup) with Sidebar Resizer active, when you next load that world the module errors (usually but not always? might depend on specific directories popped and/or specific method of exit ie escape menu vs settings tab, needs more testing) like so:

TypeError: Cannot read properties of undefined (reading 'prepend')
[Detected 1 package: sidebar-resizer]
    at _assignVerticalResizer (sidebar-resizer.js:131:12)
    at sidebar-resizer.js:168:3
    at Hooks._call (foundry.js:294:14)
    at Hooks.callAll (foundry.js:253:12)
    at Game.setupGame (foundry.js:5567:11)
    at async Game._initializeGameView (foundry.js:6514:5)
    at async Game.initialize (foundry.js:5431:5)

Entering a different world, my usual test world, with the following module list:

Core Version: 9.269

System: pf2e 3.10.4.11747 (The PF2e System Developers) 

Modules: 
1000-fish 1.1.0 (Fish List: burkenhare#4761, Module: Cody Swendrowski <cody@swendrowski.us>)
acelib 1.3.0 (arcanist)
actor-link-indicator 0.0.3 (JeansenVaars#2857)
advanced-drawing-tools 1.2.2 (dev7355608)
advanced-macros v1.14.2 (KaKaRoTo)
adventuremusic 1.2.0 (Adventure Music)
always-hp 1.0.32 (IronMonk)
ambientdoors 2.2.6 (EndlesNights#9000)
art-gallery 1.2.0 (FloRad)
backgroundless-pins 1.2.03 (Cole Schultz (cole#9640), Kandashi)
bug-reporter 1.3.3 (Ethck, Cody Swendrowski, Andrew Krigline)
chat-images 2.5.6 (bmarian)
chat-portrait 0.7.3 (Shoyu Vanilla, p4535992)
chat-timestamp 0.1.1 (jsavko)
chatlog-scaler 0.0.4 (jegasus)
cleaner-sheet-title-bar 1.3.7 (Daimakaicho#5991)
colorsettings 2.8.4 (ardittristan#0001)
combat-enhancements 1.1.0 (Asacolips)
compact-compendium-list 0.0.6 (playest)
compendium-folders 2.4.4 (Erceron)
connection-monitor 1.1.0 (Alan Davies)
damage-log 1.6.4 (Alan Davies)
darkraven-games-soundscapes-free 1.2.0 (Darkraven Games)
decimal-options 1.3 (Kurko#1535)
default-button-visibility-fvtt 9.249.0 (tas)
df-qol 1.7.3 (flamewave000)
df-settings-clarity 3.2.1 (flamewave000)
dice-calculator 1.5.1 (Asacolips)
dice-so-nice 4.5.0 (Simone, JDW)
dndAudioBundle-HammerHome 1.5 (thdm/DatDamnZotz [DatDamnZotz#7962])
drag-all-to-hotbar 1.0.2 (Saif Addin Ellafi)
drag-ruler 1.12.8 (Manuel Vögele)
easy-notes 1.0 (djeval)
easy-polls 1.2.1 (Matheus Clemente - mclemente#5524)
easy-ruler-scale 0.1.02 (Kandashi)
enhanced-terrain-layer 1.0.41 (IronMonk)
entice-with-dice-so-nice 0.0.16 (telmo-correa)
esheyw-transfer 1.1.0 (Emmanuel Wineberg)
find-the-culprit 1.4.0 (Moerill)
fogmanager v1.1.3 (Chris Flanagan)
force-client-controls 1.0.3 (kimitsu)
force-client-settings 2.3.0 (kimitsu)
forien-copy-environment 2.1.3 (Blair McMillan, Forien)
forien-unidentified-items 0.4.1 (Forien, Matheus Clemente)
foundry-filepicker-favorites 1.2.3 (manuel-hegner)
give-item 1.11.0 (Sepichat)
healthEstimate 27.4 (MClemente, Shylight)
hide-gm-rolls 0.11.1 (sPOiDar)
image-hover 2.0.4 (Eriku#2108)
item-piles 1.4.8 (Wasp)
item-to-chat 0.1.1 (Andrius Chamentauskas)
ivan-duch-music-packs 1.3.5 (Ivan Duch)
journal-backlinks 0.7.0 (jtracey)
lib-wrapper 1.12.4.0 (Rui Pinheiro)
lordudice 0.34 (LorduFreeman)
macroeditor 1.1.2 (ardittristan#0001)
module-credits 1.1.11 (Mouse0270)
monks-hotbar-expansion 1.0.14 (IronMonk)
monks-little-details 1.0.51 (IronMonk)
monks-tokenbar 1.0.67 (IronMonk)
monks-wall-enhancement 1.0.9 (IronMonk)
nice-more-dice 1.1.0 (LyncsCwtsh)
party-overview 2.12.6 (Matheus Clemente (mclemente#5524), Sebastian Will (vttassets@gmail.com), Chris Wachal (Zamrod#9326))
pdftofoundry 3.3.1 (fryguy)
perfect-vision 3.9.9 (dev7355608)
permission_viewer 0.9.3 (Malekal, Kakaroto)
pf2e-abs-manager 2.0.1 (Bolt)
pf2e-animal-companions 5.2 (Tikael)
pf2e-beginner-box 1.1.0 (Andrew Clayton, Shane Martland, Viviane Charlier)
pf2e-color-effects 1.5.0 (InfamousSky)
pf2e-dragruler 0.6.1 (Velara [Avery#9136])
pf2e-equipment-checker 1.0.0 (Bolt)
pf2e-exploration-activities 1.0.1 (IcyLemon)
pf2e-exploration-effects 2.0.1 (Cora)
pf2e-f-is-for-flatfooted 3.4.3 (DrentalBot <drentalbot@crumblinggiant.com>)
pf2e-modifiers-matter 1.4.2 (shem)
pf2e-ranged-combat 2.5.1 (JDCalvert)
pf2e-reach-templates 2.0.0 (digitalpacman)
pf2e-rsc 1.3.0 (drexl93)
pf2e-rules-based-npc-vision 1.0.2 (JDCalvert)
pf2e-see-simple-scale-statistics 1.0.4 (shem)
pf2e-sheet-skill-actions 1.2.0 (Jim Daily)
PF2eGMScreen 1.1.3 (>.tre_)
ping-logger 1.2.15 (hypnoCode)
pings 1.3.0 (Azzurite#2004)
polyglot 1.7.39 (Matheus Clemente)
popout 2.8 (KaKaRoTo, Posnet)
potato-or-not 0.5.0 (Wasp (Wasp#2005))
quick-insert 2.6.1 (Sunspots)
quickscale 1.4.1 (unsoluble)
remote-highlight-ui 1.1.0 (shem)
reset-movement 1.5.1 (Jesse Vo (@enso#0361))
rollmode-toggle 1.0.0 (WesBelmont)
rule-element-generator 2.3.2 (Bolt)
select-tool-everywhere 1.3.0 (KayelGee - KayelGee#5241)
settings-extender 1.2.0 (Azzurite#2004)
shopping-experience 2.0.1 (DrentalBot)
sidebar-macros 0.8.2 (Arcanist)
sidebar-resizer 0.5.0 (JeansenVaars, Vance Cole)
socketlib 1.0.10 (Manuel Vögele)
splatter 2.9.7 (theripper93)
svt 1.1.1 (Rafael “Miriadis” Masoni (Miriadis#9152))
tabletop-rpg-music 1.5.1 (Tabletop RPG Music)
talisdice 1.0.6 (Talis)
terrain-ruler 1.6.0 (Manuel Vögele)
token-action-hud 2.2.16 (Drental, ^ and stick)
token-attacher 4.4.5 (KayelGee - KayelGee#5241)
token-auras 1.16 (Kim Mantas)
token-mold 2.15.1 (Moerill, Geekswordsman)
troubles-in-otari-remade-maps 1.0.7 (Narchy)
vtta-tokenizer 3.7.1 (MrPrimate (jack@mrprimate.co.uk), Sebastian Will (vttassets@gmail.com))
walledtemplates 0.3.1 (caewok)
wcube 1.0.4 (EndlesNights)
xdy-pf2e-workbench 3.2.6 (Jonas Karlsson (xdy))
_chatcommands 1.4.0 (Cody Swendrowski, The League of Extraordinary FVTT Developers)

List generated with Forien's Copy Environment: https://github.com/League-of-Foundry-Developers/foundryvtt-forien-copy-environment

Seems to fix it, sometimes, usually. In most cases just loading into that world once, exiting, and going back into the world that errored fixes it. Sometimes it takes two or three tries.

If you proc the bug and then spin up a brand new world and activate only libwrapper and this module, the error will carry over to the new world, and seems to be resistant to the known fix.

If you need more info please ask, but for now it's easy enough to avoid, just have to be careful exiting worlds.

saif-ellafi commented 2 years ago

Thanks, but sorry I cannot reproduce this error at all. Looks like your chat is not loading in time, and sidebar resizer cannot find the chat to resize. I will handle that error so it doesn't show up.

saif-ellafi commented 2 years ago

Hopefully fixed in https://github.com/saif-ellafi/foundryvtt-sidebar-resizer/releases/tag/0.6.1 Thanks