Closed kieha closed 6 years ago
@mikemurray sounds like react router? however, we've had a similar behavior when the guest logins in the past as well... where you see "oops your cart is empty" right after login, and then the cart loads..
@aaronjudd @kieha The part about there being no error on wrong credentials was happening before React Router.
The second part is most likely React Router. When signing in the routes are re-rendered with updated permissions, and there's a moment where you have no permissions until the subscription is updated.
This update on login is how it used to work with Flow Router. We may have to think of a better approach for React Router.
@mikemurray @kieha is this still a valid issue in 1.3.0?
@aaronjudd I've just tried reproducing it on 1.3.0 and it still happens, but the unauthorized
page no longer shows up.
Update I found this to be cause by the login component here being re-mounted when the sign in button is clicked. So when you click with the wrong credentials it tries to set the state with form errors when the component has already unmounted, and by the time it has mounted again, the form errors are no more in state to set. Not sure what exactly is causing it to be unmounted and mounted again. I am pausing on this to finish up my other task on foray.
@awadesmoline is this in progress?
Yeah @aaronjudd, got stumped, but I'm getting back on it now since I finished up other tasks.
This is very much still happening. In fact, I can't register as a new user at all.
Might be related to: https://github.com/reactioncommerce/reaction/issues/2931
@zenweasel this should be reviewed, and prioritized in for @reactioncommerce/community
Can't reproduce scenario B. Works as expected when signing in or registering as new user. During user creation/login, the screen gets white for a couple of seconds, but aside from that, it works ok.
Bug description for scenario A still holds true partially. When entering wrong credentials, the Unauthorized
template is not shown any more, but there's still no error message displayed.
Moved to Ready
via : https://github.com/reactioncommerce/reaction/pull/3664
Was merged. Going to close.
This happens when logging in/signing up on the checkout panel.
Expected behavior
Scenario A
When logging in/signing up and I have entered the wrong credentials, an error message should pop up on the form.
Scenario B
When logging in/signing up and I have the correct credentials, I should be redirected back to the checkout panel immediately to continue filling out the checkout steps.
Actual Behavior
Scenario A
When logging in/signing up and I have entered the wrong credentials, the
Unauthorized
page pops up for a moment, then redirects back to the checkout page without displaying the error message on the form.Scenario B
When logging in/signing up and I have the correct credentials, the
Unauthorized
page pops up for a moment, then theYour cart is empty
page displays, then finally it redirects back to the checkout page.Steps to Reproduce the Behavior
Versions
Node: 6.2.2 NPM: 3.10.9 Meteor Node: 4.8.2 Meteor NPM: 4.5.0 Reaction CLI: 0.8.3 Reaction: 1.2.0 Reaction branch: development Docker: 1.13.0