grandseiken / foundryvtt-multilevel-tokens

Multilevel tokens for Foundry VTT
MIT License
41 stars 20 forks source link

The key 1jFnpheX91oUpBxx does not exist in the EmbeddedCollection Collection #108

Open theksi opened 3 years ago

theksi commented 3 years ago

Hello I am reporting a recurring errors that has popped up each time I am loading a map on foundryVTTimage

I disabled all modules then re-enabled modules per modules until I found the module that was generating this errror and Multilevel-token is behind it !! I'm not sure it is a bug though I'd like to fix it and would welcome any help

The error message I captured on the console is : foundry.js:1246 Uncaught (in promise) Error: The key 1jFnpheX91oUpBxx does not exist in the EmbeddedCollection Collection [No packages detected]     at Map.get (/home/ksi/foundryvtt02/resources/app/common/utils/collection.mjs:106)     at ServerDatabaseBackend._deleteEmbeddedDocuments (/home/ksi/foundryvtt02/resources/app/dist/database/backend/server-backend.mjs:1)     at runMicrotasks ()     at runNextTicks (internal/process/task_queues.js:60)     at processImmediate (internal/timers.js:437)     at async Socket.handleEvent (/home/ksi/foundryvtt02/resources/app/dist/server/sockets.mjs:1)

tjlanza commented 2 years ago

Foundry 0.8.9 on Ubuntu Linux (up 24/7/365), SR5 0.7.19, MLT 1.5.2

I am getting the same error message. Initially, I chocked it up to MLT and Token Attacher not playing well together.

In that instance, I know what I did just before it started occurring. I was able to resolve the issue by removing the cloning feature from all zones on the scenes I was working with at the time. That cleared up the error, and I didn't see it for a few days.

Today, before lunch I was working on relighting a scene that does not feature any MLT zones and doesn't have any actors using TA. The last scenes where I experienced the issue aren't even in the navigation bar. When I came back to it after lunch, the error started appearing again. Disabling MLT makes it go away, so it's clearly MLT doing something wrong.

This error needs to be trapped within MLT and handled gracefully. At the very minimum, it should be providing a better error message than the Foundry default, including what the key it's seeking was meant to be and reporting the scene it was expected to be found on. With that information, it would then at least be possible for a user to find the problematic scene, blow away the MLT configuration, and start over.

Alternatively or as an interim solution, MLT should include a macro one can feed the key into and have it go hunting for the bogus reference wherever it would store such a thing and clean it up.

MrPotatoZed commented 2 years ago

Just want to chime in as I was seeing the same errors and the same behavior. I was getting several the key x does not exist errors any time I loaded any page with the same errors noted above. Find the culprit pointed at MLT and disabling MLT stopped the error messages. After seeing several reports of similar behavior on the foundry discord I was able to track down copies of tokens in cloning target zones that had been left behind after the original tokens in the source zones were deleted. Deleting all these phantom tokens fixed the error messages. A fix for the cloning issue would be great but at least something pointing us at the scene causing the error would save a lot of time tracking down the source of the problem. V8.9, 5e 1.4.3, MLT 1.5.2. Hosted on the forge.

tjlanza commented 2 years ago

Yeah... I eventually worked around it by moving all my scenes into compendiums. It's not a resolution or a fix, because the bad scenes are still in there. They're just not parsed every time I switch between any other scene.

jflevesque commented 2 years ago

@MrPotatoZed Do you have a procedure to find the phantom tokens to fix the issue?