Skip to content

[Due for payment 2025-04-17] [$250] iOS - MC page appears briefly, blank recovery codes page when enabling 2FA via Xero option #58245

Closed

Description

@IuliiaHerets

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


Version Number: v9.1.11-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Exploratory
Email or phone of affected tester (no customers): applausetester+ck311255@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: iPhone 16/iOS 18.3.1
App Component: Workspace Settings

Action Performed:

Precondition: Account is not validated before from Security >> 2FA)

  1. Launch Hybrid app on iOS & log in
  2. Create a new Workspace
  3. Go to WS settings >> More Features >> Enable Accounting feature
  4. Go to Accounting page
  5. Select Xero option
  6. Click on Enable 2FA authentication button

Expected Result:

Magic code page should appear for unvalidated account when enabling 2FA via Xero option

Actual Result:

Magic code appears briefly & suddenly blank recovery codes is displayed when enabling 2FA via Xero

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/df82f34a-4d0e-4685-af5a-7b109d470fee
Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021901458894316675553
  • Upwork Job ID: 1901458894316675553
  • Last Price Increase: 2025-04-07
Issue OwnerCurrent Issue Owner: @RachCHopkins

Activity

  1. added
    Bug
    Daily
    on Mar 11, 2025
  2. melvin-bot commented on Mar 11, 2025

    @melvin-bot

    Triggered auto assignment to @RachCHopkins (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.

  3. bernhardoj commented on Mar 12, 2025

    @bernhardoj
    Contributor

    Proposal

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

    The validate code modal disappears when we access it from 2FA required modal.

    What is the root cause of that problem?

    When we don't have 2FA enabled, the 2FA required modal will show.

    {!is2FAEnabled && (
    <RequireTwoFactorAuthenticationModal
    onSubmit={() => {
    setIsRequire2FAModalOpen(false);
    Navigation.navigate(ROUTES.SETTINGS_2FA_ROOT.getRoute(ROUTES.POLICY_ACCOUNTING.getRoute(policyID), getXeroSetupLink(policyID)));
    }}

    When pressing the button, it will navigate to the 2FA page, but also shows a validate code modal if the user isn't validated yet.

    const [isValidateModalVisible, setIsValidateModalVisible] = useState(!isUserValidated);

    I remember we had some issues on iOS where opening a 2nd modal from another modal will fail. In this case, the modal isn't immediately shown after the 1st modal, but I guess it has the same underlying issue.

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

    So, to solve it, we can apply the same solution, that is to wait until the modal closes first using Modal.close.

    {!is2FAEnabled && (
    <RequireTwoFactorAuthenticationModal
    onSubmit={() => {
    setIsRequire2FAModalOpen(false);
    Navigation.navigate(ROUTES.SETTINGS_2FA_ROOT.getRoute(ROUTES.POLICY_ACCOUNTING.getRoute(policyID), getXeroSetupLink(policyID)));
    }}

    close(() => Navigation.navigate(ROUTES.SETTINGS_2FA_ROOT.getRoute(ROUTES.POLICY_ACCOUNTING.getRoute(policyID), getXeroSetupLink(policyID))));
    

    We can optionally do it if the user isn't validated yet, because if the user is already validated, there will be no validate code modal.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

  4. RachCHopkins commented on Mar 17, 2025

    @RachCHopkins
    Contributor

    Very clear to repro.

  5. added
    External
    on Mar 17, 2025
  6. changed the title [-]iOS - MC page appears briefly, blank recovery codes page when enabling 2FA via Xero option[/-] [+][$250] iOS - MC page appears briefly, blank recovery codes page when enabling 2FA via Xero option[/+] on Mar 17, 2025
  7. melvin-bot commented on Mar 17, 2025

    @melvin-bot
  8. added
    Help Wanted
    on Mar 17, 2025
  9. melvin-bot commented on Mar 17, 2025

    @melvin-bot

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

  10. 48 remaining items

  11. RachCHopkins commented on Apr 16, 2025

    @RachCHopkins
    Contributor

    @rojiphil was this a regression? I'm not sure who needs payment.

    Also, do we need a checklist?

  12. melvin-bot commented on Apr 17, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@RachCHopkins)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1901458894316675553/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  13. melvin-bot commented on Apr 22, 2025

    @melvin-bot

    @RachCHopkins Eep! 4 days overdue now. Issues have feelings too...

  14. rojiphil commented on Apr 22, 2025

    @rojiphil
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 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:

    • [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: Not Required. The existing checklist is good enough to capture such issues.

    • [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

    Precondition:

    Test:

    1. Login as a new unvalidated user (using Join)
    2. Create a new workspace
    3. Enable accounting on the workspace
    4. Open the accounting page
    5. Select connect on Xero
    6. Press Enable 2FA from the modal
    7. Verify the validate code action modal is shown

    Do we agree 👍 or 👎

  15. rojiphil commented on Apr 22, 2025

    @rojiphil
    Contributor

    was this a regression? I'm not sure who needs payment.

    Also, do we need a checklist?

    @RachCHopkins There was no regression here and the payment summary here looks correct to me.
    BZ checklist is also done. Thanks.

  16. garrettmknight commented on Apr 22, 2025

    @garrettmknight
    Contributor

    Payment Summary

  17. JmillsExpensify commented on Apr 22, 2025

    @JmillsExpensify
    Contributor

    Payment Summary

  18. garrettmknight commented on Apr 22, 2025

    @garrettmknight
    Contributor

    $250 approved for @rojiphil

  19. bernhardoj commented on Apr 22, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  20. JmillsExpensify commented on Apr 23, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions