deno-puppeteer
deno-puppeteer copied to clipboard
TypeError: reader is not async iterable at getReadableStreamAsUint8Array
Deno info:
🐉 >deno info
DENO_DIR location: /Users/mateuszflisikowski/Library/Caches/deno
Remote modules cache: /Users/mateuszflisikowski/Library/Caches/deno/deps
npm modules cache: /Users/mateuszflisikowski/Library/Caches/deno/npm
Emitted modules cache: /Users/mateuszflisikowski/Library/Caches/deno/gen
Language server registries cache: /Users/mateuszflisikowski/Library/Caches/deno/registries
Origin storage: /Users/mateuszflisikowski/Library/Caches/deno/location_data
TypeError: reader is not async iterable
TypeError: reader is not async iterable
at getReadableStreamAsUint8Array (https://deno.land/x/[email protected]/vendor/puppeteer-core/puppeteer/common/util.js:329:29)
at Page.pdf (https://deno.land/x/[email protected]/vendor/puppeteer-core/puppeteer/common/Page.js:2606:24)
at async Server.<anonymous> (file:///home/deno/functions/download-cv/index.ts:21:17)
at async Server.#respond (https://deno.land/[email protected]/http/server.ts:298:18)
Supabase function code, that try to run.
import puppeteer from 'https://deno.land/x/[email protected]/mod.ts';
import { serve } from 'https://deno.land/[email protected]/http/server.ts';
serve(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://mflisikowski.dev/cv', {
waitUntil: 'networkidle2',
});
const pdf = await page.pdf({ format: 'A4' });
await browser.close();
return new Response(pdf, {
headers: {
'Content-Disposition': `attachment; filename="cv.pdf"`,
'Content-Type': 'application/pdf',
},
});
});
Same here, same as #67
Probably it's worth waiting for https://github.com/denoland/deno/issues/18913 so we can use Puppeteer from npm
and have it always updated
I also have the same problem using Superbase edge functions and browserless
any updates on solving this issue?
Im also running into this error after calling page.pdf
on a supabase edge function. Would love to get updates