Timeout which large PDFs waiting for Page.printToPDF failed: timeout 30000ms exceeded
Console32 opened this issue · 2 comments
Console32 commented
Version of Marp Tool
@marp-team/marp-cli v2.4.0 (w/ @marp-team/marp-core v3.5.0)
Operating System
Windows
Environment
- OS version: [e.g. Windows 10 / macOS Big Sur 11.4 / Ubuntu 20.04.2]
- Node.js version (Marpit / Marp Core/ Marp CLI): [e.g. Node.js 14.17.1]
- VS Code version (Marp for VS Code): [e.g. VS Code 1.57.1]
Windows 11 2204 // Gitlab Pipeline
How to reproduce
Just create a marp with some images, replicate untill you get a lot of slides (dependent on your machine) and try to run:
❯ marp ./.build/complete.md -o complete.pdf --allow-local-files --theme ./themes/theme.css
[ INFO ] Converting 1 markdown...
[ WARN ] Insecure local file accessing is enabled for conversion from .build\complete.md.
[ ERROR ] Failed converting Markdown. (waiting for Page.printToPDF failed: timeout 30000ms exceeded)
Expected behavior
builds the PDF
Actual behavior
Receive Timeout
Additional information
I could not find a qay to increase the printToPDF Timeout, maybe we can add an option / or increase default ?
yhatt commented
Currently you can increase or disable Puppeteer's timeout duration by PUPPETEER_TIMEOUT
environment value in milliseconds. (#409)
# Set timeout duration to 60s
PUPPETEER_TIMEOUT=60000 marp --pdf large-markdown.md
# Disable timeout
PUPPETEER_TIMEOUT=0 marp --pdf large-markdown.md
Pull request for making timeout setting as a CLI option is anytime welcome.
Related dicsussions/issues
Console32 commented
Thank you. Works
/close