-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to save PNG #11
Comments
same issue here |
Same issue here; I am on Linux with extension version |
same here. But i still love it! |
Also, if you change to another file, and then back to the Sequence Diagram file its blank. |
Have the same problem. Is there a fix? Like the plugin though, works as it should! |
Can you confirm this is still issue with version |
New to this issue, however I am also seeing this bug. Error message presented: "Sequence Diagrams - Failed to save PNG" |
Looking a bit deeper I see the following logged to the console. Hope this helps.
|
Same for me! |
Same here; I guess I'm using latest version, which is 0.4.0 according to the changelog. |
Ok, I think I may have identified a root cause. Here's the bit of code in the extension where the PNG is saved:
We can see svg2png is called to perform the conversion. The svg2png library has an upstream dependency on phantomjs-prebuilt:
And unfortunately I can see in the Visual Studio Code developer console that the extension fails trying to launch a Windows binary. I'm on a Mac. See the screenshots below.
I think the root of the problem is that this extension is shipping with prebuilt platform-specific binaries. This is what the phantomjs README says:
I'm not sure what the real fix is here other than trying to find an alternative way of doing the svg to png conversion that doesn't require shipping binaries. |
@AleksandarDev - was the above information useful for diagnosing? |
@mhite NPM should detect the missing phantomjs binary and do the install. The post install script will fail but if you reload vscode, png downloads should work. I'm not familiar enough with the vscode extension api to say what the more permanent solution to this is. |
@chrisdesoto - Nice! I'm hoping @AleksandarDev has a permanent fix. |
Should be resolved |
Incidentally, I installed this plugin today (v 0.4.7), and experienced this problem. I'm on OSX. I tried the |
This issue seems not fixed in the latest |
Another possible solution: remove the option to export as PNG. |
The extension produces the following error: |
|
Happening for me also in |
Yeah its now more hardcoded to use a .exe even when running on OS X:
I'm tempted to try and grab an osx binary of phantom and rename it to .exe to see if that works. |
Nope, because of the mixed slashes I can't make that work. |
Upon clicking on the 'Export to PNG' button, a notification comes up that says 'Failed to save PNG'. I don't seem to be able to find any additional error messages.
Upon clicking on 'Export to SVG', this works and a diagram.svg file is created in the same location as the diagram.seqdiag file.
Version: 1.28.2
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:23:51.859Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
The text was updated successfully, but these errors were encountered: