Skip to content

Android - Log in - Can't log in from Magic link in Email #100257

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.4.69-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/72092520/folder/54012487/41237553/1720577954?sort=%2Bidentifier
Email or phone of affected tester (no customers): leungbratt6@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Pixel 7 Pro/Android 17
App Component: User Settings

Action Performed:

  1. Open the Android app
  2. Enter the email
  3. Click Continue
  4. Navigate to the email and tap on the magic link

Expected Result:

User log in to the app

Actual Result:

User remain on the Enter Magic Code page

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7249721_1788413041238.magic.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7249721

Activity

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

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/5f62d7eb2cb97931181d56e2cc3d7ac640ffc34ae4e89dce60a29a8eb944d3eb

  3. melvin-bot commented on Sep 3, 2026

    @melvin-bot

    Triggered auto assignment to @marcaaron (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Sep 3, 2026

    @melvin-bot

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

  5. github-actions commented on Sep 3, 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. MelvinBot commented on Sep 3, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (client-side — native Android / HybridApp layer; the fix is not in an Expensify/App JS PR)
    Causing PR: No Expensify/App PR on the 9.4.69-0 checklist touches the magic-link / deep-link sign-in path. The only change in production...staging that can affect Android intent handling is the Mobile-Expensify submodule bump f72dc07 → 3ac8c5c, which carries Mobile-Expensify#14097 (Medium confidence — I do not have read access to that repo, so I could not diff it).
    Related Issues: #100246 and #100256 — both Android-app-only, both staging-only, both filed by Applause against the same Mobile-Expensify#14097 build, and both are launcher-intent / deep-link routing failures. Three intent-routing regressions in one release with a single native change is the strongest signal here.

    Recommendation: NEEDS INVESTIGATION

    I can rule out every App PR in this release with high confidence, but I cannot read Mobile-Expensify to confirm the native change, so I'm stopping short of naming it as the definitive cause. If the owners of Mobile-Expensify#14097 can't produce a quick fix, rolling the submodule pointer back to f72dc07 is the way to unblock the deploy.

    Assigned: none — the suspected change is in Mobile-Expensify and I can't resolve its author/reviewers from here. Please pull in the author and approvers of Mobile-Expensify#14097. cc @marcaaron @AndrewGable
    Labels: No changes. DeployBlockerCash is kept (this ships with the App/HybridApp deploy and is not reproducible on production). DeployBlocker was not present, so nothing was removed.

    📋 Detailed Analysis

    Evidence

    1. The magic-link sign-in code path is essentially untouched in this release.

    The full production...staging diff for 9.4.69-0 contains only these sign-in-adjacent files:

    • src/libs/API/parameters/SignInUserParams.ts
    • src/libs/API/parameters/SignInUserWithLinkParams.ts
    • src/libs/actions/Session/index.ts
    • src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.tsx
    • src/types/onyx/Credentials.ts

    All five come from one PR: #100084 "[No QA] Pass authtoken back through SignInUser" by @NikkiWines.

    2. #100084 cannot produce this symptom. Its entire runtime effect is gated behind a 2FA code being present:

    The magic-link deep-link flow calls signInWithValidateCode(accountID, validateCode, preferredLocale) with no twoFactorAuthCode argument (Session/index.ts#L1555-L1562), so twoFactorAuthCode defaults to '', the guard is false, and params is byte-for-byte what production sends. The rest of the PR is a new optional field on a params type, a new optional field on the Credentials Onyx type, one extra argument threaded through BaseValidateCodeForm, and tests. Nothing in it is platform-specific, so it also can't explain "Android only".

    3. No other App PR in the release goes anywhere near deep links, routing, or auth. I checked the file list of every non-docs PR on the checklist:

    PR Touches
    #94738 SequentialQueue.ts — but the new logic is scoped to ReadNewestAction / AddComment / AddAttachment commands only, and never runs for SignInUserWithLink
    #99004 actions/OnyxDerived/index.ts only
    #100200 useOnyx rename + Search/Category call sites
    #99685 report pages / onboarding status
    #100017 invoice child reports
    #100210 Business Central params/commands
    #99754, #99767, #99124, #99217, #99669, #98131, #99994, #100106, #100205 wallet/copy/UI/tests — unrelated

    The only remaining changes to src/setup/index.ts and src/ONYXKEYS.ts come from the Revert "Add intl deposit account collection" commit (6a5922f), which is deposit-account collection keys.

    4. The Android side of the App repo did not change. The only android/ change in the whole release is a version bump in android/app/build.gradle (9.4.66-0 → 9.4.69-0). AndroidManifest.xml is not in the diff — the /v App Link intent filter is identical to production (AndroidManifest.xml#L78, plus the staging host at L102). The JS-side deep-link subscriber (linkingConfig/subscribe.ts#L40) is also unchanged.

    5. Staging-only + Android-app-only + two sibling regressions with the same shape. Not reproducible on production, not reproducible on any other platform. The only native delta between 9.4.68-1 (production) and 9.4.69-0 (staging) is the Mobile-Expensify submodule bump. #100246 (launcher shortcut → scan receipt doesn't route) and #100256 (Switch to Expensify Classic opens mWeb instead of staying in-app) are the same class of failure — an incoming intent/URL not being routed to the right destination — and both bug reports name Mobile-Expensify#14097 as the build under test.

    Verification

    • Confirmed the affected client code path: src/pages/ValidateLoginPage/index.tsx#L24-L40 → signInWithValidateCodeAndNavigate → signInWithValidateCode. Neither file was modified in this release except for the 2FA-gated additions above.
    • Confirmed via gh api repos/Expensify/App/compare/production...staging that no file under src/pages/signin/ other than BaseValidateCodeForm.tsx, no file under src/libs/Navigation/, and no Android manifest or native module changed.
    • Confirmed the line numbers above against the staging tree at c9dd46f6704956e162eb4dd42469aa98bfbffcf3.
    • Could not verify the Mobile-Expensify submodule change: Expensify/Mobile-Expensify is not readable from this environment (404 on both the repo and PR Update version to 1.2.50-10 on staging #14097), and the submodule directory is empty in this checkout. This is the reason the confidence is Medium rather than High, and the reason this is NEEDS INVESTIGATION rather than a straight REVERT.

    Root Cause

    Best hypothesis, pending someone who can read the native diff: the magic-link URL (https://new.expensify.com/v/<accountID>/<validateCode>) is either not being matched by the HybridApp's Android intent filter or is not being forwarded from the native launch/onNewIntent handler into the NewDot linking layer. ValidateLoginPage therefore never mounts, signInWithValidateCode is never dispatched, session.autoAuthState stays NOT_STARTED, and the app just sits on the already-visible "Enter Magic Code" screen — exactly the reported behaviour. Note the symptom is "nothing happens" rather than an error: a failed SignInUserWithLink would set autoAuthState: FAILED and trigger a Navigation.goBack(), so the evidence points at the intent never reaching JS at all rather than at a failing API call.

    Next steps

    1. Owners of Mobile-Expensify#14097: please check whether it altered Android intent-filter or launch-intent forwarding behaviour. Fixing Expense-User not directed to scan receipt flow when opening via app short cut. #100246 / Android - Switch to Expensify Classic navigates to mWeb OD instead of stays in app #100256 / this issue together is likely one change.
    2. If no quick fix, revert the submodule pointer to f72dc07 and re-cut. That is cheaper than reverting any App PR, none of which are implicated.
    3. [No QA] Pass authtoken back through SignInUser #100084 is not implicated — please do not revert it on account of this issue.

    view run

  7. war-in commented on Sep 3, 2026

    @war-in
    Contributor

    I think this investigation applies here too - #100246 (comment)

    Turned out to be related to https://github.com/Expensify/Mobile-Expensify/pull/14097

  8. AndrewGable commented on Sep 3, 2026

    @AndrewGable
    Contributor

    The linked Mobile-Expensify PR is reverted on staging and we are retesting it now.

  9. IuliiaHerets commented on Sep 3, 2026

    @IuliiaHerets

    Issue is not reproducible in the latest build

    screen-20260903-194630-1788453979486.mp4
  10. marcaaron commented on Sep 17, 2026

    @marcaaron
    Contributor

    Seems like we can close this? Please reopen if that's incorrect.

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions