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

Levels throws errors during Perfect Vision's V10 migration #278

Closed nesretep closed 2 years ago

nesretep commented 2 years ago

Expected Behavior

No errors in the console from Perfect Vision.

Current Behavior

foundry.js:711 TypeError: Cannot read properties of null (reading 'controlled') [Detected 2 packages: levels, perfect-vision] at Object.fn (main.js:2:20) at #call (foundry.js:688:20) at Hooks.callAll (foundry.js:645:17) at ClientDatabaseBackend.callback (foundry.js:12688:13) at foundry.js:12656:43 at Array.map () at ClientDatabaseBackend._handleUpdateEmbeddedDocuments (foundry.js:12656:33) at ClientDatabaseBackend._updateEmbeddedDocuments (foundry.js:12518:17) at async TokenDocument5e.updateDocuments (commons.js:5652:23) at async migratePreV10Scenes (migration.js:133:9) at async migratePreV10 (migration.js:68:9) at async migrate (migration.js:43:13)

Steps to Reproduce

  1. Enable Perfect Vision
  2. Refresh the FoundryVTT page

Context

This error repeats a bunch of times as the page loads and during the migration process.

Version

v4.0.4

Foundry VTT Version

v10.284

Operating System

Windows

Browser / App

Chrome

Game System

dnd5e

Relevant Modules

levels(v3.0.9.5), betterroofs(v1.6.8)

dev7355608 commented 2 years ago

This needs to be fixed in Levels (CC @theripper93). The migration should have succeeded regardless of the errors (unless it told you otherwise, of course).

I'm leaving this issue open until the bug is fixed in Levels.

theripper93 commented 2 years ago

fixed