XD 39 svg export fails with io.failed on Windows

When I try to export pretty simple shape to svg using Plugin API I’m getting io.failed. Did something change in parameters how to call createRenditions? I attached file which I was using for test but really plain rectangle export fails with the same error.
export-2-svg-bug.xd (96.2 KB)

UPD: The problem might be caused by Windows version. I can reproduce it on 20H2 19042.928 but not on old builds.

@DavidXD , do you need additional details for that?

Where are you saving the exports to?

I am not aware of any recent changes to the application.createRenditions() API. I was not able to reproduce a problem with renditions using XD 39 on the same version of Windows (20H2 19042.928). I used your example XD file and some of my own and tested with this sample plugin:

If you are still seeing this problem, can you please provide developer console output, XD log, and/or your plugin code snippet?

Yes, I still see the error. Thanks for the snippet. I managed to reproduce the issue using code you shared. So I changed couple things to be more closer to the code I’m using:

let workFolder = void 0;
  try {
    workFolder = await dataFolder.getEntry("work");
  } catch (ex) {
    workFolder = await dataFolder.createFolder("work");
  }
  const counter = Math.round((Math.random() * 100));
  const folder = await workFolder.createFolder(("0000" + counter).slice(-5));
  console.log("Export into", folder.nativePath);

and export

const renditionOptions = [
    {
      node: selection.items[0],
      outputFile: file,
      type: application.RenditionType.SVG,
      embedImages: true,
      minify: true
    }
  ];

In console I see:

io.failed
exportRendition @ C:\Users\avgre\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\TempState\UDTPlugins\how-to-export-a-rendition_HOW_TO_EXPORT_A_RENDITION\main.js:51
async function (async)
exportRendition @ C:\Users\avgre\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\TempState\UDTPlugins\how-to-export-a-rendition_HOW_TO_EXPORT_A_RENDITION\main.js:12
_dispatchCommandIdEvent @ uxp://uxp-internal/pluginmanager_scripts.js:1
invokeCommand @ uxp://uxp-internal/pluginmanager_scripts.js:1
invokeCommand @ uxp://uxp-internal/pluginmanager_scripts.js:1
(anonymous) @ plugins/PluginLoader.js:1
execScenegraphEdit @ plugins/ScenegraphGuard.js:1
_invokePluginCommand @ plugins/PluginLoader.js:1
BaseCommand.execute @ lib/BaseCommand.js:1
D @ uxpDocumentUI/js/9.js:18
_uiEntry.panelId._uiEntry.commandId.n.onclick @ uxpDocumentUI/js/9.js:18
p @ uxp://uxp-internal/domjs_scripts.js:2
(anonymous) @ uxp://uxp-internal/domjs_scripts.js:2
I @ uxp://uxp-internal/domjs_scripts.js:2
(anonymous) @ uxp://uxp-internal/domjs_scripts.js:2
O @ uxp://uxp-internal/domjs_scripts.js:2
k @ uxp://uxp-internal/domjs_scripts.js:2
e @ uxp://uxp-internal/domjs_scripts.js:2
onEvent @ uxp://uxp-internal/domjs_scripts.js:2

Using the code David shared the folder is:

C:\Users\avgre\AppData\Roaming\Adobe\UXP\PluginsStorage\SPRK\Developer\HOW_TO_EXPORT_A_RENDITION\PluginData\work\00094

I see that it’s created but export still fails.

@DavidXD, need to mention that pdf export doesn’t work as well :frowning:

Thank you for the source code! Using it I was able to reproduce the problem and logged a bug with our team. The root cause is that in XD 39 the plugin data folder moved from under the XD installation package to “Adobe\UXP\PluginsStorage”. For an unknown reason SVG and PDF renditions are not allowed to be written to this folder, but strangely PNGs and JPGs are. This problem can also be seen using the XD GUI without plugins by attempting to export assets. I am sorry for this, and will post here when there are any updates. For now one possible workaround is to attempt to write the rendition to a different location, such as the plugin’s temporary folder.

1 Like

sorry, do you have any updates or estimates when it will be fixed?

There have not been any updates on this bug.

Hi @DavidXD, thank you for the update that there’s no update. Could you please let us know when there will be an actual update? There’s a community waiting and cannot work properly. Thank you so much!

1 Like

@kerrishotts might be able to provide an update.

It has been over two weeks, and there’s no even a reply.
I’m moving my team from Adobe XD. Luckily there are other solutions in the market.