Skip to content
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

Error: connect ECONNREFUSED 127.0.0.1:5173 #1280

Open
CaiqueCoelho opened this issue Oct 16, 2024 · 2 comments
Open

Error: connect ECONNREFUSED 127.0.0.1:5173 #1280

CaiqueCoelho opened this issue Oct 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@CaiqueCoelho
Copy link

CaiqueCoelho commented Oct 16, 2024

I'm trying to add a container image for cypress/browsers and setting browser as chrome to run Cypress tests in the GHA with cypress-io/github-action@v6 but I'm getting the following error

Error: connect ECONNREFUSED 127.0.0.1:5173

This is my config:

jobs:
  cypress-super-user:
    runs-on: ubuntu-20.04
    container:
      image: cypress/browsers:node-20.18.0-chrome-129.0.6668.89-1-ff-131.0.2-edge-129.0.2792.65-1
      options: --user 1001
    strategy:
      fail-fast: false
      matrix:
        containers: [1, 2, 3, 4]
    timeout-minutes: 180
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v4
        with:
          token: ${{ steps.generate_token.outputs.token }}
          submodules: recursive
          persist-credentials: false

      - name: Set up Node
        uses: actions/setup-node@v4
        with:
          node-version: 20.18.0

      - name: Install Dependencies
        run: npm i

      - name: Run directory_ui
        run: npm run serve &

      - name: Cypress Tests 🧪
        uses: cypress-io/[email protected]
        with:
          record: true
          parallel: true
          browser: chrome
          wait-on: "http://localhost:5173/"
          wait-on-timeout: 180
          env: userType=userSuperAdminType
          group: Raidiam - Super Admin
          config: baseUrl=http://localhost:5173

If I remove the container from the job Cypress is able to connect to 127.0.0.1:5173 and all tests pass

Additional Information:
I'm using VUE version 2.7.14 and VITE version 5.4.6
Cypress version 13.15.0

@MikeMcC399
Copy link
Collaborator

@CaiqueCoelho

You may find the README section Debugging helpful to look at what is going wrong in your workflow. There may be some timing differences between running directly in ubuntu-20.04 compared to running in a container using a Cypress cypress/browsers:node-20.18.0* Docker image, which is based on Debian 12.7.

You mention that you are using VUE version 2.7.14. According to https://v2.vuejs.org/eol/, Vue 2 reached end of life on Dec 31, 2023 and is no longer maintained.

@MikeMcC399 MikeMcC399 added the bug Something isn't working label Oct 17, 2024
@MikeMcC399 MikeMcC399 self-assigned this Oct 17, 2024
@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Oct 17, 2024

@CaiqueCoelho

Although I don't expect it to solve your issue, regarding the following section:

      - name: Install Dependencies
        run: npm i

      - name: Run directory_ui
        run: npm run serve &

if your repo contains a package-lock.json, then you may be able to replace these two steps using the start option. See the README documentation Start server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants