Open KristjanLaane opened 3 months ago
The LibWrapper error could indicate a module incompatibility. Please try disabling all other modules and see if the issue persists. If it does not, you could try the 'Find The Culprit' module to figure out which module is causing the incompatibility.
thanks for the suggestion, i tried a world with no modules activated other than LockView, and get the same error.
this error occurs on world startup:
and as soon as a player logs in this error follows:
and no LockView functionality works even though the LockView UI is all there:
i tried the same with libwrapper enabled, i dont know if that is a required dependency of LockView: but regardless, the errors and the lack of functionality are exactly the same
LibWrapper isn't used by Lock View.
Could you try the following: Go into the user config in the module settings, tick one of the boxes, save the settings, untick that box, and refresh.
i dont know what witchcraft this is, but it worked!
it makes the TypeError go away, but the initial hook error is still there, but Edit Viewbox for instance works still
The problem is that it's looking for a setting that does not exist yet. When you tick one of the boxes this setting is generated.
Note to self:
let overrideSetting = game.settings.get(moduleName ,'userSettingsOverrides')[game.user.role]?.control;
I'm not sure about the hook error, nothing in the error message points (directly) to Lock View (they're all pointing to foundry.js, so the core Foundry code). It is possible that Lock View is responsible, but it's hard to find out where it goes wrong. What do you get when you expand the warning message (the yellow one above it)? If you scroll al the way up, are the no other errors? When Lock View is disabled, does the error go away?
Actually, I might know where it might be going wrong, and I remember getting the same error but ignoring it because it didn't seem to do any harm.
Note to self:
Here is the expanded warning before hook error : Yes it seems the scene gets initialized after the error: When i disable LockView i get no error at all
also, thank you for an awesome addon, amazingly useful functionality!
Describe the bug I can enable LockView and change module settings, but none of the functionality actually works. And i see lots of Errors being thrown:
viewbox.js:150 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'control') at drawViewbox (viewbox.js:150:95) at a. (socket.js:18:46)
at U.emit (index.mjs:136:20)
at a.value (socket.js:538:20)
at a.value (socket.js:525:18)
at a.value (socket.js:495:22)
at U.emit (index.mjs:136:20)
at manager.js:204:18
Console Log
I dont know if this error is related also:
foundry.js:631 Error: Error thrown in hooked function '' for hook 'getSceneControlButtons'. Cannot read properties of null (reading 'getFlag') at Hooks.onError (foundry.js:630:24) at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:507:22) at 🎁Hooks.onError#lib-wrapper (listeners.js:138:11) at 🎁Hooks.onError#0 (libWrapper-wrapper.js:187:52) at #call (foundry.js:612:36) at Hooks.callAll (foundry.js:565:17) at SceneControls._getControlButtons (foundry.js:82176:11) at (foundry.js:81190:19)
at new SceneControls (foundry.js:81172:1)
at Game.initializeUI (foundry.js:9153:15)
at Game.setupGame (foundry.js:9005:10)
at async Game._initializeGameView (foundry.js:10354:5)