KayelGee / token-attacher

MIT License
11 stars 18 forks source link

Can't remove "the thing" that's attached to my token #66

Closed dmrickey closed 1 year ago

dmrickey commented 2 years ago

Apparently there's something attached to my token--I don't see anything. Trying to break all attachments in the attacher menu doesn't do anything. I was able to fix it by deleting the token and putting a new one in the scene, but hopefully I took enough screen captures that it's useful for preventing it from breaking again (at least when it's attempting to read, I don't know how the bad data go there to begin with).

image image image image

token-attacher.js:575 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'data')
[Detected 2 packages: token-attacher, drag-ruler]
    at token-attacher.js:575
    at Array.map (<anonymous>)
    at Function._UpdateAttachedOfBase (token-attacher.js:575)
    at Function.UpdateAttachedOfToken (token-attacher.js:555)
    at token-attacher.js:215
    at Function._call (foundry.js:294)
    at Function.callAll (foundry.js:253)
    at ClientDatabaseBackend.callback (foundry.js:10254)
    at foundry.js:10224
    at Array.map (<anonymous>)
    at ClientDatabaseBackend._handleUpdateEmbeddedDocuments (foundry.js:10224)
    at ClientDatabaseBackend._updateEmbeddedDocuments (foundry.js:10106)
    at async Function.updateDocuments (document.mjs:373)
    at async DragRulerRuler.animateEntities (foundry_imports.js:90)
    at async DragRulerRuler.moveEntities (foundry_imports.js:41)
KayelGee commented 2 years ago

Looks like the template got somehow deleted. There's been a bug in an older version of token attacher that didn't properly detach elements that were deleted. Maybe that is what caused it.

dmrickey commented 2 years ago

Hm, I doubt it -- unless the data was attached to the actor instead of the token. I deleted the token at some point to try and fix it and it still happened again. But I don't remember if it happened immediately or sometime after the fact

KayelGee commented 1 year ago

I fixed a lot of things in the past weeks. I noticed that some of the stuff was broken before v10. I think the issue you had here was also caused by one of those. I didn't test for this, but looking at your screenshots I'm pretty sure I had exactly this problem reproduced on my end. I'll close this issue, but if it crops up again feel free to post another issue.