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-06-19] [$1000] Web - Sign in - Blank screen instead of 'Abracadabra, you are signed in!' for 2FA account #20136

Closed
1 of 6 tasks
kbecciv opened this issue Jun 3, 2023 · 24 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 Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented Jun 3, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found when executing PR #19260

Action Performed:

  1. Go to Sign in page and enter the email of an account with 2FA enabled and click next
  2. Open received email, and copy magic sign in link (locally this link needs to be switched to use localhost)
  3. Paste this link in a new tab & press enter
  4. Observe that 'Two-factor authentication required' page is displayed
  5. Go to the tab where you were signing in, which should have moved on to 2FA code
  6. Enter the 2FA code
  7. Verify that user is signed in
  8. Shift to the tab where 'Two-factor authentication required' page is displayed

Expected Result:

Observe that it should now show 'Abracadabra, you are signed in!'

Actual Result:

Blank screen is displayed instead of 'Abracadabra, you are signed in!'

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.23.6

Reproducible in staging?: yes

Reproducible in production?: no

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

Bug6079302_video_49__3_.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

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

melvin-bot bot commented Jun 3, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 3, 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

@hungvu193
Copy link
Contributor

hungvu193 commented Jun 4, 2023

Proposal

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

Web - Sign in - Blank screen instead of 'Abracadabra, you are signed in!' for 2FA account

What is the root cause of that problem?

Problem came from here:

const is2FARequired = lodashGet(this.props, 'account.requiresTwoFactorAuth', false);
const isSignedIn = Boolean(lodashGet(this.props, 'session.authToken', null));
const currentAuthState = this.getAutoAuthState();
return (
<>
{currentAuthState === CONST.AUTO_AUTH_STATE.FAILED && <ExpiredValidateCodeModal />}
{currentAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && is2FARequired && !isSignedIn && <TfaRequiredModal />}
{currentAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && isSignedIn && <AbracadabraModal />}
{currentAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && !isSignedIn && (
<ValidateCodeModal
accountID={this.getAccountID()}
code={this.getValidateCode()}
/>
)}
{currentAuthState === CONST.AUTO_AUTH_STATE.SIGNING_IN && <FullScreenLoadingIndicator />}
</>

And here:
if (isSignedIn || !login) {
return;
}

After opening the link, the user is signed in with Session.signInWithValidateCode(this.getAccountID(), this.getValidateCode(), this.props.preferredLocale); and after that,currentAuthState turned into just-signed-in and with the user that doesn't have 2FA Required, all the conditions in the render() function are now false, so we will see the blank page.

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

I think in case user are already signed in, we should redirect them to the Report route instead of return.

componentDidmount() {
      // other code above
        if ((isSignedIn || !login) && !lodashGet(this.props, 'account.requiresTwoFactorAuth', false)) {
            // redirect user to LHN if they are already logged in and they don't have 2FA required.
            Navigation.navigate(ROUTES.REPORT);
            return;
        }

 // The user has initiated the sign in process on the same browser, in another tab.
        Session.signInWithValidateCode(this.getAccountID(), this.getValidateCode(), this.props.preferredLocale);

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot
Copy link

melvin-bot bot commented Jun 4, 2023

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jun 5, 2023
@melvin-bot melvin-bot bot changed the title Web - Sign in - Blank screen instead of 'Abracadabra, you are signed in!' for 2FA account [$1000] Web - Sign in - Blank screen instead of 'Abracadabra, you are signed in!' for 2FA account Jun 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0119247f265de126ed

@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

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

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

melvin-bot bot commented Jun 5, 2023

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

@aidear3
Copy link

aidear3 commented Jun 5, 2023

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01b7fc496875b2b3dd

@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@cristipaval cristipaval added the Internal Requires API changes or must be handled by Expensify staff label Jun 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

Current assignee @allroundexperts is eligible for the Internal assigner, not assigning anyone new.

@cristipaval cristipaval removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Jun 5, 2023
@cristipaval
Copy link
Contributor

Taking this one over as it affects a critical flow in the App.

@cristipaval cristipaval self-assigned this Jun 5, 2023
@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jun 5, 2023
@Kazuya-san
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01ab900e15a424e2ec

@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 12, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Sign in - Blank screen instead of 'Abracadabra, you are signed in!' for 2FA account [HOLD for payment 2023-06-19] [$1000] Web - Sign in - Blank screen instead of 'Abracadabra, you are signed in!' for 2FA account Jun 12, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.26-4 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-06-19. 🎊

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
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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 Jun 12, 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:

  • [@allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@allroundexperts] 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:
  • [@allroundexperts] 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:
  • [@allroundexperts] Determine if we should create a regression test for this bug.
  • [@allroundexperts] 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.
  • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@lschurr
Copy link
Contributor

lschurr commented Jun 15, 2023

@chiragsalian @cristipaval - is there anyone to pay for this job?

@cristipaval
Copy link
Contributor

@allroundexperts should be paid for the review

@lschurr
Copy link
Contributor

lschurr commented Jun 20, 2023

@allroundexperts - Could you apply for the job in Upwork? https://www.upwork.com/jobs/~0119247f265de126ed

@allroundexperts
Copy link
Contributor

@allroundexperts - Could you apply for the job in Upwork? https://www.upwork.com/jobs/~0119247f265de126ed

Applied. Thanks!

@lschurr
Copy link
Contributor

lschurr commented Jun 20, 2023

Offer sent!

@lschurr
Copy link
Contributor

lschurr commented Jun 20, 2023

Paid. Closing!

@lschurr lschurr closed this as completed Jun 20, 2023
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 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

8 participants