bushvin / actor-export

A Foundry VTT module to export actors
GNU General Public License v3.0
5 stars 1 forks source link

[Bug]: Webp file format breaks exporting #2

Closed Gingyivitis closed 10 months ago

Gingyivitis commented 10 months ago

Contact Details

OfficiallyGingerBread@gmail.com

Foundry VTT version

11.315

Game system

pf2e

Game system version

5.12.5

What browsers are you seeing the problem on?

Firefox

What Provider is affected?

PF2e Remaster Character sheet

What happened?

When exporting a character sheet that uses a webp file for the image, the export seems to fail. This could also be a Forgevtt issue. But everything else seems to work fine when using Jpeg or Png file types

Relevant log output

Foundry VTT | Rendering actorExportDialog foundry.js:5802:15
Please wait, this may take a while... foundry.js:68326:78
actor-export | provider: pf2e-remaster main.js:40:25
actor-export | actor: 
Object { parties: Set [], initialized: true, rules: (2) […], initiative: {…}, armorClass: {…}, conditions: {}, auras: Map(0), synthetics: {…}, name: "Grothlut", type: "npc", … }
main.js:40:25
actor-export | PDF | 1105 fields found. PDFProvider.js:335:17
Uncaught (in promise) DOMException: OffscreenCanvas.convertToBlob: Cannot get blob from write-only canvas.
    embedImage https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/lib/providers/PDFProvider.js:209
    parseFile https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/lib/providers/PDFProvider.js:370
    download https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/lib/providers/PDFProvider.js:304
    promise callback*download https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/lib/providers/PDFProvider.js:303
    downloadFiles https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/main.js:355
    promise callback*downloadFiles https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/main.js:324
    activateListeners https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/main.js:267
    activateListeners https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/main.js:265
    _render https://gingy-abomination-vaults.forge-vtt.com/scripts/foundry.js:5842
    _render https://gingy-abomination-vaults.forge-vtt.com/scripts/foundry.js:6532
    render https://gingy-abomination-vaults.forge-vtt.com/scripts/foundry.js:5769
    onclick https://assets.forge-vtt.com/bazaar/modules/actor-export/0.1.0/scripts/main.js:488
    _renderOuter https://gingy-abomination-vaults.forge-vtt.com/scripts/foundry.js:5941
    jQuery 2
        dispatch
        handle

Sample Actor

No response

Attachments

No response

bushvin commented 10 months ago

Would it be possible to get a link to that webp file? I have no problem whatsoever exporting webp images

Gingyivitis commented 10 months ago

Yeah, no problem. I suspect it is a forge issue, as it happens with the official token pack for PF2e, as well as any webp I make myself https://assets.forge-vtt.com/60388fa3db6a7693809476bf/Booker.webp

bushvin commented 10 months ago

Thanks for that! It seems my code was somewhat buggy... I fixed it in commit 3bba073a3c60661ed97a971bd8d1cf279ba9fe23 and a new version (0.3.3) is released with the fix

Happy gaming!