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

The latest Docker image fails PDF rendering (Protocol error (Page.printToPDF): printing failed) #538

Closed
yhatt opened this issue Aug 4, 2023 · 0 comments · Fixed by #539

Comments

@yhatt
Copy link
Member

yhatt commented Aug 4, 2023

This is a blocker to release the minor version of Marp CLI (v3.2.0).

$ docker run --rm --init --entrypoint="" -it marpteam/marp-cli /bin/sh
/home/marp/app # echo 'Test' > test.md
/home/marp/app # marp-cli.js test.md --pdf
[  INFO ] Converting 1 markdown...
[ ERROR ] Failed converting Markdown. (Protocol error (Page.printToPDF): Printing failed)

#537 has been updated Puppeteer to v21, that is comatible version with Chromium installed in the image, but it still has no luck.

/home/marp/app # chromium-browser --version
Chromium 115.0.5790.170 Alpine Linux

Debug log

DEBUG="*" marp-cli.js test.md --pdf

...
puppeteer:protocol:SEND ► [
puppeteer:protocol:SEND ►   '{"method":"Page.printToPDF","params":{"transferMode":"ReturnAsStream","landscape":false,"displayHeaderFooter":false,"headerTemplate":"","footerTemplate":"","printBackground":true,"scale":1,"paperWidth":8.5,"paperHeight":11,"marginTop":0,"marginBottom":0,"marginLeft":0,"marginRight":0,"pageRanges":"","preferCSSPageSize":true},"id":15,"sessionId":"27ED98338D873A50586E69A7B9048D15"}'
puppeteer:protocol:SEND ► ] +0ms
puppeteer:protocol:RECV ◀ [
puppeteer:protocol:RECV ◀   '{"id":15,"error":{"code":-32000,"message":"Printing failed"},"sessionId":"27ED98338D873A50586E69A7B9048D15"}'
puppeteer:protocol:RECV ◀ ] +0ms
...
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

Successfully merging a pull request may close this issue.

1 participant