reyzor1991 / foundry-vtt-pf2e-reaction

Module for the foundry vtt pf2e system
Apache License 2.0
5 stars 4 forks source link

Player Lacks Permission to Update Combant #9

Closed cilise closed 1 year ago

cilise commented 1 year ago

Version 0.1.27

Behavior exists when active with other modules or alone.

When I click on a non-player owned token and add it to combat, I get an error the following console errors:

foundry.js:59187 User Player2 lacks permission to update Combatant [0kAhr0MEuygTX8QG] in parent Combat [q39XhlKTsroFsL3R] fetch @ foundry.js:59187 notify @ foundry.js:59114 error @ foundry.js:59150 _handleError @ foundry.js:2915 (anonymous) @ foundry.js:2897 value @ socket.js:309 value @ socket.js:239 x.emit @ index.mjs:136 value @ manager.js:200 x.emit @ index.mjs:136 value @ index.js:119 value @ manager.js:192 x.emit @ index.mjs:136 value @ socket.js:323 x.emit @ index.mjs:136 value @ transport.js:104 value @ transport.js:97 ws.onmessage @ websocket.js:79

Uncaught (in promise) Error: User Player2 lacks permission to update Combatant [0kAhr0MEuygTX8QG] in parent Combat [q39XhlKTsroFsL3R] at ServerDatabaseBackend._updateEmbeddedDocuments (/C:/Program%20Files/Foundry%20Virtual%20Tabletop/resources/app/dist/database/backend/server-backend.mjs:1:4556) at async Semaphore._try (/C:/Program%20Files/Foundry%20Virtual%20Tabletop/resources/app/common/utils/semaphore.mjs:101:17) _handleError @ foundry.js:2913 (anonymous) @ foundry.js:2897 value @ socket.js:309 value @ socket.js:239 x.emit @ index.mjs:136 value @ manager.js:200 x.emit @ index.mjs:136 value @ index.js:119 value @ manager.js:192 x.emit @ index.mjs:136 value @ socket.js:323 x.emit @ index.mjs:136 value @ transport.js:104 value @ transport.js:97 ws.onmessage @ websocket.js:79 await in ws.onmessage (async) updateCombatantReactionState @ pf2e-reaction.js:1 (anonymous) @ pf2e-reaction.js:1

call @ foundry.js:724

callAll @ foundry.js:681 callback @ foundry.js:12613 (anonymous) @ foundry.js:12594 _handleCreateEmbeddedDocuments @ foundry.js:12594 (anonymous) @ foundry.js:12406 x.emit @ index.mjs:136 value @ socket.js:278 value @ socket.js:265 value @ socket.js:235 x.emit @ index.mjs:136 value @ manager.js:200 x.emit @ index.mjs:136 value @ index.js:119 value @ manager.js:192 x.emit @ index.mjs:136 value @ socket.js:323 x.emit @ index.mjs:136 value @ transport.js:104 value @ transport.js:97 ws.onmessage @ websocket.js:79

reyzor1991 commented 1 year ago

FIxed 0.1.28