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

Fix no Chrome found error #398

Open
wants to merge 3 commits into
base: v1
Choose a base branch
from
Open

Fix no Chrome found error #398

wants to merge 3 commits into from

Conversation

terjanq
Copy link
Contributor

@terjanq terjanq commented Jun 6, 2023

Since puppeteer 19.0.0. the browser is loaded from ~/.cache/. Maybe not the cleanest fix but it works.

puppeteer/puppeteer#9533

Node.js v18.16.0
/home/user/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:300
                    throw new Error(Could not find Chrome (ver. ${this.puppeteer.browserRevision}). This can occur if either\n +
                          ^

Error: Could not find Chrome (ver. 113.0.5672.63). This can occur if either
 1. you did not perform an installation before running the script (e.g. npm install) or
 2. your cache path is incorrectly configured (which is: /home/user/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
    at ChromeLauncher.resolveExecutablePath (/home/user/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:300:27)
    at ChromeLauncher.executablePath (/home/user/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:181:25)
    at ChromeLauncher.computeLaunchArguments (/home/user/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:97:37)
    at async ChromeLauncher.launch (/home/user/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:83:28)
    at async /home/user/bot.js:121:19

Node.js v18.16.0

Since puppeteer 1.19 the browser is loaded from `~/.cache/`. Maybe not the cleanest fix but it works.

puppeteer/puppeteer#9533
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

Successfully merging this pull request may close these issues.

1 participant