github-action
github-action copied to clipboard
Intermittent "Browser: 'chrome' was not found..."
Similar to #142 but experiencing this in v4.8.0.
Cypress test command: npx cypress run --headless --record --config-file ./cypress.ci.json --browser chrome --env password=***
/usr/local/bin/npx cypress run --headless --record --config-file ./cypress.ci.json --browser chrome --env password=***
Can't run because you've entered an invalid browser name.
Browser: 'chrome' was not found on your system.
Available browsers found are: firefox, electron
Error: The process '/usr/local/bin/npx' failed with exit code 1
at ExecState._setResult (/home/runner/work/_actions/cypress-io/github-action/v1/dist/index.js:1179:25)
at ExecState.CheckComplete (/home/runner/work/_actions/cypress-io/github-action/v1/dist/index.js:1162:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/cypress-io/github-action/v1/dist/index.js:1062:27)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
##[error]The process '/usr/local/bin/npx' failed with exit code 1
We hit the same issue with cypress 4.9.0and chrome Google Chrome 84.0.4147.105
We built google-chrome-stable into a CentOS 7 Docker image and run cypress inside this docker image
25-Aug-2020 01:59:07
25-Aug-2020 01:59:12 Can't run because you've entered an invalid browser name.
25-Aug-2020 01:59:12
25-Aug-2020 01:59:12 Browser: 'chrome' was not found on your system or is not supported by Cypress.
25-Aug-2020 01:59:12
25-Aug-2020 01:59:12 Cypress supports the following browsers:
25-Aug-2020 01:59:12 - chrome
25-Aug-2020 01:59:12 - chromium
25-Aug-2020 01:59:12 - edge
25-Aug-2020 01:59:12 - electron
25-Aug-2020 01:59:12 - firefox (Cypress support in beta)
25-Aug-2020 01:59:12
25-Aug-2020 01:59:12 You can also use a custom browser: https://on.cypress.io/customize-browsers
25-Aug-2020 01:59:12
25-Aug-2020 01:59:12 Available browsers found on your system are:
25-Aug-2020 01:59:12 - electron```
Can you try Cypress v7.3.0 https://github.com/cypress-io/cypress/releases/tag/v7.3.0 where we have hopefully fixed this https://github.com/cypress-io/cypress/pull/16312
I get this issue with Cypress 8.7 running on a Linux instance. We use browser-actions/setup-chrome@latest step to install chrome version 86 but the cypress github action refuses to accept that there is a version of chrome installed. In fact it doesn't matter which version of chrome we install, it still refuses to accept there is a chrome instance to use.
This is a stale issue.
GitHub runners include Google Chrome and .github/workflows/example-chrome.yml demonstrates that Cypress finds the browser.
https://github.com/cypress-io/cypress-docker-images also offers Cypress Docker images with Chrome pre-installed.
For browsers installed by other means, such as through browser-actions/setup-chrome, it may be necessary to specify their location. See https://docs.cypress.io/guides/guides/launching-browsers#Launching-by-a-path
If there are any ongoing issues locating Chrome, please open a new issue to investigate.