spiritix/php-chrome-html2pdf

Problem with page.waitFor

Lezhni opened this issue · 1 comments

Hi, yesterday I updated Composer packages on server and got this error:

Node.js v18.12.0
 {"exception":"[object] (Spiritix\\Html2Pdf\\ConverterException(code: 0): Binary error: file:///var/www/project/app/vendor/spiritix/php-chrome-html2pdf/lib/Converter.js:79
            await page.waitFor(parseInt(options.pageWaitFor));
                       ^

TypeError: page.waitFor is not a function
    at Converter._convert (file:///var/www/project/app/vendor/spiritix/php-chrome-html2pdf/lib/Converter.js:79:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Converter.run (file:///var/www/project/app/vendor/spiritix/php-chrome-html2pdf/lib/Converter.js:37:24)
    at async file:///var/www/project/app/vendor/spiritix/php-chrome-html2pdf/index.js:23:20

As I found, this error only appears when converter's option pageWaitFor is set.

Node version: 18.12.0
Package version: 1.7.2

Any ideas?

Thanks for the report. I just released a bugfix version that should handle this.