-
Notifications
You must be signed in to change notification settings - Fork 56
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
Error taking png screenshot on web-ui #1506
Comments
Thanks, have you used Firefox? |
I see on Linux Screenshot export to PNG is disabled and it will allow only Windows according to this
If I change it to this.isPngAvailable = true the option becomes available but still receive the exception. Below is a diff file with some changed code which fixes the error and allows me to export screenshots as PNG. Not sure if it is the best way or if it can be optimized but it works for me now. Tested on a Firefox based browser in Linux for the GNS3 web ui version 3.0.0.
|
Sorry I rushed a little bit. After doing some more tests I'm experiencing similar issues. |
GNS3 Version: GNS3 v2.2.46
Operating System: Linux, Windows
When I try to take screenshot from the web-ui I am getting an error, attached below.
error.txt
The error begins with Uncaught (in promise): There was an error loading the data URI as an image on the following SVG and continues with a segment of a svg.
Researching the error I found that this is from the npm package saveSvgAsPng.
In an issue on saveSvgAsPng's github I found that the error is caused when you try to convert to png an incorrect svg file.
On src\app\components\project-map\project-map-menu\project-map-menu.component.ts I see that when the function saveImage is called and the type of image is png, first is created and svg and then it is saved as png with saveSvgAsPng, so I suspect that the issue is on the generated SVG to be converted to png.
I found that I can only add VPCS and Cloud nodes to my topology and take a screenshot successfully.
When I add an ethernet switch or a custom template of VPCS with the icon changed the error start to generate, as shown in the following picture, a message appears but can't be seen, the attached file is the text that I can copy from that withe rectangle.
I tried with version 2.2.27 and 2.2.46 on Linux and Windows and the behavior is the same.
The text was updated successfully, but these errors were encountered: