Skip to content

Troubleshoot - Unable to receive magic code when testing Biometrics #80017

Closed

Description

@jponikarchuk

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.3.5-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to validate in Prod - Provide reasoning.
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #79475
Email or phone of affected tester (no customers): htad26+weteriiu@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Critical User Impact
Device used: Windows 10 / Chrome, iOS 26.1 / iPhone 13
App Component: Other

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Sign in with a new account
  3. Navigate to the Settings -> Troubleshoot
  4. Click on the "Test" button next to the "Biometrics (Not registered)" text
  5. When the verification page appears, wait for the magic code to be sent to your Gmail

Expected Result:

The magic code should be sent to the user's Gmail

Actual Result:

The magic code is not sent to the user's Gmail. Magic code is receive only after clicking "Didn't receive magic code".

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 20, 2026
  2. melvin-bot commented on Jan 20, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #79475

  3. melvin-bot commented on Jan 20, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. melvin-bot commented on Jan 20, 2026

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

  5. github-actions commented on Jan 20, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. rafecolton commented on Jan 20, 2026

    @rafecolton
    Member

    The PR should have been marked No QA (cc @JakubKorytko) - it is hidden behind a beta and we are still testing and working on the BE changes.

  7. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jan 20, 2026
  8. OSBotify commented on Jan 20, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #79475 - "[ECUK In-App 3DS] Add BIOMETRICS_TEST scenario screens & routes + add test biometrics button to the troubleshoot menu" by @JakubKorytko (High confidence)
    Related Issues: N/A

    Recommendation: REVERT

    PR #79475 added incomplete UI screens for biometrics testing without the backend logic to actually send the magic code. The PR description explicitly states: "At the current state, the screens simply navigate between each other - the correct logic will be added as a part of this PR: #79482"

    However, PR #79482 was closed without being merged, meaning the magic code sending logic was never implemented. This resulted in shipping a broken feature to staging where users can access the biometrics test flow but never receive the initial magic code.

    Labels: No label changes needed - keeping DeployBlockerCash as this is a frontend bug requiring an App PR revert.

    📋 Detailed Analysis

    Evidence

    1. The issue reports that magic code is not sent when navigating to Settings -> Troubleshoot -> Biometrics test
    2. PR [No QA] [ECUK In-App 3DS] Add BIOMETRICS_TEST scenario screens & routes + add test biometrics button to the troubleshoot menu #79475 added the biometrics test button and associated screens
    3. The PR description explicitly mentions this is incomplete UI testing work
    4. The follow-up PR [WIP] [ECUK In-App 3DS] Implement MultifactorAuthenticationContext #79482 that would have added the actual logic was closed without merging

    Verification

    File: /home/runner/work/App/App/src/pages/MultifactorAuthentication/ValidateCodePage.tsx

    This file was added in PR #79475. Looking at the code:

    • Lines 106-113: resendValidationCode() function exists and calls resendValidateCode(contactMethod)
    • Line 184-190: This resend button is rendered in the UI
    • Critical issue: There is NO useEffect hook that calls resendValidateCode() on component mount
    • The magic code is only sent when the user manually clicks "Didnt receive magic code"

    File: /home/runner/work/App/App/src/pages/MultifactorAuthentication/BiometricsTestPage.tsx

    • Lines 10-12: This page just navigates to the magic code page after a 400ms delay
    • It does NOT trigger any API call to send the initial magic code

    Root Cause

    The ValidateCodePage component is missing the initial trigger to send a magic code when the page loads. In a complete implementation, there should be a useEffect hook that calls resendValidateCode(contactMethod) on mount to send the initial code. However, this was intentionally omitted because PR #79475 was only meant to test the UI, with the actual logic planned for PR #79482 (which was never merged).

    Comparison with Working Flow

    The regular sign-in flow calls BeginSignIn API which automatically sends the magic code. The multifactor authentication flow has no equivalent initial API call.

  9. OSBotify commented on Jan 20, 2026

    @OSBotify
    Contributor

    Update: I see @rafecolton has already removed the deploy blocker label, noting this was intended to be hidden behind a beta. However, my investigation shows the biometrics test button was added to the public Troubleshoot menu (src/components/TestToolMenu.tsx lines 104-110) without any beta flag checks, making it accessible to all authenticated users on staging.

    Key Issue: While the PR may have been intended as "testing only", the implementation exposed the incomplete feature publicly through Settings -> Troubleshoot -> Biometrics test, which is how QA discovered it.

    If this feature should remain on staging for internal testing, it needs to be:

    1. Gated behind a beta flag, OR
    2. Removed from the public Troubleshoot menu, OR
    3. Have the magic code sending logic implemented

    Otherwise, the recommendation remains to revert PR #79475.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions