Skip to content

Android - Switch to Expensify Classic navigates to mWeb OD instead of stays in app #100256

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: 9.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://github.com/Expensify/Mobile-Expensify/pull/14097
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Samsung Galaxy A52 / Android 14
App Component: User Settings

Action Performed:

Preconditions: user already signed in to any account

Steps:

  1. Open the Expensify app
  2. Navigate to Account -> Troubleshoot
  3. Tap Clear cache and restart until "Switch to Expensify Classic" displayed and tap on it

Expected Result:

After tapping "Switch to Expensify Classic", user navigate to OD and stays in native app

Actual Result:

in some devices after tapping "Switch to Expensify Classic", it redirects to mWeb, but in some other devices nothing happened after tapping “Switch to Expensify Classic” and unable to reach OD

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7249665_1788405869807.video_2026-09-03_10-20-01.mp4

View all open jobs on GitHub

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

Activity

  1. 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/d57323dc99cbc181d0eb6d4ca00b5028da05cfb7004ae19bd4c7f96983af690a

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 3, 2026
  3. melvin-bot commented on Sep 3, 2026

    @melvin-bot

    Triggered auto assignment to @aldo-expensify (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. changed the title [-]Android-Switch to Expensify Classic navigates to mWeb OD instead of stays in app[/-] [+]Android - Switch to Expensify Classic navigates to mWeb OD instead of stays in app[/+] on Sep 3, 2026
  7. MelvinBot commented on Sep 3, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (client-side — mobile/HybridApp native layer, not an App JS regression)
    Causing PR: No Expensify/App PR in this release touches this code path. The only change in production...staging that can affect it is the Mobile-Expensify submodule bump f72dc07 → 3ac8c5c (Medium confidence), which carries https://github.com/Expensify/Mobile-Expensify/pull/14097 — the same PR referenced in this bug report.
    Related Issues: #100246 (also Android-app-only, also staging-only, also filed against the same Mobile-Expensify PR build), #100228 (StagingDeployCash)

    Recommendation: NEEDS INVESTIGATION

    Every App-side file in the "Switch to Expensify Classic" path is byte-identical between production and staging, so no App PR on this checklist can be reverted to fix this; the change has to be on the native/HybridApp side. Someone with Mobile-Expensify access needs to confirm whether the changes in that release (notably PR #14097) affect HybridApp native module registration / OldDot launch, and revert there if so.

    Assigned: no assignee change — the causing change appears to be in Mobile-Expensify and I do not have access to that repo, so I cannot identify the author or approving reviewers to assign. Please loop in the author of Mobile-Expensify#14097.
    Labels: No changes. DeployBlockerCash is kept — the App/Android deploy really is broken and the issue is not reproducible in production. DeployBlocker was not present, so nothing was removed. Nothing here points at a backend/API fix.

    📋 Detailed Analysis

    Verification

    The full production...staging diff for this release is 129 files. None of them is in the "Switch to Expensify Classic" path:

    • src/pages/settings/Troubleshoot/TroubleshootPage.tsx — unchanged (last touched 2026-08-12, already in production)
    • src/libs/actions/HybridApp/index.ts — unchanged (last functional change 2026-05-04)
    • src/libs/TryNewDotUtils.ts — unchanged (last functional change 2026-06-29)
    • src/libs/actions/Link.ts (openOldDotLink) — unchanged
    • src/CONFIG.ts — unchanged
    • modules/hybrid-app/** (the JS↔native bridge, including the Android Kotlin module) — 0 files changed in this release
    • package.json — only the version field changed (9.4.66-0 → 9.4.69-0); @expensify/react-native-hybrid-app is file:./modules/hybrid-app and was not bumped
    • android/app/build.gradle — only versionCode/versionName

    I also checked the non-obvious candidates that could perturb Onyx loading state, since this flow is gated on it: src/hooks/useOnyx.ts (rename-only refactor, originalUseOnyx → useOnyxWithoutSnapshots), src/setup/index.ts (removed one RAM-only key), src/libs/actions/Session/index.ts (2FA authToken param), src/libs/Network/SequentialQueue.ts (offline comment/read-time handling). None of them touch NVP_TRY_NEW_DOT, CONFIG.IS_HYBRID_APP, or the redirect.

    The only remaining delta that reaches this behaviour is the submodule pointer:

    FILE: Mobile-Expensify
    -Subproject commit f72dc07e54352d3a5b2cdb0066961c0dba92f360
    +Subproject commit 3ac8c5c19fc54a32b4841d6853f9ef4408a72f3f
    

    Evidence

    The menu item and both of its possible actions are here (permalinked at staging c9dd46f6):

    • Visibility gate: TroubleshootPage.tsx#L125 → shouldHideOldAppRedirect(tryNewDot, isLoadingTryNewDot, CONFIG.IS_HYBRID_APP, isDevelopment)
    • HybridApp branch: TroubleshootPage.tsx#L133-L136 → closeReactNativeApp({shouldSetNVP: true, isTrackingGPS}) (stays in the native app)
    • Non-HybridApp branch: TroubleshootPage.tsx#L137-L143 → switchToOldDot('') + openOldDotLink(CONST.OLDDOT_URLS.INBOX, true) (opens OldDot in the browser, i.e. mWeb)

    Which branch runs is decided purely by src/CONFIG.ts#L143:

    IS_HYBRID_APP: HybridAppModule.isHybridApp(),

    …which is a straight pass-through to the native module (modules/hybrid-app/src/index.native.ts#L6-L8). The implementation shipped in this repo for Android is the standalone stub that hard-codes false (ReactNativeHybridApp.kt#L12-L14), and its closeReactNativeApp is a no-op log (L20-L22). The real implementation comes from the mobile build, so this JS behaves entirely according to what the native layer reports.

    That maps cleanly onto the two reported symptoms, and explains why they differ per device/build:

    1. "redirects to mWeb" — isHybridApp() resolving to false at runtime, so the standalone branch runs and openOldDotLink(..., true) opens Classic in the browser (TroubleshootPage.tsx:141). This is also consistent with the item being visible in that state: with shouldRespectMobileLock === false, the visibility gate no longer hides the item while tryNewDot is still loading (TryNewDotUtils.ts#L36-L42).
    2. "nothing happens / can't reach OD" — the HybridApp branch running, but the exit being swallowed before it reaches native (HybridApp/index.ts#L103-L124), or the native closeReactNativeApp not launching OldDot.

    Reproducibility supports a native-side cause: staging-only, production-unaffected, Android app only, while the App JS for this flow is identical to production. Two separate Android-only blockers on this checklist (this one and #100246, an app-shortcut/deep-link entry point) were both filed against the same Mobile-Expensify PR build.

    Root Cause

    Not fully pinned — stating this honestly:

    • Confirmed: no Expensify/App code change in 9.4.69-0 can produce this. The behaviour is decided by HybridAppModule.isHybridApp() and by the native closeReactNativeApp, and both the JS bridge and the App-side Android module are unchanged in this release.
    • Medium confidence: the regression came in with the Mobile-Expensify submodule bump f72dc07 → 3ac8c5c for this release. I could not read that diff (no access to the private repo), so I cannot confirm that PR Update version to 1.2.50-10 on staging #14097 specifically is at fault versus another commit in that range — a Mobile-Expensify engineer needs to confirm and revert there.
    • Secondary, pre-existing App-side sharp edge worth a separate fix (not a regression, present in production): the visibility gate uses the page's own isLoadingTryNewDot from useOnyx metadata (TroubleshootPage.tsx#L74) while the action uses a separate module-level isLoadingTryNewDot inside src/libs/actions/HybridApp/index.ts. When those two disagree, the item renders but closeReactNativeApp early-returns at HybridApp/index.ts#L113-L115 (shouldSetNVP && isLoadingTryNewDot, see TryNewDotUtils.ts#L24-L30) and the tap silently does nothing, with no feedback to the user. That matches the "tap and nothing happens" half of this report and is a plausible aggravating factor regardless of the native fix.

    view run

  8. TaduJR commented on Sep 3, 2026

    @TaduJR
    Contributor

    Not able to repro this on latest main as well

    Android-Native.mp4

    Can you @AndrewGable

    Thanks

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

  10. IuliiaHerets commented on Sep 3, 2026

    @IuliiaHerets

    Issue is not reproducible in the latest build

    screen-20260903-194432-1788453855502.mp4
  11. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Sep 3, 2026
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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions