-
Notifications
You must be signed in to change notification settings - Fork 115
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
FIX Don't cause invariant violations #1015
FIX Don't cause invariant violations #1015
Conversation
if (window.ss.apolloClient.queryManager.fetchQueryRejectFns.size > 0 && numAttempts < 3) { | ||
setTimeout(() => { | ||
resetStores(numAttempts + 1); | ||
}, 200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, 200); | |
}, 500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we increase to half a second. With 200ms I still see Error in browser console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see the error every time with this set to 200ms?
It's already trying 200ms three times - as the comment notes, if it takes longer than that (i.e. > 600ms total) then there's a higher chance of causing issues than resolving them by doing this, because by that time the user is likely interacting with the UI again.
Ultimately the console error doesn't seem to result in any actual problems being caused, so if it still shows up in the console sometimes it's not the end of the world.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this error in console after 3rd attempt when I save or publish page and ElementalArea is refreshing. I tested it a few times with different time value and it fails on 200, 300 and 400ms, but not on 500ms.
If you say, that increasing time could be a cause of another issue, so we can add this code, but it doesn't solve this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think increasing the timestep is an option for the reasons I've mentioned.
If this is always failing for you with the 200ms timestep then this PR is not a valid improvement and should be closed, and the ticket put back in the backlog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll close it before we can find a better solution.
CLOSE. Error is still in browser console. |
Parent issue