Skip to content

[Due for payment 2026-03-23] [$250] Android - Report - App crashes after splitting an expense and deleting one split offline. #82611

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: 9.3.20.2
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/TR-5427/folder/13176791/41237176/1193287157
Email or phone of affected tester (no customers): ibellicotest+2250@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Critical User Impact
Device used: Motorola MotoG60 / Android 12 (Hybrid app)
App Component: Money Requests

Action Performed:

Prerequisite: Account has at least one workspace.

  1. Open the Expensify app.
  2. Open any workspace chat.
  3. Create a manual expense.
  4. Open the just created expense.
  5. Turn off internet connection.
  6. Tap on "More" > "Split"
  7. Save the splits amount.
  8. Long tap and select any of the splits.
  9. Tap on the dropdown menu and delete the split.
  10. Note that app crashes after the last action.

Expected Result:

After splitting an expense offline and deleting one split, the user should be able to continue using the app without any issue.

Actual Result:

App crashes after splitting an expense while offline and deleting one of the splits.

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

logs.txt

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    Bug
    DeployBlocker
    on Feb 17, 2026
  2. melvin-bot commented on Feb 17, 2026

    @melvin-bot

    Triggered auto assignment to @garrettmknight (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.

  3. added
    DeployBlockerCash
    on Feb 17, 2026
  4. melvin-bot commented on Feb 17, 2026

    @melvin-bot

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

  5. melvin-bot commented on Feb 17, 2026

    @melvin-bot

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

  6. github-actions commented on Feb 17, 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.
  7. OSBotify commented on Feb 17, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #82315 - "RevertSplitTransaction fails with UNIQUE constraint: App reuses existing reportActionID instead of generating a new one" by @ZhenjaHorbach (High confidence)
    Related Issues: #81994

    Recommendation: REVERT

    PR #82315 introduced a change to fix a UNIQUE constraint issue, but inadvertently broke the offline split deletion flow. The fix should be rolled back and reworked to handle the offline case properly.

    Labels: Keeping DeployBlockerCash (Frontend bug - App PR caused it and not reproducible in production)

    Detailed Analysis

    Evidence

    PR #82315 merged on Feb 16, 2026 and is in the staging deploy checklist (line in StagingDeployCash #82567). The bug is only reproducible on staging, not production, which aligns perfectly with the PR timeline.

    The PR changed line 1229 in src/libs/actions/IOU/Split.ts:

    - currentReportActionID: currentReportAction?.reportActionID,
    + currentReportActionID: !isReverseSplitOperation ? currentReportAction?.reportActionID : undefined,

    Verification

    The affected file path is /home/runner/_work/App/App/src/libs/actions/IOU/Split.ts which directly handles split expense operations. The PR modifies how currentReportActionID is passed during reverse split operations (when deleting splits).

    Root Cause

    When a user:

    1. Creates an expense offline
    2. Splits it offline
    3. Deletes one split offline (triggering a reverse split operation)

    The crash occurs because:

    1. PR RevertSplitTransaction fails with UNIQUE constraint: App reuses existing reportActionID instead of generating a new one #82315 sets currentReportActionID to undefined for reverse split operations (line 1229)
    2. In offline mode, when looking up currentReportAction at line 1144, the report actions may not exist in Onyx yet because the split was just created optimistically
    3. This makes currentReportAction undefined, which gets passed as linkedTrackedExpenseReportAction at lines 1172 and 1201
    4. In buildOptimisticIOUReportAction (ReportUtils.ts line 7130), the code does ...linkedExpenseReportAction
    5. Spreading undefined (...undefined) causes a JavaScript crash in React Native on Android

    The PR was designed to fix a backend UNIQUE constraint issue by not reusing report action IDs during split reversals. However, it did not account for the offline scenario where the original report action might not exist in Onyx yet, causing the spread operator to crash when trying to spread undefined.

    Why not reproducible in production

    Production is still on an older version without PR #82315, so the offline split deletion flow works (though it may fail with the UNIQUE constraint error when syncing online, which was the original bug #81994 was trying to fix).

  8. 54 remaining items

  9. melvin-bot commented on Mar 23, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  10. added
    Bug
    and removed
    Bug
    on Mar 23, 2026
  11. MelvinBot commented on Mar 23, 2026

    @MelvinBot
    Contributor

    This issue has already been fully analyzed and resolved:

    • Root Cause: React Native Fabric Android bug in SurfaceMountingManager.java — getViewState() crashes when it can't find a native view tag during batched mount operations, triggered by simultaneous Onyx optimistic updates during offline split deletion combined with the FlashList migration.
    • Fix: PR fix(react-native): log soft exception for missing viewState #84303 by rohit9625 patched updateProps in SurfaceMountingManager.java to use getNullableViewState() and log a soft exception instead of crashing.
    • Status: Fix deployed to production. Issue is in Awaiting Payment.

    No further analysis needed.

  12. mallenexpensify commented on Mar 23, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @rohit9625 paid $250 via Upwork
    Contributor+: @bernhardoj due $250 via NewDot

    @rohit9625 can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022036206561439948477

    I think there might be an automation issue here.

    • Issue created as a deploy blocker - no Upwork job created
    • Issue relabeled to not be a deploy blocker, External added - no Upwork job created
    • Bug remove and re-added - no Upwork job created.

    Unsure of specifics or a fix, chime in if you have any ideas.

  13. bernhardoj commented on Mar 24, 2026

    @bernhardoj
    Contributor

    I think it fails to create the Upwork job when the external label is added. Melvin commented on it here.

  14. bernhardoj commented on Mar 24, 2026

    @bernhardoj
    Contributor

    Requested in ND.

  15. rohit9625 commented on Mar 24, 2026

    @rohit9625
    Contributor

    Hi @mallenexpensify, I just accepted the offer. Thank you :)

  16. mallenexpensify commented on Mar 24, 2026

    @mallenexpensify
    Contributor

    @rohit9625 paid, summary updated above. Thx.

    I think it fails to create the Upwork job when the external label is added. Melvin commented on it #82611 (comment).

    hmm.. from Feb 17 so I'm not going to go down 🐰🕳. Maybe it's just our integration failing, which we've seen a bunch.

  17. garrettmknight commented on Mar 25, 2026

    @garrettmknight
    Contributor

    $250 approved for @bernhardoj

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternalMelvin Triage

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions