MrVauxs / pf2e-graphics

@vauxs
https://mrvauxs.net
GNU General Public License v3.0
16 stars 14 forks source link

[BUG] Error on NPCs with no owners #258

Open ottyn opened 1 month ago

ottyn commented 1 month ago

Describe the bug Foundry: v12.331 Sequencer: 3.3.0 PF2e Graphics: 0.9.3 PF2e: 6.3.0 and 6.3.1

Seeing the following error in console when advancing turns during a combat. Only seems to post to console on monster turns turns. No effects active on the token.

AnimCore.ts:175 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getFlag') [Detected 2 packages: pf2e-graphics(0.9.3), system:pf2e(6.4.1)] at _a.getMatchingAnimationTrees (AnimCore.ts:175:25) at _a.filterAnimations (AnimCore.ts:288:30) at _a.findAndAnimate (AnimCore.ts:332:32) at handler (turn.ts:21:31) at Object.fn (turn.ts:25:82) at #call (foundry.js:632:20) at Hooks.callAll (foundry.js:589:17) at EncounterPF2e._onDelete (pf2e.mjs:1580:10285) at foundry-esm.js:56696:15 at foundry-esm.js:56703:43 at Array.map () at #handleDeleteDocuments (foundry-esm.js:56703:33) at async EncounterPF2e.deleteDocuments (foundry-esm.js:11525:23) at async EncounterPF2e.delete (foundry-esm.js:11599:23) getMatchingAnimationTrees @ AnimCore.ts:175 filterAnimations @ AnimCore.ts:288 findAndAnimate @ AnimCore.ts:332 handler @ turn.ts:21 (anonymous) @ turn.ts:25

call @ foundry.js:632

callAll @ foundry.js:589 _onDelete @ pf2e.mjs:1580 (anonymous) @ foundry-esm.js:56696 (anonymous) @ foundry-esm.js:56703

handleDeleteDocuments @ foundry-esm.js:56703

await in #handleDeleteDocuments _deleteDocuments @ foundry-esm.js:56619 await in _deleteDocuments delete @ foundry-esm.js:12378 await in delete deleteDocuments @ foundry-esm.js:11525 delete @ foundry-esm.js:11599 yes @ foundry.js:18141 callback @ foundry.js:68923 callback @ foundry.js:68976 submit @ foundry.js:68861 _onClickButton @ foundry.js:68789 dispatch @ jquery.min.js:2 (anonymous) @ jquery.min.js:2

MrVauxs commented 1 month ago

Your monster has no owner. Update its ownership so at least one user has some permission to it.

Fixed in the next update.

ottyn commented 4 weeks ago

Should have had my GM account as owner. It was a Ghoul and Canker Cultist pulled from the AV Bestiary compendium and dragged on to scene to do some testing. Not sure why the owner didn't get set.

MrVauxs commented 4 weeks ago

Weird foundry shenanigans when it comes to importing from adventures and compendiums.