-
Notifications
You must be signed in to change notification settings - Fork 85
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
The CHROME_PATH environment variable must be set to a Chrome/Chromium executable #116
Comments
Experiencing the same issue here with a GitHub-hosted runner. Minimum reproducible steps: name: Lighthouse
on: [pull_request]
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Audit performance with Lighthouse
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
https://example.com Error log: Running Lighthouse 1 time(s) on https://example.com
Run #1...failed!
Error: Lighthouse failed with exit code 1
at ChildProcess.<anonymous> (/opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/@lhci/cli/src/collect/node-runner.js:120:21)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:2[9](https://github.com/planetscale/www/actions/runs/5957221283/job/16159507373?pr=387#step:3:9)3:12)
Runtime error encountered: The CHROME_PATH environment variable must be set to a Chrome/Chromium executable no older than Chrome stable.
Error
at new LauncherError (/opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/node_modules/chrome-launcher/dist/utils.js:26:22)
at new ChromePathNotSetError (/opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/node_modules/chrome-launcher/dist/utils.js:33:[9](https://github.com/planetscale/www/actions/runs/5957221283/job/16159507373?pr=387#step:3:10))
at Object.linux (/opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/node_modules/chrome-launcher/dist/chrome-finder.js:1[28](https://github.com/planetscale/www/actions/runs/5957221283/job/16159507373?pr=387#step:3:30):15)
at Launcher.getFirstInstallation (/opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:126:51)
at Launcher.launch (/opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:187:43)
at Module.launch (/opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:35:20)
at getDebuggableChrome (file:///opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/cli/run.js:86:25)
at runLighthouse (file:///opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/cli/run.js:237:[30](https://github.com/planetscale/www/actions/runs/5957221283/job/16159507373?pr=387#step:3:32))
at begin (file:///opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/cli/bin.js:1[35](https://github.com/planetscale/www/actions/runs/5957221283/job/16159507373?pr=387#step:3:37):10)
at async file:///opt/actions-runner/_work/_actions/treosh/lighthouse-ci-action/v10/node_modules/lighthouse/cli/index.js:10:1
Error: LHCI 'collect' has encountered a problem. Config from the log:
|
Facing the same issue with the latest version, v11, when testing locally using |
@arishoham did you ever manage to fix this issue? |
Had the same issue, but on gitea runner. name: Lighthouse CI
on: push
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup chrome
uses: browser-actions/setup-chrome@v1
with:
install-dependencies: true
- name: install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: browser-actions/setup-chrome@v1
id: setup-chrome
- run: |
${{ steps.setup-chrome.outputs.chrome-path }} --version
- name: Set CHROME_PATH environment variable
run: echo "CHROME_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v1
with:
urls: |
https://example.com
uploadArtifacts: true
temporaryPublicStorage: true for anyone still stumbling onto this 😄 |
Using a self-hosted github action:
I get the following error from chrome-launcher:
The text was updated successfully, but these errors were encountered: