Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined ID #285

Open
Dyrnwyrm opened this issue Jul 16, 2023 · 5 comments
Open

Undefined ID #285

Dyrnwyrm opened this issue Jul 16, 2023 · 5 comments

Comments

@Dyrnwyrm
Copy link

Describe the bug
Got this error on console.....

undefined aura does not exist on the embedded collection
To Reproduce
Steps to reproduce the behavior:

  1. Add an active aura
  2. Add the effects
    3.Check if enable
  3. Canvas an console error
    Expected behavior
    Aura just applying once, not stacking

Screenshots

Captura

Environment:

  • OS: windows 10
  • Browser Foundry Client
  • Foundry Version 11.305
  • Module Version 0.7.2
  • All Modules Disabled: No
  • Module List if no:
    MidiQol
    ActiveAuras
    ChrisPremades (and dependencies)
    Times-Up
    Simple Calendar

Additional context
The aura keeps adding itself to actors it seems like the effect is unable to delete itself, i deleted the first one but the new feature has the same issue
image
image

@MrPrimate
Copy link
Collaborator

Does it work with just DAE and Active Auras enabled? Can you share the details tab of the item this originates from.

@mrguenther
Copy link

mrguenther commented Jul 31, 2024

I've found that I can reproduce this by selecting N (>=2) tokens for the same character, all of them linked to the canonical actor data, and moving them into or out of an aura. If they all enter the aura in the same motion, the module adds N copies of the ActiveEffect to the actor. If any of them leave the aura, the module tries to delete each ActiveEffect N times, causing errors on all but the first deletion attempt.

Having two tokens for the same unique character is admittedly an odd situation, but I've also found that the popular Token Attacher module makes these issues vastly more common in all sorts of situations.

Here's an example of me moving two identical tokens, both linked to the same actor data, into and back out of an aura:

FoundryVTT | 2024-07-31 03:15:56 | [info] Created ActiveEffect with id [EBS6nxNqCcbmApEs] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:56 | [info] Created ActiveEffect with id [lWeQa99ga1dh7ne2] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:57 | [info] Deleted ActiveEffect with id [EBS6nxNqCcbmApEs] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:57 | [error] ActiveEffect "EBS6nxNqCcbmApEs" does not exist!
Error: ActiveEffect "EBS6nxNqCcbmApEs" does not exist!
    at file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6671
    at Array.map (<anonymous>)
    at ServerDatabaseBackend._deleteDocuments (file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6641)
    at ServerDatabaseBackend.delete (file:///home/mrguenther/foundryvtt/resources/app/common/abstract/backend.mjs:174:17)
    at async Semaphore._try (file:///home/mrguenther/foundryvtt/resources/app/common/utils/semaphore.mjs:101:17)
FoundryVTT | 2024-07-31 03:15:57 | [info] Deleted ActiveEffect with id [lWeQa99ga1dh7ne2] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:57 | [error] ActiveEffect "lWeQa99ga1dh7ne2" does not exist!
Error: ActiveEffect "lWeQa99ga1dh7ne2" does not exist!
    at file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6671
    at Array.map (<anonymous>)
    at ServerDatabaseBackend._deleteDocuments (file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6641)
    at ServerDatabaseBackend.delete (file:///home/mrguenther/foundryvtt/resources/app/common/abstract/backend.mjs:174:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Semaphore._try (file:///home/mrguenther/foundryvtt/resources/app/common/utils/semaphore.mjs:101:17)

@MrPrimate
Copy link
Collaborator

I've found that I can reproduce this by selecting N (>=2) tokens for the same character, all of them linked to the canonical actor data, and moving them into or out of an aura. If they all enter the aura in the same motion, the module adds N copies of the ActiveEffect to the actor. If any of them leave the aura, the module tries to delete each ActiveEffect N times, causing errors on all but the first deletion attempt.

Having two tokens for the same unique character is admittedly an odd situation, but I've also found that the popular Token Attacher module makes these issues vastly more common in all sorts of situations.

Here's an example of me moving two identical tokens, both linked to the same actor data, into and back out of an aura:

FoundryVTT | 2024-07-31 03:15:56 | [info] Created ActiveEffect with id [EBS6nxNqCcbmApEs] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:56 | [info] Created ActiveEffect with id [lWeQa99ga1dh7ne2] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:57 | [info] Deleted ActiveEffect with id [EBS6nxNqCcbmApEs] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:57 | [error] ActiveEffect "EBS6nxNqCcbmApEs" does not exist!
Error: ActiveEffect "EBS6nxNqCcbmApEs" does not exist!
    at file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6671
    at Array.map (<anonymous>)
    at ServerDatabaseBackend._deleteDocuments (file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6641)
    at ServerDatabaseBackend.delete (file:///home/mrguenther/foundryvtt/resources/app/common/abstract/backend.mjs:174:17)
    at async Semaphore._try (file:///home/mrguenther/foundryvtt/resources/app/common/utils/semaphore.mjs:101:17)
FoundryVTT | 2024-07-31 03:15:57 | [info] Deleted ActiveEffect with id [lWeQa99ga1dh7ne2] in parent Actor [FqBWU01GjvkdzPvs]
FoundryVTT | 2024-07-31 03:15:57 | [error] ActiveEffect "lWeQa99ga1dh7ne2" does not exist!
Error: ActiveEffect "lWeQa99ga1dh7ne2" does not exist!
    at file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6671
    at Array.map (<anonymous>)
    at ServerDatabaseBackend._deleteDocuments (file:///home/mrguenther/foundryvtt/resources/app/dist/database/backend/server-backend.mjs:1:6641)
    at ServerDatabaseBackend.delete (file:///home/mrguenther/foundryvtt/resources/app/common/abstract/backend.mjs:174:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Semaphore._try (file:///home/mrguenther/foundryvtt/resources/app/common/utils/semaphore.mjs:101:17)

I don't think there is a way I can easily handle this, as each token is supposed to have its own set of actor data that it can use, which isn't the case when both tokens are linked to the same actor.

@mrguenther
Copy link

mrguenther commented Aug 1, 2024 via email

@mrguenther
Copy link

mrguenther commented Aug 12, 2024

It looks like the issue often happens when dragging multiple tokens through walls, such that the effect is rapidly removed and re-applied. (It might need to be multiple walls.) I think there's a race condition.

Setting "Walls Block this Aura?" to "No" seems to fix the bug, which is consistent with my theory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants