Cypress, cy.visit() failed trying to load ESOCKETTIMEDOUT

Viewed 3829

works on www.github.com

cy.visit() failed trying to load ESOCKETTIMEDOUT

but not on other websites

enter code here

4 Answers

In my case some time was needed until web application boots for the first time. And in that case I got ESOCKETTIMEDOUT. It is a bit different than request can be made and waiting for response. I had to add following timeout

cy.visit('http://my.site.to.test', { responseTimeout: 120000 });

In my case I was using several services through docker-compose and I needed to wait for my frontend to be up before starting my Cypress tests

Related