question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect and confusing CHROME_PATH error occurring when CHROME_PATH is not set

See original GitHub issue

Provide the steps to reproduce

  1. Run which chromium-browser to ensure chromium-browser is installed: /usr/bin/chromium-browser
  2. Run echo $CHROME_PATH to ensure it is NOT set:
  3. 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
  4. Run lighthouse --version to ensure latest version: 3.1.1
  5. 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:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
wardpeetcommented, Sep 25, 2018

@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.

0reactions
Vasiharancommented, Dec 13, 2018

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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found