svgexport icon indicating copy to clipboard operation
svgexport copied to clipboard

Protocol error: Unable to capture screenshot

Open beeryt opened this issue 3 years ago • 6 comments

  1. Install svgexport
PS C:\> npm i svgexport -g

added 48 packages, and audited 49 packages in 11s
found 0 vulnerabilities
  1. Run with error (svg from Fontawesome)
PS C:\> svgexport .\play-solid.svg .\play-solid.png 64x
Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot

Versions

Windows 10.0.18363

[email protected]
[email protected]
[email protected]

beeryt avatar Mar 03 '21 21:03 beeryt

Had the same error. Installed using `npm install svgexport -g'.

First a just ran the command without any parameters, and it worked fine.

When trying to export a higher resolution png, I got the error:

$ svgexport.cmd hicetnunc-v0.1.svg hicetnunc-v0.1-25000pixels.png 25000:25000
Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot

SandroMiccoli avatar Mar 09 '21 14:03 SandroMiccoli

It seems it is a Puppeteer issue because of file size.

shakiba avatar Mar 10 '21 04:03 shakiba

That appears to be correct. I realize now that I used 64x instead of 64:64.

beeryt avatar Mar 10 '21 04:03 beeryt

It seems it is a Puppeteer issue because of file size.

Is there a way to solve it? Or at least find a way around this issue?

I would like to be able to export high dimensional/quality images.

SandroMiccoli avatar Mar 10 '21 09:03 SandroMiccoli

Yeah, makes sense. The issue is not specific to svgexport, so if you search for the error on the web you will find some suggestions, for example if you running in a docker container you may be able to fix it by adding more RAM.

Another option/hack might be to export one portion of image at a time using input size parameters, and then merge them together using another tool.

shakiba avatar Mar 11 '21 02:03 shakiba

I was trying to export the Ghostcript_Tiger.svg in 20x and got this error, but looking at the issues reported here I used version 0.3.2 and it exports correctly. however version 0.4.x does output this error. My computer has 51GB of free ram (64GB installed).

kryztoval avatar Jul 27 '21 00:07 kryztoval