-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Could not find browser revision XXX. Run "PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@VERSION/install.ts" to download a supported browser binary. #72
Comments
Temp solution browserless docs
const browser = await puppeteer.connect({
browserWSEndpoint: 'wss://chrome.browserless.io?token=<your_token>',
});
const browser = await puppeteer.connect({
browserWSEndpoint: 'wss://browserless-production-XXXX.up.railway.app',
}); But... pdf generation is fails, only screenshot do the job correctly. 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.connect({
browserWSEndpoint: 'wss://browserless-production-XXXX.up.railway.app',
// or
browserWSEndpoint: 'wss://chrome.browserless.io?token=<your_token>',
});
const page = await browser.newPage();
await page.goto('https://mflisikowski.dev/cv', {
waitUntil: 'networkidle2',
});
const screenshot = await page.screenshot();
await browser.close();
return new Response(screenshot, {
headers: { 'Content-Type': 'image/png' },
});
}); |
I'm having the same issue. Even though I'm able to use puppeteer thanks to the browserless.io solution (thanks @mflisikowski!), still my puppeteer is not behaving as expected. I believe because it's not possible to run JS in browserless, and we should pass an extra arg, like: await puppeteer.launch({
args: [
'--enable-features=ExperimentalJavaScript'
]
}) but it looks like it's not supported - see docs |
(btw @mflisikowski the page you try to scrape in the example is not accessible https://mflisikowski.dev/cv) |
yes, yes I know that this route does not exist (yet :)), locally generate pdf with 404, It is enough for me to test purpose :) |
Also, I've realised that actually the experimental javascript flag is not needed as the js in my target page is actually being executed 😅 |
I found another solution I decided to leave the information here as well :) doppio.sh |
Hi, I'm stuck looking for a browser version on my Apple M1 Pro, when I added the puppeteer package, I can't run Supabase function successfully anymore.
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
Error after call http://localhost:54321/functions/v1/:
Supabase function code, that try to run.
The text was updated successfully, but these errors were encountered: