emil
Explore posts from serversCDCloudflare Developers
•Created by emil on 8/2/2024 in #workers-help
"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/371 replies
PD🧩 Plasmo Developers
•Created by emil on 9/29/2023 in #👟framework
CSUI; can I reinject?
Alright, I'm pretty beginner at React & Plasmo, so apologize if I mess up some of my terminology here.
My goal is to add custom buttons to the send window in the ChatGPT UI, and it actually worked pretty awesome first-try with Plasmo CSUI. I just exported my component as default and also exported getInlineAnchor(), and now my buttons appear each time I load the site.
The issue is that, every time you change chats in the ChatGPT UI, the the element is replaced with a new one, so whenever I switch chats, my buttons disappear again. They obviously come back when the page refreshes, but refreshing each time is not ideal.
Example video: https://share.cleanshot.com/vd6nQDPD
15 replies