Skip to content

[Due for payment 2026-11-26] [$175] iOS & Android - Troubleshoot - Unable to switch to Old Dot #104710

Open

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.5.16-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/Mobile-Expensify/pull/14186
Email or phone of affected tester (no customers): jose.sat94+10jul@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: MacBook Pro/13.7.8, Samsung Galaxy S21/Android 15, iPhone 13/18.6.2
App Component: Other

Action Performed:

  1. Launch Expensify App
  2. Log in with valid credentials
  3. Navigate to Troubleshoot > switch to Expensify Classic

Expected Result:

The system should navigate to Old Dot

Actual Result:

Nothing happens and "switch to Expensify Classic" option disappears after tapping in it

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7292873_1792649041008.android__online-video-cutter.com_.mp4

View all open jobs on GitHub

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

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 22, 2026
  2. applause-bot commented on Oct 22, 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/d7d0acd1636b3b7b3450b38972f267ae8dca5590d23c36f71a36b1598a98db0c

  3. MelvinBot commented on Oct 22, 2026

    @MelvinBot
    Contributor

    ⚠️ Preliminary analysis (low confidence) — treat as a starting point, not a conclusion.

    I think the fault is in the native HybridApp layer (Mobile-Expensify) or the backend, not in App. App code looks correct, and nothing in this App code path changed in the last ~3 months.

    Why the option disappears: App hides "Switch to Expensify Classic" only when nvp_tryNewDot says the user is locked to NewDot. That means isLockedToNewApp, classicRedirect.isLockedToNewDot, or an undismissed nudge older than 30 days (TryNewDotUtils.ts:32-42). The tap itself never writes nvp_tryNewDot. It sets closingReactNativeApp and calls the native closeReactNativeApp({shouldSetNVP: true}) (HybridApp/index.ts:103-124).

    So the item vanishing means native was called. After that, a new nvp_tryNewDot value arrived that locks the user to NewDot, and native did not switch. The isLockedToNewApp check applies only when CONFIG.IS_HYBRID_APP is true, which explains why only iOS and Android fail.

    I couldn't verify this because the native closeReactNativeApp code is in Mobile-Expensify, which I can't access. I didn't run a web test either, because this flow exists only in the HybridApp build.

    To confirm: An internal engineer should check the affected account's nvp_tryNewDot before and after the tap, plus the request native sends when it hands off to Classic. If the account is locked to NewDot, the fix belongs in Mobile-Expensify or the backend. One option is to send the lock in the first nvp_tryNewDot payload so App never shows the button. If the lock is wrong, stop setting it during the handoff. Either way, this fix is outside the App repo and needs an internal engineer.

    Investigation details
    • Visibility check on the Troubleshoot page: TroubleshootPage.tsx:135-147. The Account settings menu uses the same check and the same action, so it should fail the same way.
    • If App blocked the call itself (locked, or nvp_tryNewDot still loading), it would return early without changing any Onyx key, and the item would stay visible. The item disappearing rules this out.
    • closingReactNativeApp is read only by the status bar, so it can't hide the menu item.
    • [Payment due ZhenjaHorbach] [NoQA] Consume isLockedToNewApp and block OldApp escape hatches added this mobile lock in April 2026. Hiding the item is the intended response to the lock. What's new is that the lock arrives only after the user taps.
    • App improvement to consider: when the switch is blocked, tell the user why (for example, "Classic isn't available for your account") instead of failing silently.

    Possibly related: Switch to Classic on mWeb opens the HybridApp instead of staying in the browser


    Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.


    view run

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 22, 2026
  5. melvin-bot commented on Oct 22, 2026

    @melvin-bot

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

  6. changed the title [-]iOS & Android - Troubleshoot - Unable to switch to Old Dot[/-] [+][$175] iOS & Android - Troubleshoot - Unable to switch to Old Dot[/+] on Oct 22, 2026
  7. melvin-bot commented on Oct 22, 2026

    @melvin-bot
  8. Abdallah-1551 commented on Oct 22, 2026

    @Abdallah-1551

    Proposal

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

    In the HybridApp builds (iOS and Android), tapping Settings > Troubleshoot > Switch to Expensify Classic does not open Old Dot. The app stays on NewDot and the "Switch to Expensify Classic" row disappears. The user is left with no way to get to Classic and no explanation. Web and mWeb are not affected.

    What is the root cause of that problem?

    This is based on reading the code paths MelvinBot cited. I have not run it against the native layer, which lives in Mobile-Expensify.

    1. The row is shown or hidden by TroubleshootPage.tsx using the lock logic in TryNewDotUtils.ts, which depends on nvp_tryNewDot. The user counts as locked to NewDot, and the row is hidden, in any of these cases:
      • isLockedToNewApp is set.
      • classicRedirect.isLockedToNewDot is set.
      • The nudge is undismissed and older than 30 days.
      • All of these checks apply only when CONFIG.IS_HYBRID_APP is true, which is why only the mobile apps fail.
    2. The tap itself never writes nvp_tryNewDot. It sets closingReactNativeApp and calls native closeReactNativeApp({shouldSetNVP: true}) (HybridApp/index.ts). So the row vanishing means native was called and then a new nvp_tryNewDot arrived that evaluates as "locked".
    3. The most likely cause is that the handoff writes classicRedirect as undismissed without refreshing its timestamp. The nudge then looks undismissed and older than 30 days, so the lock fires. The lock that PR [Payment due @ZhenjaHorbach] [NoQA] Consume isLockedToNewApp and block OldApp escape hatches #87101 added to block Old Dot "escape hatches" then hides the row and also stops the switch.
    4. The lock check does not distinguish a lock that already existed from one produced by the handoff in progress. The user gets no feedback either way.

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

    0. Confirm the cause first. Log nvp_tryNewDot before the tap, after the tap, and in the payload native sends. Confirm which of the three lock conditions flips. The changes below assume it is the 30-day nudge condition.

    1. Fix the lock calculation so the handoff cannot trigger it (src/libs/TryNewDotUtils.ts). Compute the 30-day check only when the user has not just initiated a switch, and ignore NVP changes while a switch is in flight.

    function isLockedToNewDot(tryNewDot, isClosingRNApp = false) {
        if (isClosingRNApp) {
            // Switch already in progress; don't let the handoff's own NVP write re-lock the user
            return false;
        }
        // existing checks: isLockedToNewApp, classicRedirect.isLockedToNewDot, stale undismissed nudge (>30d)
    }

    Pass closingReactNativeApp from Onyx into the visibility check in TroubleshootPage.tsx and the Account settings menu. The row then does not flicker away mid-handoff.

    2. Write a fresh timestamp as part of the handoff. In HybridApp/index.ts, when shouldSetNVP is true, make sure the classicRedirect value that is written (via native or an Onyx merge) includes timestamp: now. This removes the "old undismissed nudge" condition at the source. If native owns that write, open a matching Mobile-Expensify change and coordinate a version bump.

    3. Handle a blocked switch explicitly (HybridApp/index.ts, TroubleshootPage.tsx). If the user is truly locked (isLockedToNewApp or classicRedirect.isLockedToNewDot), do not call native and do not clear the closing state. Show a clear message instead of a silent failure, for example "Expensify Classic isn't available for your account". Reset closingReactNativeApp to false if native returns without leaving the app.

    4. Backend and native follow-up (internal). If the account really is flagged isLockedToNewDot after the tap, the server or native layer is setting it incorrectly during the handoff. That must be fixed there, and the App changes above only prevent the visible symptom.

    What alternative solutions did you explore? (Optional)

    • Do nothing in App and fix only Mobile-Expensify or the backend. This is the likely long-term fix, but App still has no guard against a self-inflicted lock and still fails silently, so I'm keeping the defensive App changes.
    • Remove the 30-day nudge lock on mobile. This would fix the symptom, but it reverses the intent of PR [Payment due @ZhenjaHorbach] [NoQA] Consume isLockedToNewApp and block OldApp escape hatches #87101 and would reopen the escape hatch for users who are meant to be locked.
    • Always show the row and show an error on tap when locked. This is simpler, but it contradicts the existing design of hiding unavailable options. I kept the hiding and added a message for the in-flight case.

    Testing

    1. On an iOS and an Android HybridApp build, use an account whose nvp_tryNewDot has an undismissed classicRedirect with a timestamp older than 30 days. Tap Troubleshoot > Switch to Expensify Classic. Expected: the app navigates to Old Dot and the row does not disappear mid-transition.
    2. Repeat from Settings > Account, which uses the same check and action.
    3. Use an account with isLockedToNewApp or classicRedirect.isLockedToNewDot set. Expected: the row stays hidden, or if reachable, a message is shown and nothing breaks.
    4. Use a fresh account that has never switched. Expected: the switch works and the nudge timestamp is written as the current time.
    5. Verify web and mWeb are unchanged, since CONFIG.IS_HYBRID_APP is false there.
    6. Add unit tests for isLockedToNewDot covering:
      • the stale undismissed nudge case,
      • the isClosingRNApp = true case,
      • the explicit lock flags,
      • the fresh-timestamp case.
  9. shilo1979jk commented on Oct 24, 2026

    @shilo1979jk

    Proposal

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

    On iOS and Android HybridApp builds, when navigating to Account > Troubleshoot, the "Switch to Expensify Classic" option is missing (or, as shown in the attached QA video after tapping Clear cache and restart, briefly appears for ~1 second, does nothing when tapped, and immediately disappears again), leaving the user unable to switch to OldDot from Troubleshoot.

    What is the root cause of that problem?

    Inspecting the attached QA reproduction video (Bug7292873_1792649041008!android__online-video-cutter.com_.mp4) frame-by-frame reveals the exact mechanism that previous analyses missed:

    • At 00:01, when the tester opens Account > Troubleshoot, "Switch to Expensify Classic" is not shown at all.
    • At 00:02 (and repeatedly at 00:05, 00:07, 00:09), the tester taps Clear cache and restart → Reset and refresh, which calls clearOnyxAndResetApp().
    • At 00:03, 00:06, 00:08, and 00:10, immediately after clearOnyxAndResetApp() clears Onyx storage, "Switch to Expensify Classic" appears for ~1 second. Tapping it during that window does nothing, and at 00:04, 00:07, 00:09, and 00:11 (as soon as OpenApp finishes hydrating Onyx), the option disappears.

    This happens because of two interacting issues in TryNewDotUtils.ts, TroubleshootPage.tsx, and HybridApp/index.ts:

    1. hasBeenInNewDot30Days(tryNewDot) hides the manual Troubleshoot switch for accounts nudged >30 days ago:
      In src/libs/TryNewDotUtils.ts:32-34:

      function isOldAppRedirectBlocked(tryNewDot: OnyxEntry<TryNewDot>, shouldRespectMobileLock: boolean): boolean {
          return tryNewDot?.classicRedirect?.isLockedToNewDot === true || hasBeenInNewDot30Days(tryNewDot) || (shouldRespectMobileLock && isLockedToNewApp(tryNewDot));
      }

      hasBeenInNewDot30Days(tryNewDot) returns true whenever classicRedirect.dismissed === false and classicRedirect.timestamp is >= 30 days old (note the tester account jose.sat94+10jul@gmail.com was created in July, >30 days ago). While shouldBlockOldAppExit (src/libs/TryNewDotUtils.ts:24-30) only blocks isLockedToNewApp(tryNewDot), TroubleshootPage.tsx:136 calls shouldHideOldAppRedirect → isOldAppRedirectBlocked, which hides the manual Troubleshoot escape hatch once nvp_tryNewDot is loaded from OpenApp.

    2. Loading-state desynchronization after clearOnyxAndResetApp() between TroubleshootPage.tsx and HybridApp/index.ts:

      • In src/libs/actions/HybridApp/index.ts:27-57 (added in PR [Payment due @ZhenjaHorbach] [NoQA] Consume isLockedToNewApp and block OldApp escape hatches #87101), closeReactNativeApp tracks whether nvp_tryNewDot is still unresolved after Onyx.clear() by subscribing to both ONYXKEYS.NVP_TRY_NEW_DOT and ONYXKEYS.IS_LOADING_APP:
        function updateTryNewDotLoadingState(isTryNewDotUpdate = false, isInitialTryNewDotUpdate = false) {
            if (currentTryNewDot !== undefined) {
                isLoadingTryNewDot = false;
                return;
            }
            ...
            isLoadingTryNewDot = isLoadingApp !== false;
        }
      • In contrast, src/pages/settings/Troubleshoot/TroubleshootPage.tsx:74-76 only checks const isLoadingTryNewDot = isLoadingOnyxValue(tryNewDotMetadata).
      • Immediately after clearOnyxAndResetApp() (Onyx.clear()), tryNewDot is undefined, tryNewDotMetadata.status is 'loaded' (isLoadingOnyxValue(tryNewDotMetadata) is false), and ONYXKEYS.IS_LOADING_APP is true while OpenApp is in flight.
      • Because TroubleshootPage.tsx passes isLoadingTryNewDot = false and tryNewDot = undefined, shouldHideOldAppRedirect evaluates to false and renders "Switch to Expensify Classic". When the user taps it during that window, closeReactNativeApp in HybridApp/index.ts:111 sees isLoadingTryNewDot === true (currentTryNewDot === undefined && isLoadingApp !== false) and silently returns early. A moment later, OpenApp resolves nvp_tryNewDot, isOldAppRedirectBlocked flips to true, and the button disappears.

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

    1. Sync the UI loading check with HybridApp/index.ts across Clear cache and restart (OpenApp):
      In src/pages/settings/Troubleshoot/TroubleshootPage.tsx (and src/pages/settings/useInitialSettingsPageMenuData.ts), include ONYXKEYS.IS_LOADING_APP when tryNewDot === undefined:

      const [tryNewDot, tryNewDotMetadata] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT);
      const [isLoadingApp = true] = useOnyx(ONYXKEYS.IS_LOADING_APP);
      const isLoadingTryNewDot = isLoadingOnyxValue(tryNewDotMetadata) || (tryNewDot === undefined && isLoadingApp);

      This guarantees that while OpenApp is hydrating Onyx after clearOnyxAndResetApp(), the UI visibility gate matches closeReactNativeApp's internal isLoadingTryNewDot state and never flashes an unresponsive button.

    2. Do not hide the manual Troubleshoot switch solely due to the 30-day nudge staleness (hasBeenInNewDot30Days):
      In src/libs/TryNewDotUtils.ts, allow shouldHideOldAppRedirect / isOldAppRedirectBlocked to optionally skip the 30-day nudge staleness check (shouldIgnoreStaleNudge = false) or keep TroubleshootPage gated only on explicit locks (tryNewDot?.classicRedirect?.isLockedToNewDot === true || (shouldRespectMobileLock && isLockedToNewApp(tryNewDot))):

      function isOldAppRedirectBlocked(tryNewDot: OnyxEntry<TryNewDot>, shouldRespectMobileLock: boolean, shouldIgnoreStaleNudge = false): boolean {
          return (
              tryNewDot?.classicRedirect?.isLockedToNewDot === true ||
              (!shouldIgnoreStaleNudge && hasBeenInNewDot30Days(tryNewDot)) ||
              (shouldRespectMobileLock && isLockedToNewApp(tryNewDot))
          );
      }

      And pass shouldIgnoreStaleNudge = true in TroubleshootPage.tsx so unlocked users on HybridApp (like jose.sat94+10jul@gmail.com) can always use the Troubleshoot switch after OpenApp finishes, while truly locked accounts (isLockedToNewApp / isLockedToNewDot) never see the button even transiently after clearing cache.

    3. Add unit tests in tests/unit/TryNewDotUtilsTest.ts and tests/unit/pages/settings/TroubleshootPageTest.ts:

      • Verify that when tryNewDot is undefined and ONYXKEYS.IS_LOADING_APP is true (after clearOnyxAndResetApp), TroubleshootPage hides the Classic redirect item on HybridApp until IS_LOADING_APP resolves to false.
      • Verify that an unlocked HybridApp user with a >30-day classicRedirect.timestamp still sees and can trigger Switch to Expensify Classic on TroubleshootPage.

    What alternative solutions did you explore? (Optional)

  10. melvin-bot commented on Oct 27, 2026

    @melvin-bot

    @thesahindia Huh... This is 4 days overdue. Who can take care of this?

  11. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    @thesahindia 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  12. 23 remaining items

  13. Krishna2323 commented on Nov 10, 2026

    @Krishna2323
    Contributor

    @MelvinBot implement #104710 (comment)

    Please include these in the PR:

    1. Add one shared check for whether nvp_tryNewDot is still loading. It should be true when the key's metadata is loading, or when the value is undefined and IS_LOADING_APP !== false. UI callers should read both keys with useOnyx, not Onyx.connect.
    2. Use it only in TroubleshootPage and useMergeResultConfirmationConfig. Leave the Settings menu as it is, since it isn't affected.
    3. Add tests for these cases:
      • The row stays hidden while nvp_tryNewDot is undefined and IS_LOADING_APP is true.
      • A blocked account stays hidden after OpenApp returns.
      • An eligible account with no nvp_tryNewDot sees the row once IS_LOADING_APP is false.
  14. MelvinBot commented on Nov 10, 2026

    @MelvinBot
    Contributor

    ⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.

    Run details

  15. Krishna2323 commented on Nov 11, 2026

    @Krishna2323
    Contributor

    @MelvinBot implement #104710 (comment)

    Please include these in the PR:

    1. Add one shared check for whether nvp_tryNewDot is still loading. It should be true when the key's metadata is loading, or when the value is undefined and IS_LOADING_APP !== false. UI callers should read both keys with useOnyx, not Onyx.connect.
    2. Use it only in TroubleshootPage and useMergeResultConfirmationConfig. Leave the Settings menu as it is, since it isn't affected.
    3. Add tests for these cases:
      • The row stays hidden while nvp_tryNewDot is undefined and IS_LOADING_APP is true.
      • A blocked account stays hidden after OpenApp returns.
      • An eligible account with no nvp_tryNewDot sees the row once IS_LOADING_APP is false.
  16. MelvinBot commented on Nov 11, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ⚠️ partial

    Created draft Fix Classic redirect visibility while eligibility reloads, assigned to Krishna2323, with the shared check in only the two requested callers, all three regression cases, and Settings unchanged. Web runtime verification was blocked by a blank page; 42 focused Jest tests pass, but native behavior remains unverified.

    Blank dev NewDot web page

    Step Status
    Settings → Troubleshoot opens with normal controlsBlocked: the browser displayed a blank page with no accessible controls.
    Blank dev NewDot web page
    ❌
    Web Classic redirect behavior remains unchangedRuntime verification was blocked by the blank page; the redirect was not exercised.
    ❌
    All three requested HybridApp states have regression coverageTests pass for both affected callers using mocked hybrid configuration. Four focused suites passed: 42 tests. Full lint, Storybook smoke, spelling, and explicit compiler checks also passed. Typecheck reports three unrelated existing errors; full-suite testing, wrapper checks, and formatting verification remain incomplete and are documented in the PR.
    ✅

    view run · no recording available

  17. melvin-bot commented on Nov 12, 2026

    @melvin-bot

    Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  18. changed the title [-][$175] iOS & Android - Troubleshoot - Unable to switch to Old Dot[/-] [+][Due for payment 2026-11-26] [$175] iOS & Android - Troubleshoot - Unable to switch to Old Dot[/+] on Nov 19, 2026
  19. melvin-bot commented on Nov 19, 2026

    @melvin-bot

    @Krishna2323

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.42-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-11-26. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions