Getting Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode} #28763
Unanswered
cypress-automation-phr
asked this question in
CI setup
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am setting up Cypress CI with github. Please find the attached cypress.yml file. Please find below the cypress.yml and error logs.
Any help in this regard is much appreciated.
Cypress.yml File : -
name: Cypress Tests with debug logs
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
# Also see warning here https://github.com/cypress-io/github-action#parallel
strategy:
fail-fast: false # cypress-io/github-action#48
matrix:
containers: [1, 2] # Uses 2 parallel instances
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v6
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
start: npm start
wait-on: 'http://127.0.0.1:8080' # Waits for above
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
parallel: true # Runs test in parallel using settings above
env:
DEBUG: '@cypress/github-action'
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Error logs:
Run cypress-io/github-action@v6
2024-01-21T06:51:44.565Z @cypress/github-action working directory /home/runner/work/Cypress-Practice-Automation/Cypress-Practice-Automation
2024-01-21T06:51:44.576Z @cypress/github-action using custom Cypress cache folder "/home/runner/.cache/Cypress"
Skipping install because install parameter is false
2024-01-21T06:51:44.578Z @cypress/github-action Separated 1 start commands npm start
start server command "npm start"
2024-01-21T06:51:44.579Z @cypress/github-action parsed command: npm start
current working directory "/home/runner/work/Cypress-Practice-Automation/Cypress-Practice-Automation"
2024-01-21T06:51:44.580Z @cypress/github-action Waiting for urls http://localhost:8080
2024-01-21T06:51:44.581Z @cypress/github-action Waiting for url http://localhost:8080
2024-01-21T06:51:44.581Z @cypress/github-action total ping timeout 90000
2024-01-21T06:51:44.581Z @cypress/github-action individual ping timeout 30000ms
2024-01-21T06:51:44.581Z @cypress/github-action retries limit 3
waiting on "http://localhost:8080" with timeout of 60 seconds
2024-01-21T06:51:44.617Z @cypress/github-action got error {"name":"RequestError","code":"ECONNREFUSED","timings":{"start":1705819904599,"socket":1705819904603,"lookup":1705819904605,"error":1705819904608,"phases":{"wait":4,"dns":2,"total":9}}}
2024-01-21T06:51:44.618Z @cypress/github-action 37ms undefined undefined ECONNREFUSED attempt 1
2024-01-21T06:51:44.622Z @cypress/github-action found command "/usr/local/bin/npm"
2024-01-21T06:51:44.622Z @cypress/github-action with arguments start
2024-01-21T06:51:44.623Z @cypress/github-action running "/usr/local/bin/npm" start in /home/runner/work/Cypress-Practice-Automation/Cypress-Practice-Automation
2024-01-21T06:51:44.624Z @cypress/github-action waiting for the command to finish? false
/usr/local/bin/npm start
2024-01-21T06:51:45.623Z @cypress/github-action got error {"name":"RequestError","code":"ECONNREFUSED","timings":{"start":1705819905621,"socket":1705819905621,"lookup":1705819905622,"error":1705819905622,"phases":{"wait":0,"dns":1,"total":1}}}
2024-01-21T06:51:45.623Z @cypress/github-action 1042ms undefined undefined ECONNREFUSED attempt 2
2024-01-21T06:51:46.632Z @cypress/github-action got error {"name":"RequestError","code":"ECONNREFUSED","timings":{"start":1705819906627,"socket":1705819906627,"lookup":1705819906628,"error":1705819906632,"phases":{"wait":0,"dns":1,"total":5}}}
2024-01-21T06:51:46.632Z @cypress/github-action 2051ms undefined undefined ECONNREFUSED attempt 3
2024-01-21T06:51:47.637Z @cypress/github-action got error {"name":"RequestError","code":"ECONNREFUSED","timings":{"start":1705819907635,"socket":1705819907636,"lookup":1705819907636,"error":1705819907637,"phases":{"wait":1,"dns":0,"total":2}}}
2024-01-21T06:51:47.637Z @cypress/github-action 3056ms undefined undefined ECONNREFUSED attempt 4
sh: 1: http-server: not found
/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:3900
error = new Error(
The process '${this.toolPath}' failed with exit code ${this.processExitCode}
);^
Error: The process '/usr/local/bin/npm' failed with exit code 127
at ExecState._setResult (/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:3900:25)
at ExecState.CheckComplete (/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:3883:18)
at ChildProcess. (/home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js:3777:27)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
Node.js v20.8.1
Beta Was this translation helpful? Give feedback.
All reactions