Incorrect and confusing CHROME_PATH error occurring when CHROME_PATH is not set
See original GitHub issueProvide the steps to reproduce
- Run
which chromium-browser
to ensure chromium-browser is installed:/usr/bin/chromium-browser
- Run
echo $CHROME_PATH
to ensure it is NOT set: - Run
chromium-browser --product-version
to ensure installed version is at least 66 (as per https://github.com/GoogleChrome/lighthouse/blob/52826e5536517453c154e8870ce2868f9222a991/lighthouse-cli/cli-flags.js#L93 ):69.0.3497.81
- Run
lighthouse --version
to ensure latest version:3.1.1
- Run
lighthouse --quiet --no-update-notifier --no-enable-error-reporting --output=json --chrome-flags="--headless" https://****
replace****
with any site.
What is the current behavior?
Displays the following error:
Runtime error encountered: The environment variable CHROME_PATH must be set to executable of a build of Chromium version 54.0 or later.
Error
at new LauncherError (/opt/pagespeed/node_modules/chrome-launcher/dist/utils.js:35:22)
at new ChromePathNotSetError (/opt/pagespeed/node_modules/chrome-launcher/dist/utils.js:42:9)
at Object.linux (/opt/pagespeed/node_modules/chrome-launcher/dist/chrome-finder.js:108:15)
at Launcher.<anonymous> (/opt/pagespeed/node_modules/chrome-launcher/dist/chrome-launcher.js:143:80)
at Generator.next (<anonymous>)
at /opt/pagespeed/node_modules/chrome-launcher/dist/chrome-launcher.js:12:71
at new Promise (<anonymous>)
at __awaiter (/opt/pagespeed/node_modules/chrome-launcher/dist/chrome-launcher.js:8:12)
at Launcher.launch (/opt/pagespeed/node_modules/chrome-launcher/dist/chrome-launcher.js:131:16)
at Object.<anonymous> (/opt/pagespeed/node_modules/chrome-launcher/dist/chrome-launcher.js:52:24)
What is the expected behavior?
Lighthouse should find the chromium-browser from the PATH, and run the request. I just upgraded from 3.0.1 to 3.1.1 and it was working prior to my upgrade.
NOTE: If I replace the command with CHROME_PATH=/usr/bin/chromium-browser lighthouse --quiet --no-update-notifier --no-enable-error-reporting --output=json --chrome-flags="--headless" https://****
it works perfectly, but I’d like to avoid this if possible.
Environment Information
- Affected Channels: CLI (didn’t test other channels)
- Lighthouse version: 3.1.1
- Node.js version: 10.11.0
- Operating System: Ubuntu Server 18.04.1 LTS
Related issues
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Cannot find Chrome. Try setting CHROME_EXECUTABLE to ...
For Ubuntu 20.04, chromium is managed by snap. I set the environment variable as shown below. CHROME_EXECUTABLE=/snap/bin/chromium export ...
Read more >2022 Fix: Windows cannot find chrome.exe ... - YouTube
In this video, we're going to show you How to fix Windows cannot find chrome.exe or Chrome not working error on Windows. Watch...
Read more >unknown error: cannot find chrome binary - You.com
I found the problem. ... Now I realized that's wrong , ChromeDriver binary is a selenium wrapper that calls Google Chrome. ... I...
Read more >XmlHttpRequest - Http requests in Excel VBA (Updated 2022)
XmlHttpRequest object is used to make HTTP requests in VBA. HTTP requests can be used to interact with a web service, API or...
Read more >webdriverio/webdriverio - Gitter
Stderr: [0-0] 2019-08-28T14:26:34.784Z ERROR wdio-sync: Error: Protocol error (Tracing.start): Session closed. ... you can set chrome path in chromeOptions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@klick-barakgall yes, we will release it when it’s a bit more battle tested. I checked it in docker. I’m installing ubuntu as we speak to get it validated too.
The message is small todo which I can handle in a separate PR. Thanks for pointing out. I’ll keep you updated.
Still getting the same error
(node:4255) UnhandledPromiseRejectionWarning: Error at new LauncherError (/var/www/node_modules/chrome-launcher/dist/utils.js:35:22) at new ChromePathNotSetError (/var/www/node_modules/chrome-launcher/dist/utils.js:42:9) at Object.linux (/var/www/node_modules/chrome-launcher/dist/chrome-finder.js:108:15) at Launcher.<anonymous> (/var/www/node_modules/chrome-launcher/dist/chrome-launcher.js:143:80) at Generator.next (<anonymous>) at /var/www/node_modules/chrome-launcher/dist/chrome-launcher.js:12:71 at new Promise (<anonymous>) at __awaiter (/var/www/node_modules/chrome-launcher/dist/chrome-launcher.js:8:12) at Launcher.launch (/var/www/node_modules/chrome-launcher/dist/chrome-launcher.js:131:16) at Object.<anonymous> (/var/www/node_modules/chrome-launcher/dist/chrome-launcher.js:52:24)