Skip to content
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

Protocol error: Unable to capture screenshot #94

Open
beeryt opened this issue Mar 3, 2021 · 6 comments
Open

Protocol error: Unable to capture screenshot #94

beeryt opened this issue Mar 3, 2021 · 6 comments

Comments

@beeryt
Copy link

beeryt commented Mar 3, 2021

  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

npm@7.6.0
node@15.11.0
svgexport@0.4.1
@SandroMiccoli
Copy link

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

@shakiba
Copy link
Collaborator

shakiba commented Mar 10, 2021

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

@beeryt
Copy link
Author

beeryt commented Mar 10, 2021

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

@SandroMiccoli
Copy link

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.

@shakiba
Copy link
Collaborator

shakiba commented Mar 11, 2021

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.

@kryztoval
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants