ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
449 stars 92 forks source link

Bug in setting puppeteer timeouts #633

Closed siaccarino closed 2 years ago

siaccarino commented 2 years ago

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 and no matter what I configure for the rendering timeout, puppeteer always throws a timeout exception after 30s.

I created a fix #632 for this issue

ggrossetie commented 2 years ago

This is closely related to https://github.com/Mogztter/asciidoctor-web-pdf/issues/612

siaccarino commented 2 years ago

30 seconds is not much - lets assume the conversion is running on a busy jenkins agent in a CI chain and you have a lot of pages with tables, source code examples ...

ggrossetie commented 2 years ago

Yes, I agree, depending on what you are trying to print that might not be enough that's why we need a new timeout: PUPPETEER_PRINT_TIMEOUT.

siaccarino commented 2 years ago

I'll update my PR according to your suggestion