dev7355608 / perfect-vision

Foundry VTT Module: Lighting Drawings and Vision Limitation.
https://foundryvtt.com/packages/perfect-vision
MIT License
53 stars 10 forks source link

Reinstall Perfect Vision if everything is broken/black after you updated to Foundry to 9.280 #282

Closed TheMathKing closed 2 years ago

TheMathKing commented 2 years ago

Expected Behavior

Scenes should load.

Current Behavior

You cannot load any of the scenes; it gives the following error:

foundry.js:297 Foundry VTT | Error thrown in hooked function '' for hook 'canvasInit' _call @ foundry.js:297 callAll @ foundry.js:253 draw @ foundry.js:20094 🎁call_wrapped @ libWrapper-wrapper.js:511 🎁Canvas.prototype.draw#perfect-vision @ canvas.js:415 🎁call_wrapper @ libWrapper-wrapper.js:620 🎁Canvas.prototype.draw#0 @ libWrapper-wrapper.js:189 view @ foundry.js:17859 _onClickScene @ foundry.js:53146 dispatch @ jquery.min.js:2 v.handle @ jquery.min.js:2 foundry.js:319 TypeError: Cannot read properties of undefined (reading 'UI') [Detected 3 packages: levels, perfect-vision, lib-wrapper] at ui.js:647 at Function._call (foundry.js:294) at Function.callAll (foundry.js:253) at Canvas.draw (foundry.js:20094) at Wrapper.🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:511) at Canvas.🎁Canvas.prototype.draw#perfect-vision (canvas.js:415) at Wrapper.🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:620) at Canvas.🎁Canvas.prototype.draw#0 (libWrapper-wrapper.js:189) at Scene.view (foundry.js:17859) at SceneNavigation._onClickScene (foundry.js:53146) at HTMLLIElement.dispatch (jquery.min.js:2) at HTMLLIElement.v.handle (jquery.min.js:2) onError @ foundry.js:319 🎁call_wrapped @ libWrapper-wrapper.js:511 🎁Hooks.onError#lib-wrapper @ listeners.js:137 🎁Hooks.onError#0 @ libWrapper-wrapper.js:187 _call @ foundry.js:298 callAll @ foundry.js:253 draw @ foundry.js:20094 🎁call_wrapped @ libWrapper-wrapper.js:511 🎁Canvas.prototype.draw#perfect-vision @ canvas.js:415 🎁call_wrapper @ libWrapper-wrapper.js:620 🎁Canvas.prototype.draw#0 @ libWrapper-wrapper.js:189 view @ foundry.js:17859 _onClickScene @ foundry.js:53146 dispatch @ jquery.min.js:2 v.handle @ jquery.min.js:2 foundry.js:247 DEBUG | Calling error hook with args: foundry.js:248 (3) ['Hooks._call', TypeError: Cannot read properties of undefined (reading 'UI') [Detected 3 packages: levels, perfect…, {…}]0: "Hooks._call"1: TypeError: Cannot read properties of undefined (reading 'UI') [Detected 3 packages: levels, perfect-vision, lib-wrapper] at http://localhost:30000/modules/levels/scripts/ui.js:647:15 at Function._call (http://localhost:30000/scripts/foundry.js:294:14) at Function.callAll (http://localhost:30000/scripts/foundry.js:253:12) at Canvas.draw (http://localhost:30000/scripts/foundry.js:20094:13) at Wrapper.🎁call_wrapped [as call_wrapped] (http://localhost:30000/modules/lib-wrapper/lib-wrapper.js:1:36159) at Canvas.🎁Canvas.prototype.draw#perfect-vision (http://localhost:30000/modules/perfect-vision/scripts/core/canvas.js:415:15) at Wrapper.🎁call_wrapper [as call_wrapper] (http://localhost:30000/modules/lib-wrapper/lib-wrapper.js:1:37375) at Canvas.🎁Canvas.prototype.draw#0 (http://localhost:30000/modules/lib-wrapper/lib-wrapper.js:1:32612) at Scene.view (http://localhost:30000/scripts/foundry.js:17859:20) at SceneNavigation._onClickScene (http://localhost:30000/scripts/foundry.js:53146:30) at HTMLLIElement.dispatch (http://localhost:30000/scripts/jquery.min.js:2:43064) at HTMLLIElement.v.handle (http://localhost:30000/scripts/jquery.min.js:2:41048)2: {hook: 'canvasInit', fn: ƒ}length: 3[[Prototype]]: Array(0) index.js:127 Uncaught (in promise) TypeError: this._onError is not a function [Detected 1 package: perfect-vision] at index.js:127 at async Promise.all (index 1) at async Canvas.draw (foundry.js:20107) at async Canvas.🎁Canvas.prototype.draw#perfect-vision (canvas.js:415) at async Scene.view (foundry.js:17859)

Steps to Reproduce

  1. Install latest version of Perfect Vision
  2. Install the latest V9 version of Foundry

Context

Removing Perfect Vision resolves the issue.

Version

v3.914

Foundry VTT Version

v9.280

Operating System

Windows 11

Browser / App

Native App (Electron)

Game System

simple world building

Relevant Modules

none

dev7355608 commented 2 years ago

The latest v9 version (3.9.15) of PV fixes this issue. Doesn't it want to automatically update? If it doesn't, uninstall and reinstall PV to get the latest version.

TheMathKing commented 2 years ago

It claims to be "blocked" as the next version is for V10.

dev7355608 commented 2 years ago

I tested it myself and you're right. That is strange. Maybe there's something wrong with how Foundry looks for available updates. I'll have to figure that out.

If you uninstall and then reinstall PV, you receive the latest v9 version of PV though, which fixes this issue.