Skip to content

[HOLD for payment 2023-08-16] [$1000] Web - The "Invalid Two Factor Authentication code" error from the 2FA page is also displayed on the contact methods page even without entering any code #23592

Closed

Description

@kbecciv

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:

. Go to Settings > Security > Two-factor authentication.
2. Click on "Copy" and proceed to the next step.
3. Enter an incorrect number for Two Factor Authentication.
4. Now go to the Profile > Contact methods.
5. Add a new contact method.
6. Notice that the "Invalid Two Factor Authentication code" error from the 2FA page is displayed on the contact methods page without entering any code

Expected Result:

The "Invalid Two Factor Authentication code" error should not be displayed on the contact methods page when adding a new contact method

Actual Result:

The "Invalid Two Factor Authentication code" error from the 2FA page is also displayed on the contact methods page without entering any code

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.45.3
Reproducible in staging?: y
Reproducible in production?: y
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

screen-recording-2023-07-25-at-124605-am_d5KvKWgm.mp4
Recording.3907.mp4

Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690228883804299

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017b2ef3498aa199c3
  • Upwork Job ID: 1686807446598131712
  • Last Price Increase: 2023-08-02

Activity

  1. added
    Daily
    Bug
    on Jul 25, 2023
  2. melvin-bot commented on Jul 25, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jul 25, 2023

    @melvin-bot

    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
  4. huzaifa-99 commented on Jul 25, 2023

    @huzaifa-99
    Contributor

    Proposal

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

    We want the invalid 2FA code error msg to not appear on the contact methods page when the error was previously set by the security/2FA/Verify page

    What is the root cause of that problem?

    Unlike the security/2FA/Verify page, we are not clearing the 2FA error when we visit the contact methods verify page.

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

    We should clear the account errors when we visit the contacts method verify page, like this

    componentDidMount() {
        Session.clearAccountMessages();
    }

    What alternative solutions did you explore? (Optional)

    N/A

  5. alexpensify commented on Jul 29, 2023

    @alexpensify
    Contributor

    I ran out of time on Thursday and was OOO yesterday. I'll try to review it over the weekend.

  6. alexpensify commented on Aug 1, 2023

    @alexpensify
    Contributor

    Not overdue - still on my testing lists

  7. added
    External
    on Aug 2, 2023
  8. changed the title [-]Web - The "Invalid Two Factor Authentication code" error from the 2FA page is also displayed on the contact methods page even without entering any code[/-] [+][$1000] Web - The "Invalid Two Factor Authentication code" error from the 2FA page is also displayed on the contact methods page even without entering any code[/+] on Aug 2, 2023
  9. melvin-bot commented on Aug 2, 2023

    @melvin-bot
  10. 36 remaining items

  11. dukenv0307 commented on Aug 15, 2023

    @dukenv0307
    Contributor

    @dangrous @ArekChr Is this a valid bug

    1. Open two tabs
    2. In tab 1, go to setting > security > Two-factor authentication, click on copy or download to go to the next step
    3. Enter wrong magic code
    4. In tab 2, go to profile page > contact method, and click on the second contact method that isn't verified
    5. In tab 1, The error is cleared because we clear account message in BaseValidateCodeForm
    Screencast.from.15-08-2023.16.53.45.webm

    If it is a valid bug, I think we shouldn't show account error here instead of clear this error in BaseValidateCodeForm because when we verify the contact method, I don't think we have the case to return account error.

    formError.validateCode ? props.translate(formError.validateCode) : ''
    

    errorText={formError.validateCode ? props.translate(formError.validateCode) : ErrorUtils.getLatestErrorMessage(props.account)}

  12. dangrous commented on Aug 16, 2023

    @dangrous
    Contributor

    I personally don't think this is a valid bug, the two tabs situation is a very edge case, and either way they would have to re-enter the 2FA code on the setup pane anyway, so I think it's probably fine.

    I'm not sure if we have a particular stance on this, but that's mine. I also posted on this related bug here

  13. alexpensify commented on Aug 16, 2023

    @alexpensify
    Contributor

    @dangrous do we need to hold the payment here because of regression or good to go with the next steps?

  14. huzaifa-99 commented on Aug 17, 2023

    @huzaifa-99
    Contributor

    We already discussed this here and here before the PR

    but this will happen regardless of where we do Session.clearAccountMessages()

    • If the contact or 2FA auth page has some errors and in a new tab we visit the contact page, the errors on the 2FA page will be cleared as well.

    and landed on a conclusion that its fine

    Yeah I was wondering about that, using clearAccountMessages() is pretty broad - I'm not sure it's intentional, per se, but I don't think it's something we need to be concerned about here since it's a pattern we're copying.

    Also, we are doing the reverse i.e clearing errors on the 2FA page that would clear the error on contact verification page, this was even before the PR. I don't think this is a regression or a bug.

  15. dangrous commented on Aug 18, 2023

    @dangrous
    Contributor

    Yeah I think we don't need to hold/affect payment

  16. alexpensify commented on Aug 18, 2023

    @alexpensify
    Contributor

    Thanks, I'll start working on the payment process.

  17. alexpensify commented on Aug 18, 2023

    @alexpensify
    Contributor

    Here is the payment summary:

    • External issue reporter - @ayazhussain79 $250
    • Contributor that fixed the issue - @huzaifa-99 $1500
    • Contributor+ that helped on the issue and/or PR - @ArekChr Payment via Callstack

    Upwork Job: https://www.upwork.com/jobs/~017b2ef3498aa199c3

    *If applicable, the bonuses will be applied on the final payment

    Extra Notes regarding payment: There is an urgency bonus here

  18. ayazhussain79 commented on Aug 18, 2023

    @ayazhussain79
    Contributor

    @alexpensify Offer accepted, Thank you

  19. alexpensify commented on Aug 18, 2023

    @alexpensify
    Contributor

    Offers have been sent out and I've completed the payment process for @ayazhussain79

  20. huzaifa-99 commented on Aug 18, 2023

    @huzaifa-99
    Contributor

    Accepted, Thank @alexpensify

  21. alexpensify commented on Aug 21, 2023

    @alexpensify
    Contributor

    I've completed the payment process in Upwork. Please confirm that you received it. Thanks!

  22. huzaifa-99 commented on Aug 21, 2023

    @huzaifa-99
    Contributor

    @alexpensify I have received it. Thanks

  23. alexpensify commented on Aug 21, 2023

    @alexpensify
    Contributor

    Ok, I need to create the regression test request and then can close out this GH

  24. alexpensify commented on Aug 24, 2023

    @alexpensify
    Contributor

    Closing - the regression test GH has been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugExternalWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions