Save Image - Javascript Error


Created a simple test with 1 x background image element, and 2 x 'button' elements each with 3 states. All very simple. When right-clicking on the first button element, and using the Save Image option, a Javascript error is generated as shown attached.



Here is my Javascript install info (this is the latest version at time of posting)

2016.11.21 Subform release 6bdeabc

Hi @chris.williams,

Thanks for the excellent report and screenshot.
It looks like the error may be that Subform is not being allowed to open up a temporary file on Windows.

I'll look into this and update this topic.

Just FYI: Java and JavaScript are related for marketing reasons from the 1990s and don't actually have much to do with each other technically.


Thanks Kevin, hadn't realised about Java / Javascript differences - thanks for the tip :slight_smile:


It seems that the underlying issue was a permissions error when renaming temporary files on Windows.
I changed the internals so that we don't need to do a rename, and tested that it fixed the issue on my Windows 8 machine.

Please let me know on this topic if the next release doesn't resolve the issue for you, @chris.williams
Thanks again for the report!


I just saw something very similar when trying to export a PNG on OSX. I think in this case it was because the export window defaulted to the root of my HDD and my user doesn't have write permissions there. Picking a folder in my userspace fixed it but a more user-friendly error message would be good here.

Uncaught Exception:
Error: EACCES: permission denied, open '/awesome.png.__new__'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:178:20)
    at Object.fs.writeFileSync (fs.js:1343:33)
    at writeFileSync (/Users/eliot/Applications/
    at writeAtomicSync (/Users/eliot/Applications/
    at Object.writeSync [as sync] (/Users/eliot/Applications/
    at Object.write (/Users/eliot/Applications/
    at /Users/eliot/Applications/
    at Function.<anonymous> (/Users/eliot/Applications/


Thanks @eliotlash, I'll add this to my list and see if we can come up with a nice solution for this issue, which really affects every operation that involves saving out to a user-specified location. The solution should also handle other situations like being out of disk space.


Thanks @kevin, look forward to the update.