-
Notifications
You must be signed in to change notification settings - Fork 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
[$125] mWeb - 2FA - In 2FA magic code page, after refresh briefly error message is displayed #54009
Comments
Triggered auto assignment to @OfstadC ( |
Edited by proposal-police: This proposal was edited at 2024-12-12 13:36:14 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.2FA - In 2FA magic code page, after refresh briefly error message is displayed What is the root cause of that problem?When the page is refreshed while there were error previously the error will only be cleared after the server response of the resend validate code requested here App/src/components/ValidateCodeActionModal/index.tsx Lines 44 to 50 in 9603c2f
so it will take a while to get cleared What changes do you think we should make in order to solve the problem?We should clear errors on mount (or unmount/ App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 177 to 185 in 9603c2f
We can do that in BaseValidateCodeForm for more general fix like:
Optionally, we might also similarly clear the error here too so that the error will be cleared immediately instead of waiting for BE response on pressing Alternatively, we can clear the errors on mount or before sendValidateCode here
Despite the claim by the below proposal here is a demo that clearing error on mount approach works well on mobile:2024-12-12.17-44-00.mp4What alternative solutions did you explore? (Optional)We can also consider clearing errors on |
ProposalPlease re-state the problem that we are trying to solve in this issue.In 2FA magic code page, after refresh briefly error message is displayed What is the root cause of that problem?On reload page we need to wait for API call response to clear the errors What changes do you think we should make in order to solve the problem?Clear the errors on mount and on unmount using
And only allow to show error if
App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Line 193 in c2285e6
App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 217 to 218 in c2285e6
App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Line 262 in c2285e6
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)N/A |
Edited by proposal-police: This proposal was edited at 2024-12-12 16:40:23 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.In 2FA magic code page, after refresh briefly error message is displayed What is the root cause of that problem?We sent an incorrect magic code to the API, which responds with
When refreshing the 2FA page, the What changes do you think we should make in order to solve the problem?The App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Line 74 in 6a5e1fb
Add this code to check validate code valid in const isValidateCodeValid = !!validateCode.trim() || !!ValidationUtils.isValidValidateCode(validateCode); App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Line 262 in 6a5e1fb
To errors={isValidateCodeValid ? validateError : undefined} App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Line 218 in 6a5e1fb
To hasError={!isEmptyObject(isValidateCodeValid ? validateError : undefined)} POCScreen.Recording.2024-12-12.at.23.38.05.movTest branchWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?This is UI bug no need the test What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
I'm currently OoO - but will be back on Tuesday - Reassigning to get the ball rolling, but happy to take back on Tuesday |
Triggered auto assignment to @michaelkwardrop ( |
|
Job added to Upwork: https://www.upwork.com/jobs/~021867646284163514204 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb ( |
@dominictb please attempt reproduction and review the above proposals - thanks! |
Will review tomorrow morning. |
@OfstadC, @dominictb, @michaelkwardrop Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@dominictb lmk if this needs to wait until the new year! 🎄 |
on it now, I'm just stuck on other PR |
@nyomanjyotisa's proposal looks promising. Onyx update is the async action and calling func in did-mount happens after rendering the component. So using But I just wonder:
|
@dominictb Could you review my proposal? thanks |
@dominictb Why are we even considering a problem that is hypothetical raised linked to other PR. I have uploaded a video on my proposal as POC that the problem @nyomanjyotisa is claiming doesn't even exist. The approach I am suggesting is used in other places in our code base such as here here @nyomanjyotisa proposal is my proposal plus a solution for a problem that doesn't even exist from my testing. BTW useOnyx is late in loading data I remember issues arising when withFullTransactionOrNotFound HOC was migrated to use useOnyx from withOnyx and transaction was being undefined on useEffects run on render that used to work well with withOnyx and regarding the pr comment linked by @nyomanjyotisa you can see that the migration commit was made later. It might be because we are getting the error data from useOnyx that I am not reproducing the issue he is claiming so we need to make sure that the problem is real in our situation before applying unnecessary workaround solution. |
@huult Dismissing the error is the common technique we're using in the App so we should do the same. |
@FitseTLT Here's the flow:
The question here is: how do you ensure the validateError is not shown in step 2? BTW we faced this issue before here, so we need to avoid it. If you can prove the issue doesn't happen anymore (by plain text not just record the video), I'll consider the decision again. Thanks 🙏 |
I am not saying my video should be taken as evidence but if you guys are sure the problem can also happen here give me a proof otherwise what is the point of applying a workaround solution for an edge case problem that's not even there.
|
It doesn't really convince me. Can you show me the code? |
@dominictb Just proceed with your review and let the assigned engineer decide whether we should apply a fix for an invisible bug or not 👍 |
@OfstadC @dominictb @michaelkwardrop this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@OfstadC, @dominictb, @michaelkwardrop Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@OfstadC, @dominictb, @michaelkwardrop 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
@OfstadC, @dominictb, @michaelkwardrop Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
@OfstadC, @dominictb, @michaelkwardrop 10 days overdue. I'm getting more depressed than Marvin. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: V9. 0.75-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Issue reported by: Applause Internal Team
Device used: Redmi note 10s android 13
App Component: User Settings
Action Performed:
Pre-condition: Login with unverified gmail account
Expected Result:
In 2FA magic code page, after refresh briefly error message must not be displayed.
Actual Result:
In 2FA magic code page, after refresh briefly error message is displayed.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6691899_1733991788664.Screenrecorder-2024-12-12-13-48-04-520.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @dominictbThe text was updated successfully, but these errors were encountered: