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
resolves #633 Introduce PUPPETEER_PRINT_TIMEOUT for puppeteer pdf rendering #632
resolves #633 Introduce PUPPETEER_PRINT_TIMEOUT for puppeteer pdf rendering #632
Conversation
@@ -89,10 +89,14 @@ async function convert (processor, inputFile, options, timings, watch, preview) | |||
} | |||
try { | |||
const page = await browserInstance.goto(`file://${tempFile}`, preview) | |||
const puppeteerDefaultTimeout = process.env.PUPPETEER_DEFAULT_TIMEOUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be taken from browser instance but in terms of dependency reduction this might be better
Looks good!
As mentioned in #612 (comment) it would be better to create a separate 'TIP' for each timeout but for now it's good enough. We can revisit this logic later in a follow-up pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, thanks!
The pull request #236 did not change the puppeteer rendering timeout - it changes the time asciidoc-web-pdf waits for puppeteer.
According to puppeteer pdf options a timeout shall be passed to the page.pdf() call instead.
Rendering of complex documents on slow machines could easily exceed the 30s limit.
Solution: Introduce a PUPPETEER_PRINT_TIMEOUT environment variable that is passed to puppeteer - see puppeteer pdf timeout option.
Issue: #633