works on www.github.com
cy.visit() failed trying to load ESOCKETTIMEDOUT
but not on other websites
enter code here
works on www.github.com
cy.visit() failed trying to load ESOCKETTIMEDOUT
but not on other websites
enter code here
from: https://github.com/cypress-io/cypress/issues/7062
increase timeout
cy.visit('https://github.com/', { timeout: 30000 })
For me was resolved by adding the following in the Cypress Config:
headers: { "Accept-Encoding": "gzip, deflate" }
That the entire test argument is:
it("", () => {
cy.visit(url, { headers: { "Accept-Encoding": "gzip, deflate" } });
});
#Ref: https://github.com/cypress-io/cypress/issues/7062#issuecomment-991427658
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