-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vistit: Retry on ENOTFOUND errors #4424
Comments
We recently implemented automatic retrying of
@flotwig We mention that we retried the You can implement rerunning the commands/tests when they fail using the I'm afraid this is all we can recommend in this situation. |
We initially left out retrying on ENOTFOUND because we thought this scenario didn't exist in the wild (flaky DNS???), but it can definitely be added. |
Cool thank you @flotwig! To be honest I'm not entirely sure why we have this issue. But it happens when our CI deploys an ephemeral to test against. We do wait until the deployment is ready before starting the Cypress tests but sometimes we still get this intermittent ENOTFOUND error. Maybe the record is not yet propagated everywhere. Anyway, if Cypress could just retry when we get this error it would be a quick fix for us. |
Actually found another instance of this DNS flakiness, so I guess it's not as rare as we thought: #1755 |
The code for this is done in cypress-io/cypress#4459, but has yet to be released. |
Released in |
This issue will be closed to further comment as the exact issue here was resolved and tested. @pardeeprj90 If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Current behavior:
When using
cy.vistit
, if the DNS fails to resolve, we get:Error: getaddrinfo ENOTFOUND
Example:

Desired behavior:
In our CI, the DNS is sometimes flaky. Unfortunately, we can't really fix that yet. So it would be nice if cypress offered a way to retry the
visit
command when we get this kind of errors.Versions
cypress@3.3.1
The text was updated successfully, but these errors were encountered: