cypress-realworld-app icon indicating copy to clipboard operation
cypress-realworld-app copied to clipboard

Flaky CircleCI ECONNREFUSED 127.0.0.1:3001 db:seed

Open MikeMcC399 opened this issue 2 years ago • 5 comments

CircleCI is failing in different places with errors related to ECONNREFUSED 127.0.0.1:3001 and db:seed

     CypressError: `cy.task('db:seed')` failed with the following error:

> connect ECONNREFUSED 127.0.0.1:3001
  • https://app.circleci.com/pipelines/github/cypress-io/cypress-realworld-app/5341/workflows/3b07d76f-ebb9-438f-af25-e1f7ac3898f5/jobs/33501 and
  • https://app.circleci.com/pipelines/github/cypress-io/cypress-realworld-app/5339/workflows/88a1196b-ccdc-4959-9721-1827ac8e24e8/jobs/33484

failed in auth.spec.ts

  • https://app.circleci.com/pipelines/github/cypress-io/cypress-realworld-app/5338/workflows/0e5898b7-4271-4cb5-b4b2-a9455edc3ffc/jobs/33474

failed in new-transaction.spec.ts

MikeMcC399 avatar Apr 24 '23 11:04 MikeMcC399

  • This could be related to https://github.com/cypress-io/circleci-orb/issues/426 (assigned to @mschile). There doesn't seem to be any mechanism to wait for the database to become available.

MikeMcC399 avatar Apr 27 '23 06:04 MikeMcC399

Suggestion

If it is not planned to enhance Orb to include a wait-on function (again), then use

start-server-and-test

which is already included in devDependencies and unused at this time.

MikeMcC399 avatar May 10 '23 15:05 MikeMcC399

https://circleci.com/developer/orbs/orb/cypress-io/cypress now lists wait-on

image

I don't plan to submit a PR for this. I have found that trying to use Circle CI from a fork is impractical. Either I have it working in the fork under my user credentials, but then it fails automated CI checks or I have no credentials defined, in which case CI checks pass, but I can't manually test anymore. So I leave it to somebody who is working in the parent repository and is a member of cypress-io on GitHub and Circle CI.

MikeMcC399 avatar May 12 '23 17:05 MikeMcC399

No current failures. I will re-open if necessary.

MikeMcC399 avatar Sep 10 '23 13:09 MikeMcC399

This issue occurred again today in CircleCI, in the current RWA setup.

See https://app.circleci.com/pipelines/github/cypress-io/cypress-realworld-app/5566/workflows/20addbdb-3781-48f2-8fad-0b7c1b6aefa9/jobs/35423

So, unfortunately, I need to re-open 🙁

MikeMcC399 avatar Sep 11 '23 13:09 MikeMcC399

  • This issue is no longer occurring. Possibly this is due to the removal of Windows testing in CircleCI through https://github.com/cypress-io/cypress-realworld-app/pull/1447

MikeMcC399 avatar Feb 26 '24 15:02 MikeMcC399