Skip to content
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

Getting Could not find Chrome error #44

Open
jpv123 opened this issue Oct 21, 2024 · 1 comment
Open

Getting Could not find Chrome error #44

jpv123 opened this issue Oct 21, 2024 · 1 comment

Comments

@jpv123
Copy link

jpv123 commented Oct 21, 2024

Hey guys trying this patches give me the following error

Error: Could not find Chrome (ver. 130.0.6723.58). This can occur if either
>   1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or
>   2. your cache path is incorrectly configured (which is: ....................).
>  For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.

Code is exactly the same as before which was working correctly

const puppeteer = require('rebrowser-puppeteer');

//....
const browser = await puppeteer.launch({
      args: [
          '--no-sandbox',
          '--disable-setuid-sandbox', 
      ],
      headless: true,
  });

const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle2' });

I run the patch command which was successful and also the npx puppeteer browsers install chrome which didn't throw any errors too

Any ideas?

@nwebson
Copy link
Contributor

nwebson commented Oct 22, 2024

If you're using rebrowser-puppeteer package, try to run npx rebrowser-puppeteer browsers install chrome to install browsers.
Also, you can use executablePath param in puppeteer.launch().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants