You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-03-21] [$250][HIGH] Xero – Can’t enable 2FA after relogin if Xero connection is active #48208
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: v9.0.25-13 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/4899502 Email or phone of affected tester (no customers):ponikarchuks+128824@gmail.com Issue reported by: Applause Internal Team
@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Please re-state the problem that we are trying to solve in this issue.
Validate account page shows not found after relogin.
What is the root cause of that problem?
From the video, we can see that we open the 2FA page while the app is still loading (and it looks like it loads infinitely on the video). We can replicate this by using "Clear cache and restart".
When the app is still loading, we don't have the user information yet, so the validated condition is false at this point and a message to validate the account will be shown.
I believe it's the first issue since we don't know yet whether the user is already validated or not, but we still show the message asking the user to validate their account.
Next, when the user presses the "verify your account here", it will navigate to the contact method details page passing the user email from the loginList object.
changed the title [-]Xero – Can’t enable 2FA after relogin if Xero connection is active[/-][+][$250] Xero – Can’t enable 2FA after relogin if Xero connection is active[/+]on Sep 3, 2024
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] 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:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production
2b. Reported on staging (deploy blocker)
2c. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] 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: New feature
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
[User A] Connect Xero to a WS
[User A] Invite User B to WS as an admin
[User B] Sign in into the app
[User B] Verify a prompt to enable 2FA is shown
[User B] Press on Enable two-factor authentication
[User B] Verify you are not promoted to validate the account
@JmillsExpensify My solution was initially accepted and I was assigned and created a PR before, but the requirements changed afterward and other solution was implemented. There's a merged PR, which was created after mine, used the same solution I originally proposed.
According to this comment, I think I should be eligible for payment here as well.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Aug 28, 2024
Triggered auto assignment to @johncschuster (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.IuliiaHerets commentedon Aug 28, 2024
@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
bernhardoj commentedon Aug 29, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Validate account page shows not found after relogin.
What is the root cause of that problem?
From the video, we can see that we open the 2FA page while the app is still loading (and it looks like it loads infinitely on the video). We can replicate this by using "Clear cache and restart".
When the app is still loading, we don't have the user information yet, so the validated condition is false at this point and a message to validate the account will be shown.
App/src/pages/settings/Security/TwoFactorAuth/Steps/CodesStep.tsx
Line 41 in fbc6720
App/src/pages/settings/Security/TwoFactorAuth/Steps/CodesStep.tsx
Line 133 in fbc6720
I believe it's the first issue since we don't know yet whether the user is already validated or not, but we still show the message asking the user to validate their account.
Next, when the user presses the "verify your account here", it will navigate to the contact method details page passing the user email from the
loginListobject.App/src/components/ValidateAccountMessage.tsx
Lines 43 to 45 in fbc6720
However,
loginListis also not available yet while the app is loading. So, the value is undefined, thus a not found contact method page is shown.What changes do you think we should make in order to solve the problem?
To address the first issue, we can show a loading screen when the user data is not available yet.
For the
loginListissue, there are several options. First, we can also show the loading screen if it's empty, so the code becomes:Or, we can hide the "verify your account here" text if
loginListis not available.App/src/components/ValidateAccountMessage.tsx
Lines 40 to 49 in fbc6720
Or, we can take the login from
session.email(or credentials.login or account.primaryLogin)melvin-bot commentedon Sep 3, 2024
@johncschuster Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Sep 3, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0199165fd987545c87
[-]Xero – Can’t enable 2FA after relogin if Xero connection is active[/-][+][$250] Xero – Can’t enable 2FA after relogin if Xero connection is active[/+]melvin-bot commentedon Sep 3, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (
External)106 remaining items
johncschuster commentedon Mar 14, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
johncschuster commentedon Mar 20, 2025
Payment Summary
Contributor: @bernhardoj owed $250 via NewDot
Contributor+: @dukenv0307 paid $250 via Upwork after regression window ✅
@dukenv0307 can you complete the BZ Checklist above? Once done and the regression window has passed, I will issue payment. Thanks!
dukenv0307 commentedon Mar 21, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: New feature
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Do we agree 👍 or 👎
johncschuster commentedon Mar 21, 2025
Payment has been issued to @dukenv0307 via Upwork. @bernhardoj, please request payment via NewDot!
Payment Summary here
bernhardoj commentedon Mar 21, 2025
Requested in ND.
JmillsExpensify commentedon Mar 24, 2025
$250 approved for @bernhardoj
daledah commentedon Mar 26, 2025
@JmillsExpensify My solution was initially accepted and I was assigned and created a PR before, but the requirements changed afterward and other solution was implemented. There's a merged PR, which was created after mine, used the same solution I originally proposed.
According to this comment, I think I should be eligible for payment here as well.
cc @dukenv0307
dukenv0307 commentedon Mar 27, 2025
@JmillsExpensify I think in this case we should pay @daledah as well
I'm not sure if the bounty can be down
JmillsExpensify commentedon Apr 8, 2025
Payment summary: $250 @daledah via Upwork.
daledah commentedon Apr 10, 2025
Thanks @JmillsExpensify, I accepted the Upwork offer