Add workaround to retry waitFor
until it is success or retry count is 0
#1469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
We're allowing retries on
waitFor
when the following errors occur whenwaitFor
is waiting:To prevent a stack overflow, it will retry for a maximum of 20 times before failing. In my tests i've seen the retry count drop from 20 to 12 at most. I feel 20 is a safe number that shouldn't be reached in normal SSO login flows. I want to avoid using a larger retry count to force us to fix this permanently asap.
Why?
This PR fixes an issue where
waitFor
fails to wait while the underlying page it is waiting on is navigating. A common scenario where we might see this is during a login/logout flow using SSO. The initial page will be redirected multiple times until we get to the desired page/state.Checklist
Related PR(s)/Issue(s)
Updates: #1472