dmarcuse / fvtt-adventure-bundler

Export and import Foundry adventures, assets included!
MIT License
3 stars 3 forks source link

Nothing happens when finish import #12

Open Rafal-Pi opened 4 months ago

Rafal-Pi commented 4 months ago

Hi, can you advice, please?

System: Warhammer 4,

I have exported my adventure (scenes, actors, journals, music), then imported but notning happens after finish the import (in the console is an error: foundry.js:753 TypeError: Cannot read properties of null (reading '_tombstone') at commons.js:6174:16 at Array.map () at EmbeddedCollectionDeltaField._cleanType (commons.js:6173:20) at EmbeddedCollectionDeltaField.clean (commons.js:5074:19) at ActorDeltaField._cleanType (commons.js:5393:28) at ActorDeltaField.clean (commons.js:5074:19) at SchemaField._cleanType (commons.js:5393:28) at SchemaField.clean (commons.js:5074:19) at commons.js:6098:41 at Array.map () at EmbeddedCollectionField._cleanType (commons.js:6098:20) at EmbeddedCollectionField.clean (commons.js:5074:19) at EmbeddedDataField._cleanType (commons.js:5393:28) at EmbeddedDataField.clean (commons.js:5074:19) at commons.js:5863:42 at Array.map () at SetField._cleanType (commons.js:5863:20) at SetField.clean (commons.js:5074:19) at SchemaField._cleanType (commons.js:5393:28) at SchemaField.clean (commons.js:5074:19) at Adventure.cleanData (commons.js:7043:26) at Adventure._initializeSource (commons.js:7030:31) at new DataModel (commons.js:6906:21) at new Document (commons.js:7583:3) at new BaseAdventure (commons.js:9478:3) at new ClientDocumentMixin (foundry.js:13979:7) at new Adventure (foundry.js:19246:1) at #preCreateDocumentArray (foundry.js:13535:15) at ClientDatabaseBackend._createDocuments (foundry.js:13428:73) at ClientDatabaseBackend.create (commons.js:8629:19) at async Adventure.createDocuments (commons.js:7958:23) at async Adventure.create (commons.js:8081:23) at async _h (v1.ts:127:6) at async index.ts:23:25 at async HTMLInputElement. (main.ts:76:21) onError @ foundry.js:753 🎁call_wrapped @ libWrapper-wrapper.js:507 🎁Hooks.onError#lib-wrapper @ listeners.js:138 🎁Hooks.onError#0 @ libWrapper-wrapper.js:187

preCreateDocumentArray @ foundry.js:13537

_createDocuments @ foundry.js:13428 create @ commons.js:8629 await in create (async)
createDocuments @ commons.js:7958 create @ commons.js:8081 _h @ v1.ts:129 await in _h (async)
(anonymous) @ index.ts:21

AND

foundry.js:68326 Cannot read properties of null (reading '_tombstone') fetch @ foundry.js:68326 notify @ foundry.js:68223 error @ foundry.js:68260 onError @ foundry.js:754 🎁call_wrapped @ libWrapper-wrapper.js:507 🎁Hooks.onError#lib-wrapper @ listeners.js:138 🎁Hooks.onError#0 @ libWrapper-wrapper.js:187

preCreateDocumentArray @ foundry.js:13537

_createDocuments @ foundry.js:13428 create @ commons.js:8629 await in create (async)
createDocuments @ commons.js:7958 create @ commons.js:8081 _h @ v1.ts:129 await in _h (async)
(anonymous) @ index.ts:21 )

Could you advise, please?

Rafal-Pi commented 4 months ago

Tysiąc Tronów.zip

Chazori commented 3 months ago

Almost the same error as above but for PF2E. Unsure of cause.

foundry.js:753 TypeError: Cannot read properties of null (reading '_tombstone') at commons.js:6174:16 at Array.map () at EmbeddedCollectionDeltaField._cleanType (commons.js:6173:20) at EmbeddedCollectionDeltaField.clean (commons.js:5074:19) at ActorDeltaField._cleanType (commons.js:5393:28) at ActorDeltaField.clean (commons.js:5074:19) at SchemaField._cleanType (commons.js:5393:28) at SchemaField.clean (commons.js:5074:19) at commons.js:6098:41 at Array.map () onError @ foundry.js:753

preCreateDocumentArray @ foundry.js:13537

_createDocuments @ foundry.js:13428 create @ commons.js:8629Understand this error foundry.js:68326 Cannot read properties of null (reading '_tombstone')

dmarcuse commented 3 months ago

Sorry for the late response - I haven't had the chance to dig into this issue myself, but the last time I saw this error message, it was related to bad data in the actors. If this is the same issue, then it's not really something I can cleanly fix unfortunately. If you can, I would recommend trying to repeatedly re-create the adventure with subsets of the assets and seeing which ones work, in an attempt to narrow down exactly which documents are causing issues.

Chazori commented 3 months ago

I'm going to try and isolate the bad actor and see if I can pin-point the cause, then. Thank you!

Chazori commented 3 months ago

I managed to find the baddie and squashed it. Thanks for the advice!

orangebutblue commented 2 months ago

Sorry for the late response - I haven't had the chance to dig into this issue myself, but the last time I saw this error message, it was related to bad data in the actors. If this is the same issue, then it's not really something I can cleanly fix unfortunately. If you can, I would recommend trying to repeatedly re-create the adventure with subsets of the assets and seeing which ones work, in an attempt to narrow down exactly which documents are causing issues.

Would it be possible to make this module more error-tolerant? For example, if a file can't be loaded during import or found during export, then ... just skip it. Instead of halting the entire process.

I just bundled like 50 maps into a compendium and exported it....but now I can't import it anymore because it goes up to 100% and then gives that "_tombstone" error.

Rafal-Pi commented 2 months ago

I have no luck finding the bad 'actor'... it seems to not be only related to an 'actor'... can the error message be more in detail, please? i.e. giving info - which item causes the issue? or an option to 'ignore' and continue?

orangebutblue commented 2 months ago

I have no luck finding the bad 'actor'... it seems to not be only related to an 'actor'... can the error message be more in detail, please? i.e. giving info - which item causes the issue? or an option to 'ignore' and continue?

It's not a "bad actor" issue for me either. I just packed a bunch of scenes (no actors at all) into a pack and can't restore them anymore

dmarcuse commented 2 months ago

Sorry for the late response - I haven't had the chance to dig into this issue myself, but the last time I saw this error message, it was related to bad data in the actors. If this is the same issue, then it's not really something I can cleanly fix unfortunately. If you can, I would recommend trying to repeatedly re-create the adventure with subsets of the assets and seeing which ones work, in an attempt to narrow down exactly which documents are causing issues.

Would it be possible to make this module more error-tolerant? For example, if a file can't be loaded during import or found during export, then ... just skip it. Instead of halting the entire process.

I just bundled like 50 maps into a compendium and exported it....but now I can't import it anymore because it goes up to 100% and then gives that "_tombstone" error.

The problem is that this error originates in core Foundry code. I'll have to look into it more when I have the time, but as far as I could determine last time I ran into this issue, the data was valid, but Foundry itself was rejecting it. Adventure bundler wasn't touching the parts of the data that caused the error.

Rafal-Pi commented 2 months ago

I will try it on Foundry v12 - maybe will be better.

Is it v12 compatible?

dmarcuse commented 2 months ago

I'm not aware of any changes that would break it, but I haven't tested it myself.