Skip to content

[Due for payment 2026-10-13] Spend - App crashes after returning to expense RHP from expense report #103138

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.5.3-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #100331
Email or phone of affected tester (no customers): sdjsonsjodsjoisndjso@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create expense A and click Submit.
  4. Create expense B.
  5. Open expense B > click Report field > select the report that contains Expense A.
  6. Go to Spend > Expenses.
  7. Open the first expense.
  8. Navigate through both expenses via navigation arrow.
  9. Navigate back to the first expense via arrow.
  10. Click on the report link in "moved to expense from.." system message.
  11. Click RHP back button.

Expected Result:

App will not crash.

Actual Result:

App crashes.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7278403_1791253574061.019.mp4

logs.txt

View all open jobs on GitHub

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

Issue OwnerCurrent Issue Owner: @thelullabyy

Activity

  1. added
    DeployBlockerCash
    Bug
    on Oct 6, 2026
  2. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  3. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    @JS00001 @ShridharGoel you have been assigned to this deploy blocker because you reviewed the offending PR: #100331

  4. github-actions commented on Oct 6, 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.
  5. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    @thelullabyy you have been assigned to this deploy blocker because you authored the offending PR: #100331

  6. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  7. MelvinBot commented on Oct 6, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: Standardize Expense Report and Expense header with predictable button placement and carousel counter (high confidence, traced from the code; I did not reproduce it).

    Recommendation: Revert. It crashes the app on every listed platform. This PR is also linked to 5 other open deploy blockers.

    Why it crashes: The PR adds ?anchorTransactionID= in front of backTo on the SEARCH_REPORT route. It also nests backTo one level deeper on every carousel arrow press. After 2 presses, the "moved expense from" link decodes backTo twice. That leaves 2 raw backTo keys in the URL. query-string turns the repeated key into an array. On RHP back, MoneyRequestHeader calls backTo.replaceAll(...) on that array, which throws TypeError.

    Evidence
    1. The PR places anchorTransactionID ahead of backTo: src/ROUTES.ts:2118-2120.
    2. Each arrow press calls setParams with backTo = Navigation.getActiveRoute(), so backTo nests one level per press: MoneyRequestReportTransactionsNavigation.tsx:231-239 and L384.
    3. The link builder runs decodeURIComponent on a value that URLSearchParams.get() already decoded. The second decode exposes the inner &backTo=: getReportURLForCurrentContext.ts:42-45.
    4. On RHP back, goUp replaces the screen with SEARCH_REPORT, and backTo arrives as an array: Navigation.ts:603-610.
    5. The header renders route.params.backTo.replaceAll(...) and throws: MoneyRequestHeader.tsx:102. The same line is in MoneyRequestHeaderPrimaryAction.tsx:66.

    This is why the repro needs "through both expenses, then back to the first." Two presses create two nesting levels. Production is unaffected because Spend > Expenses had no carousel arrows before this PR.

    Other candidates ruled out: I checked all 45 App PRs on Deploy Checklist: New Expensify 2026-10-05. Only this PR touches the RHP expense carousel, the Search row-press seeding, or the SEARCH_REPORT route.

    Other open blockers linked to this PR:

    If you fix forward instead, any one of these stops the crash. Ideally do all three:

    1. Remove the extra decodeURIComponent in getReportURLForCurrentContext.ts.
    2. In getBackTo(), keep the screen's existing backTo instead of Navigation.getActiveRoute(). setParams stays on the same screen, so nesting is wrong and grows the URL without limit.
    3. Make the backTo.replaceAll checks handle a non-string backTo.

    view run

  8. JS00001 commented on Oct 6, 2026

    @JS00001
    Contributor

    @thelullabyy we definitely need to CP a fix for this one

  9. added
    Reviewing
    on Oct 6, 2026
  10. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  11. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. m-natarajan commented on Oct 6, 2026

    @m-natarajan

    Original issue not reproducible on Win 11/Chrome build v9.5.3-2. But encounter a different issue now - #103221

    Recording.90.mp4

    Not reproducible on iPhone 16/18.7.8 and Pixel 8a Android 16 build build v9.5.3-2

    az_recorder_20261006_135447.mp4
    ScreenRecording_10-06-2026.13-44-47_1.MP4
  13. removed
    DeployBlockerCash
    on Oct 6, 2026
  14. added
    Daily
    and removed
    Reviewing
    Hourly
    on Oct 6, 2026
  15. changed the title [-]Spend - App crashes after returning to expense RHP from expense report[/-] [+][Due for payment 2026-10-13] Spend - App crashes after returning to expense RHP from expense report[/+] on Oct 6, 2026
  16. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    @thelullabyy

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.3-4 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-10-13. 🎊

    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

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions