'Getting ECONNREFUSED when setting the --record flag for Cypress test

We've got Cypress Dashboard running for some of our tests. I'm looking to expand that into some new tests, and have been trying to run it locally to confirm it's working.

  • Everything in our current pipelines is working fine with Dashboard.
  • Running tests locally without the --record flag is working fine as well.

However when I'm trying to run locally with Dashboard, I'm getting the following error:

We encountered an unexpected error talking to our servers.

We will retry 0 more times in ...

The server's response was:

RequestError: Error: connect ECONNREFUSED 127.0.0.1:1234

It does this 3 times and then gives up. I've not got anything else running on port 1234, and it runs absolutely fine on my colleagues machine.

The command I'm running is:

npx cypress run --record --key {record-key}

I've been through the Cypress docs for setting up Dashboard access, and besides setting up the project in Dashboard, and setting the Record Key and Project ID, there's no other setup I can see that's needed to get it running.

Only thing I've noticed is it very consistently is trying to hit :1234, but I'm not sure if that's notable at all. Has anyone got suggestions for stuff I may have setup on my local machine that might be blocking this?

I've also checked my HOSTS file, not seen anything obvious in there. Don't think I've actually made any amendments myself in there either, seems like Kubernetes has just added an address. Any suggestions of things I can look at or try would be greatly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source