Cypress error - cy.visit() failed trying to load: ECONNREFUSED 127.0.0.1:4200

223 Views Asked by At

Cypress can't load my application anymore. I'm able to visit the site locally. Here's what I've already tried but didn't work:

  • Adding headers: { "Accept-Encoding": "gzip, deflate" } as a second argument to cy.visit()
  • Adding a timeout as a second argument to cy.visit()
  • Changing the Cypress base url from 'http://localhost:4200' to 'http://127.0.0.1:4200'
  • Upgrading to the from Cypress 13.3.0 to the latest version 13.3.3
  • Removing the node_modules folder and installing the dependencies again

Here is what it looks like when I run the test while the url works if I open it manually:

enter image description here

0

There are 0 best solutions below