ddb-importer icon indicating copy to clipboard operation
ddb-importer copied to clipboard

Character import fails when there's an avatar set on DnDBeyond.

Open FanaticPythoner opened this issue 2 years ago • 12 comments

The import fails when importing a character if an avatar is set on DnDBeyond. Tried a bunch of different combination of options, still the same result. See before / after pictures. 2nd last image represents where the error occurs. Last image is the list of modules. Console log text: "DDB Importer | ERR > TypeError: Cannot read properties of undefined (reading 'src')". Foundry VTT version 10, build 284, DnD5e - Fifth Edition System version: 2.02.

image image image image

FanaticPythoner avatar Sep 07 '22 17:09 FanaticPythoner

That actor imports fine here - I would suggest disabling other modules and trying again.

Also, did this actor get migrated from v9 or created a fresh in v10 (the code you like to by the way is core system stuff, not DDB Importer)

MrPrimate avatar Sep 07 '22 17:09 MrPrimate

The actor was freshly created in V10.

FanaticPythoner avatar Sep 07 '22 18:09 FanaticPythoner

I'll try disabling even more modules one by one and keep you up to date.

FanaticPythoner avatar Sep 07 '22 18:09 FanaticPythoner

No. I deactivated all modules except D&D Beyond importer and it has the same issue. image

FanaticPythoner avatar Sep 07 '22 18:09 FanaticPythoner

Here's the character's link, if it helps: https://www.dndbeyond.com/characters/82677640

FanaticPythoner avatar Sep 07 '22 18:09 FanaticPythoner

And I know it's the avatar, because I just created a character without avatar and imported it without any issue. However, the moment I set the avatar, the import fails.

FanaticPythoner avatar Sep 07 '22 18:09 FanaticPythoner

It imports fine here. It looks like it must import correctly at least once, looking at the screen shot there. is this for an update, or on initial import?

And this definitely happens if:

  • you disable other modules and create a new actor.
  • import to that newly created actor

MrPrimate avatar Sep 07 '22 21:09 MrPrimate

I believe this user may be experiencing the same issue as I am. The import fails at the "downloading avatar" from DDB - https://github.com/MrPrimate/ddb-importer/issues/263#issue-1362203048.

edyragon avatar Sep 13 '22 23:09 edyragon

  • Are you using Foundry Client/Chrome/Firefox etc?
  • In Settings -> DDB Importer -> Directory Locations is "Convert images to webp?" ticked?

Can you screen shot the settings on the Character Import screen for the "Import Character", "Active Effects" and "Advanced" please.

MrPrimate avatar Sep 14 '22 07:09 MrPrimate

I believe this maybe the same issue as #268

Please try:

Other users have reported success after running game.dnd5e.migrations.migrateWorld() in their world. It looks like this is the product of a bad migration after upgrading.

Run this by opening the web console (F12) and entering the command.

MrPrimate avatar Sep 17 '22 09:09 MrPrimate

Please can you try updating to the latest version of Foundry v10, I believe this was a core bug that is now resolved.

MrPrimate avatar Oct 07 '22 19:10 MrPrimate

I will check it out later today and keep you in touch.

FanaticPythoner avatar Oct 10 '22 15:10 FanaticPythoner