You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the request fails before receiving data, wait 5s before retrying once. It looks like Chrome retries with a backoff of 30 seconds each time, but we likely don't want to wait this long - just try 3 times with the user's commandTimeout between each
test received GET / +0ms
test received GET / +34ms
test received GET / +5s
test received GET / +30s
test received GET / +1m
If the request fails after receiving headers but before data is sent (second case), the behavior is the same as above, so we should do the same:
test received GET / +0ms
test received GET / +37ms
test received GET / +5s
test received GET / +30s
test received GET / +1m
If the request ends mid-body, Chrome doesn't retry or consider it an error:
test received GET / +0ms
XHRs
In all 3 cases, Chrome does not automatically retry a failed GET XHR:
test received GET / +0ms
Chrome will also not automatically retry a failed POST XHR:
test received POST / +0ms
Conclusion
Implement automatic retries on cy.visit() network errors before body is received, try 3 times with commandTimeout wait each time
Same for cy.request()
Retry baseurl check 3x, with backoff of 1s, 2s, 2s
Pass through network errors so Chrome's normal retry behavior kicks in too
The text was updated successfully, but these errors were encountered:
The code for this is done in cypress-io/cypress#4015, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
We should automatically retry some operations for the user, to mimic the behavior of a normal Chrome action.
The following code was used to test the scenarios against a real Chrome instance:
Page visits
commandTimeout
between eachXHRs
Conclusion
cy.visit()
network errors before body is received, try 3 times withcommandTimeout
wait each timecy.request()
The text was updated successfully, but these errors were encountered: