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

[Bug]: Error: Could not find Chrome (ver. 124.0.6367.78). #12323

Closed
bittorf opened this issue Apr 24, 2024 · 2 comments
Closed

[Bug]: Error: Could not find Chrome (ver. 124.0.6367.78). #12323

bittorf opened this issue Apr 24, 2024 · 2 comments

Comments

@bittorf
Copy link

bittorf commented Apr 24, 2024

Minimal, reproducible example

# i start with a fresh checkout on a recent debian trixie/sid
# and follow the howto in the examples folder:


git clone https://github.com/puppeteer/puppeteer.git
cd puppeteer 

# checkout from today:
bastian@ryzen:~/software/puppeteer$ git log -1
commit e35e783a7484ffd0d31ca23608e61a6cf54df8e2 (HEAD -> main, origin/main, origin/HEAD)
Author: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com>
Date:   Wed Apr 24 15:13:09 2024 +0200

bastian@ryzen:~/software/puppeteer$ npm install

bastian@ryzen:~/software/puppeteer$ npm run build

bastian@ryzen:~/software/puppeteer$ npx puppeteer browsers install chrome
chrome@124.0.6367.60 /home/bastian/.cache/puppeteer/chrome/linux-124.0.6367.60/chrome-linux64/chrome

bastian@ryzen:~/software/puppeteer$ NODE_PATH=../ node examples/search.js

bastian@ryzen:~/software/puppeteer$ NODE_PATH=../ node examples/search.js
/home/bastian/software/puppeteer/packages/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:288
                    throw new Error(`Could not find Chrome (ver. ${this.puppeteer.browserRevision}). This can occur if either\n` +
                          ^

Error: Could not find Chrome (ver. 124.0.6367.78). 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: /home/bastian/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
    at ChromeLauncher.resolveExecutablePath (/home/bastian/software/puppeteer/packages/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:288:27)
    at ChromeLauncher.executablePath (/home/bastian/software/puppeteer/packages/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:207:25)
    at ChromeLauncher.computeLaunchArguments (/home/bastian/software/puppeteer/packages/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:89:37)
    at async ChromeLauncher.launch (/home/bastian/software/puppeteer/packages/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:70:28)
    at async /home/bastian/software/puppeteer/examples/search.js:17:19

Node.js v18.19.1

bastian@ryzen:~/software/puppeteer$ command -v chrome
/home/bastian/.cache/puppeteer/chrome/linux-124.0.6367.60/chrome-linux64/chrome

bastian@ryzen:~/software/puppeteer$ ldd /home/bastian/.cache/puppeteer/chrome/linux-124.0.6367.60/chrome-linux64/chrome | grep not
<empty>

bastian@ryzen:~/software/puppeteer$ /home/bastian/.cache/puppeteer/chrome/linux-124.0.6367.60/chrome-linux64/chrome --version
Google Chrome for Testing 124.0.6367.60 

# all dependencies for debian listed at https://pptr.dev/troubleshooting
# Debian (e.g. Ubuntu) Dependencies
# are installed (already)


### Error string

Could not find Chrome (ver. 124.0.6367.78)

### Bug behavior

- [ ] Flaky
- [ ] PDF

### Background

follow the mini howto in the examples folder

### Expectation

no error

### Reality

i seems that chrome is not found, but in fact installed.


### Puppeteer configuration file (if used)

```TypeScript
not used

Puppeteer version

22.7.0

Node version

18.19.1

Package manager

npm

Package manager version

10.5.0

Operating system

Linux

Copy link

github-actions bot commented Apr 24, 2024

This issue was not reproducible. Please check that your example runs locally and the following:

  • Ensure the script does not rely on dependencies outside of puppeteer and puppeteer-core.
  • Ensure the error string is just the error message.
    • Bad:

      Error: something went wrong
        at Object.<anonymous> (/Users/username/repository/script.js:2:1)
        at Module._compile (node:internal/modules/cjs/loader:1159:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
        at Module.load (node:internal/modules/cjs/loader:1037:32)
        at Module._load (node:internal/modules/cjs/loader:878:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
        at node:internal/main/run_main_module:23:47
    • Good: Error: something went wrong.

  • Ensure your configuration file (if applicable) is valid.
  • If the issue is flaky (does not reproduce all the time), make sure 'Flaky' is checked.
  • If the issue is not expected to error, make sure to write 'no error'.

Once the above checks are satisfied, please edit your issue with the changes and we will
try to reproduce the bug again.


Analyzer run

@bittorf
Copy link
Author

bittorf commented Apr 24, 2024

This needed step was missing:

npm install puppeteer-core

Maybe this should be mentioned in
https://github.com/puppeteer/puppeteer/tree/main/examples

After installing puppeteer-core, the example works:

bastian@ryzen:~/software/puppeteer$ NODE_PATH=../ node examples/search.js
Getting Started with Headless Chrome - https://developer.chrome.com/blog/headless-chrome
Chrome's Headless mode gets an upgrade: introducing --headless ... - https://developer.chrome.com/docs/chromium/new-headless
Download old Headless Chrome as chrome-headless-shell - https://developer.chrome.com/blog/chrome-headless-shell
Automated testing with Headless Chrome - https://developer.chrome.com/blog/headless-karma-mocha-chai
Headless Chrome: an answer to server-side rendering JS sites ... - https://developer.chrome.com/docs/puppeteer/ssr
Overview of Puppeteer - https://developer.chrome.com/docs/puppeteer
Serverless web performance monitoring using Cloud Functions ... - https://cloud.google.com/architecture/serverless-web-performance-monitoring-using-cloud-functions
Supercharge Web AI model testing: WebGPU, WebGL, and ... - https://developer.chrome.com/blog/supercharge-web-ai-testing
Recaptcha not rendered for Headless Chrome · Issue #174 · google ... - https://github.com/google/recaptcha/issues/174
BlinkOn 6 Day 2 Talk 1: Headless Chrome - https://developers.google.com/web/shows/blinkon/6/blinkon-6-day-2-talk-1-headless-chrome

@bittorf bittorf closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant