Skip to content
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

[HOLD for payment 2023-07-17] [$1000] Web - Log in - Inconsistency between signin button and 2FA button #20848

Closed
1 of 6 tasks
kbecciv opened this issue Jun 15, 2023 · 30 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jun 15, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to settings -> security -> 2FA
  2. Copy/ download codes and continue
  3. Meanwhile download the authenticator application. Now, Scan the QR.
  4. Now type the generated code.
  5. Notice that the "loading sign along with the next button" is displayed as disabled before moving to the next page. ( even when the correct code is typed)
  6. However, if similar steps are followed (i.e after typing magic code ) on the signing page, "the loading bar on sign-in button" is shown enabled.

Expected Result:

Consistency between the buttons. i.e. after typing the correct magic code on singin page or the 2FA code on the authentication page, buttons should either be enabled or disabled on both pages.

Actual Result:

Next button on authentication page is shown disabled before moving to next page, even when the correct 2FAcode is entered.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.28.3

Reproducible in staging?: yes

**Reproducible in production?:**yes

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Untitled_trimmed.1.mov
Recording.725.mp4

Expensify/Expensify Issue URL: @ashimsharma10

Issue reported by: https://expensify.slack.com/archives/C049HHMV9SM/p1686219682890139

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b8ad74604f91854d
  • Upwork Job ID: 1671877459838341120
  • Last Price Increase: 2023-06-29
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 15, 2023

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 15, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Overdue label Jun 19, 2023
@johncschuster
Copy link
Contributor

I don't think this behavior is a bug. I've asked in Slack to get a second opinion.

@melvin-bot melvin-bot bot removed the Overdue label Jun 20, 2023
@johncschuster
Copy link
Contributor

Bumped my thread since I didn't get any responses.

@johncschuster johncschuster changed the title Web - Log in - Inconsistency in between signing button versus 2FA button Web - Log in - Inconsistency between signin button and 2FA button Jun 22, 2023
@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Jun 22, 2023
@melvin-bot melvin-bot bot changed the title Web - Log in - Inconsistency between signin button and 2FA button [$1000] Web - Log in - Inconsistency between signin button and 2FA button Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01b8ad74604f91854d

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Current assignee @johncschuster is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@tienifr
Copy link
Contributor

tienifr commented Jun 23, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Web - Log in - Inconsistency between signin button and 2FA button

What is the root cause of that problem?

<Button
success
text={props.translate('common.next')}
isDisabled
isLoading={props.account.isLoading}
/>

We're putting isDisabled to Button. But I think we shouldn't do that because the disabled button is worthless

What changes do you think we should make in order to solve the problem?

In BaseTwoFactorAuthForm, use useImperativeHandle and forwardRef to let the parent (VerifyPage) use validateAndSubmitForm function. Edit the validateAndSubmitForm function a bit to blur the input if we press next button.

In VerifyPage, remove isDisabled and call validateAndSubmitForm if user press next button

                        onPress={()=>{
                            ref.current.validateAndSubmitForm()
                        }}

Result

Screen.Recording.2023-06-23.at.12.39.10.mov

What alternative solutions did you explore? (Optional)

Remove 2FA button in VerifyPage

@melvin-bot melvin-bot bot added the Overdue label Jun 23, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jun 26, 2023

Thanks @tienifr, for the proposal.

I'm not sure using useImperativeHandle feels over-engineered. Why can't we move the button to BaseTwoFactorAuthForm and fix the positioning?

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@tienifr
Copy link
Contributor

tienifr commented Jun 26, 2023

@mollfpr Yeah, I tried it but the BaseTwoFactorAuthForm is placed in ScrollView and we want the next button stays outside the ScrollView to show it even on the small screen height. And I don't see any places on our code that we put FixedFooter stays inside ScrollView. That why I want to use useImperativeHandle, and we also used it in other pages

@mollfpr
Copy link
Contributor

mollfpr commented Jun 28, 2023

I tried it but the BaseTwoFactorAuthForm is placed in ScrollView and we want the next button stays outside the ScrollView to show it even on the small screen height. And I don't see any places on our code that we put FixedFooter stays inside ScrollView.

Okay that makes sense

That why I want to use useImperativeHandle, and we also used it in other pages

@tienifr Could you give an example of which page it is?

@tienifr
Copy link
Contributor

tienifr commented Jun 28, 2023

@mollfpr Here you are

useImperativeHandle(props.innerRef, () => ({

In MagicCodeInput, we're using useImperativeHandle

@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

@johncschuster @mollfpr 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!

@mollfpr
Copy link
Contributor

mollfpr commented Jun 30, 2023

Sorry for the delay @tienifr 🙏

I'm okay with useImperativeHandle and I don't see any drawback for now. @johncschuster the proposal looks good to me 🚀

🎀 👀 🎀 C+ reviewed!

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account 🎉

Contributor - [$1000] Web - Log in - Inconsistency between signin button and 2FA button Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jul 3, 2023

@tienifr Let me know when the PR is ready. Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jul 3, 2023
@tienifr
Copy link
Contributor

tienifr commented Jul 3, 2023

@mollfpr I'm working on it. The PR will be ready in 1 to 2 hours

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 4, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Log in - Inconsistency between signin button and 2FA button [HOLD for payment 2023-07-17] [$1000] Web - Log in - Inconsistency between signin button and 2FA button Jul 10, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.38-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-07-17. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter - @ashimsharma10
  • Contributor that fixed the issue - @tienifr
  • Contributor+ that helped on the issue and/or PR - @mollfpr
    Note for BZ: the issue is not eligible for a bonus -JS

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@mollfpr] Determine if we should create a regression test for this bug.
  • [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 17, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jul 18, 2023

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:

#18576

[@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

https://github.com/Expensify/App/pull/18576/files#r1266234798

[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

The regression test should be enough.

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

  1. Open the App and go to Settings -> Security -> Two-factor authentication
  2. Copy / download codes to continue
  3. Keep the input empty and press the Next button
  4. Verify that the next button is pressable and the error validation is shown "Please enter your two-factor authentication code"
  5. Put less than 6 digits to the input and press the Next button
  6. Verify that the next button is pressable and the error validation is shown "Incorrect two-factor authentication code. Please try again."
  7. Now put the correct code from your authenticator app
  8. Verify that it automatically submit the form and moves you to the next page
  9. 👍 or 👎

@johncschuster
Copy link
Contributor

@ashimsharma10 I've just sent you an invite on Upwork. Can you please accept the job?

@johncschuster
Copy link
Contributor

Payment has been issued to @tienifr and @mollfpr. I'll get the regression test issue going shortly.

@ashimsharma10
Copy link

@johncschuster Accepted . Waiting for payment

@melvin-bot melvin-bot bot added the Overdue label Jul 21, 2023
@johncschuster
Copy link
Contributor

Thanks, @ashimsharma10! Payment has been issued.

I'll get the regression steps in a GH on Monday and we can close this out.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

@AndrewGable, @johncschuster, @mollfpr, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@johncschuster
Copy link
Contributor

Summary of payment issued:
External issue reporter - @ashimsharma10 - $250
Contributor that fixed the issue - @tienifr - $1000
Contributor+ that helped on the issue and/or PR - @mollfpr - $1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants