"readable is not async iterable" generating PDF with @cloudflare/puppeteer + Browser Rendering

Steps to reproduce the problem: Launch puppeteer and instantiate a Page with some content: const browser = await puppeteer.launch(env.MYBROWSER); const page = await browser.newPage(); await page.setContent('<h1>HELLO CLOUDFLARE</h1>', { waitUntil: 'networkidle0', }); Get the PDF: await page.pdf({ displayHeaderFooter: true }) Yields this error: TypeError: readable is not async iterable at getReadableAsBuffer (file:///Users/emillienemann/Documents/Code/talktweak/ClientWork/Nory/nory-sales/noryautomations-hono/.wrangler/tmp/dev-Vj79kl/index.js:45046:31) at Page2.pdf (file:///Users/emillienemann/Documents/Code/talktweak/ClientWork/Nory/nory-sales/noryautomations-hono/.wrangler/tmp/dev-Vj79kl/index.js:49130:26) at async markdownToR2Pdf (file:///Users/emillienemann/Documents/Code/talktweak/ClientWork/Nory/nory-sales/noryautomations-hono/.wrangler/tmp/dev-Vj79kl/index.js:52861:18) at async Array.<anonymous> (file:///Users/emillienemann/Documents/Code/talktweak/ClientWork/Nory/nory-sales/noryautomations-hono/.wrangler/tmp/dev-Vj79kl/index.js:52886:18) at async drainBody (file:///Users/emillienemann/Documents/Code/talktweak/ClientWork/Nory/nory-sales/noryautomations-hono/.wrangler/tmp/dev-Vj79kl/index.js:53277:12) { stack: TypeError: readable is not async iterable at g…-hono/.wrangler/tmp/dev-Vj79kl/index.js:53277:12), message: readable is not async iterable } GitHub issue + repo to reproduce: https://github.com/cloudflare/puppeteer/issues/37
GitHub
[Bug]: Puppeteer PDF generation via Page.pdf() method · Issue #37 ·...
Bug description I was creating a simple html to pdf converter when I stumbled into a little issue with all the current version of the fork. In the current implementation of the Page.pdf method in t...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server