You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-05-20] Expense - App crashes if expense opens after resolving duplicates by "Keep All" #90064
Version Number: 9.3.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/folder/13176704/test-cases/41236825 Email or phone of affected tester (no customers):fischer9966+050826aemp@gmail.com Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: iPhone 17 Pro / 26.4.2. Google Pixel 5 / Android 14, MacOS 26.4.1 / Chrome, Safari App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com or open App
Login with new gmail.account
Create new collect workspace
Open the workspace chat
Create two duplicated expenses
Open any of the just created expenses
Click "Review Duplicates"
Click "Keep All"
Click the first expense after resolving duplicates
Wait some seconds
Expected Result:
Expense opens correctly after resolving duplicates by "Keep All"
Actual Result:
App crashes if expense opens after resolving duplicates by "Keep All"
👋 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:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #88765 - "Fix empty tax code page in Review Duplicates flow" by @MelvinBot (Medium confidence) | Secondary candidate: #51366 - "Open reports at first unread action" by @janicduplessis (Low confidence) Related Issues: #85218 (fixed by PR 88765)
Recommendation: NEEDS INVESTIGATION
The crash occurs specifically in the "Keep All" path of the duplicate review flow, which does not go through the Confirmation.tsx or mergeDuplicates/resolveDuplicates code paths modified by PR 88765. However, PR 88765 is the only staging PR that directly touches the duplicate review flow code. A secondary candidate, PR 51366, makes significant architectural changes to how reports are opened (scrolling to first unread action), which could interact with the new dismissed-violation report action added by "Keep All". Neither candidate is confirmed without reproduction and stack trace data from Sentry.
Assigned: @MelvinBot (PR author), @dmkt9, @stitesExpensify (approving reviewers) from highest-confidence causing PR | @janicduplessis (author of secondary candidate) Labels: DeployBlockerCash label kept (staging-only bug with App PR candidates). No label changes made.
Merged 2026-05-04, directly in the StagingDeployCash list.
Modified src/libs/actions/IOU/Duplicate.ts, src/pages/TransactionDuplicate/Confirmation.tsx, src/libs/TransactionUtils/index.ts, src/libs/API/parameters/MergeDuplicatesParams.ts, and src/libs/API/parameters/ResolveDuplicatesParams.ts.
Significantly refactored Confirmation.tsx with new useOnyx hooks for duplicatedTransactionPolicy, new taxData memoization, and changed how handleMergeDuplicates and handleResolveDuplicates are called.
Introduced a new buildOptimisticTransactionData helper that now explicitly sets taxName: taxCode ? null : originalSelectedTransaction?.taxName.
However, the "Keep All" user flow does NOT go through Confirmation.tsx or mergeDuplicates/resolveDuplicates. It calls dismissDuplicateTransactionViolation in Transaction.ts directly from Review.tsx.
PR 51366 - Open reports at first unread action:
Merged 2026-05-08, in the StagingDeployCash list.
Significantly changes ReportActionsView.tsx, ReportActionsList.tsx, usePaginatedReportActions.ts, PaginationUtils.ts, and useFlashListScrollKey.ts.
"Keep All" (dismissDuplicateTransactionViolation) adds a new optimistic DISMISSED_VIOLATION report action to each transaction's thread report. When the user subsequently opens an expense thread, PR 51366's new logic tries to scroll to the "first unread action" - which could be the newly-added dismissed violation action. If the pagination or scroll-key logic encounters an unexpected state (null/undefined) in this path, it could cause a crash.
The "Wait some seconds" in the repro steps is consistent with an async pagination/scroll operation failing after the initial render.
Why this is staging-only: Both PRs are new to staging and not in production.
Platforms affected: Crash is on iOS App, Android App, Windows Chrome, MacOS Chrome/Safari - consistent with a JavaScript-level crash rather than platform-specific.
Verification
PR 88765 verified to modify src/pages/TransactionDuplicate/Confirmation.tsx, src/libs/actions/IOU/Duplicate.ts, and src/libs/TransactionUtils/index.ts - all core to the duplicate review flow.
PR 51366 verified to modify src/pages/inbox/report/ReportActionsView.tsx, src/pages/inbox/report/ReportActionsList.tsx, src/hooks/usePaginatedReportActions.ts - core to how expense thread reports are opened.
The "Keep All" code path in src/pages/TransactionDuplicate/Review.tsx calls dismissDuplicateTransactionViolation then Navigation.goBack(). The function adds new report actions to the transaction thread.
Root Cause
Cannot be definitively confirmed without a Sentry stack trace. Two plausible theories:
PR 88765 side-effect theory: Changes to buildOptimisticTransactionData (setting taxName: null) or changes to Confirmation.tsx's hooks may have introduced a state inconsistency in the REVIEW_DUPLICATES Onyx key that persists after "Keep All" and causes a crash when the expense is subsequently opened.
PR 51366 interaction theory: After "Keep All" dismisses the duplicate violation and adds a new report action to the expense thread, PR 51366's new "open at first unread action" logic encounters unexpected pagination state (the newly-created dismissed violation action as the anchor) and crashes. The "Wait some seconds" timing in the repro steps supports an async scroll/pagination operation failing.
The PR authors and reviewers should be looped in to confirm which path is actually crashing, likely using Sentry crash data from staging.
Problem: After resolving duplicate expenses via "Keep All", opening one of the expenses causes the app to crash a few seconds later.
Root Cause: The crash is triggered by the DismissViolation server response arriving while the user is viewing a transaction thread. The keepAll function in Review.tsx:151-161 calls dismissDuplicateTransactionViolation (which optimistically removes DUPLICATED_TRANSACTION violations) and then Navigation.goBack(). When the server processes this a few seconds later, it sends back Onyx updates that trigger a re-render cascade across several deeply-subscribed components.
On a Collect workspace (the repro steps create one), auto-submit is enabled by default. When the duplicate violation — the only blocking violation — is dismissed, the server likely auto-submits the expense report, changing its statusNum from OPEN to SUBMITTED. This state transition propagates through the reportTransactionsAndViolations derived value and into the component tree viewing the transaction thread, where MoneyRequestHeader, MoneyRequestHeaderPrimaryAction, and MoneyRequestReportTransactionsNavigation all re-render simultaneously with changed violation, report action, and report state data.
Additionally, the successData in dismissDuplicateTransactionViolation sets optimistic dismissed-violation report actions to null on the transaction thread reports exactly when the user may be viewing them.
Confidence: Medium — the code investigation confirms the mechanism (optimistic removal → server response → state transition → re-render cascade), but without the Sentry crash stack trace for version 9.3.69-0, I cannot pinpoint the exact line that throws. The timing ("wait some seconds") strongly correlates with server response arrival.
Investigation details
Key code flow
Keep All button (Review.tsx:151) calls dismissDuplicateTransactionViolation + Navigation.goBack()
Server response (Transaction.ts:659-671): successData nullifies optimistic report actions on transaction thread reports + server may push additional auto-submit updates
Crash: one or more of the transaction thread components encounters unexpected state during the combined re-render
Potential regression PRs in 9.3.69-0
Open reports at first unread action #51366 ("Open reports at first unread action") — massive rewrite of ReportActionsList, ReportActionsView, and PaginationUtils that changed how report actions are loaded and displayed, including for MoneyRequestReportActionsList
Sentry crash stack trace for 9.3.69-0 would immediately identify the exact component and line
Testing on a workspace without auto-submit could isolate whether the auto-submit state transition is the trigger
Checking if the crash also occurs with "Review Duplicates" → confirm one (merge) flow, or only with "Keep All"
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Expense - App crashes if expense opens after resolving duplicates by "Keep All"[/-][+][Due for payment 2026-05-20] Expense - App crashes if expense opens after resolving duplicates by "Keep All"[/+]on May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dmkt9 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
Activity
melvin-bot commentedon May 8, 2026
Triggered auto assignment to @AndrewGable (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 8, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 8, 2026
👋 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:
OSBotify commentedon May 8, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #88765 - "Fix empty tax code page in Review Duplicates flow" by @MelvinBot (Medium confidence) | Secondary candidate: #51366 - "Open reports at first unread action" by @janicduplessis (Low confidence)
Related Issues: #85218 (fixed by PR 88765)
Recommendation: NEEDS INVESTIGATION
The crash occurs specifically in the "Keep All" path of the duplicate review flow, which does not go through the
Confirmation.tsxormergeDuplicates/resolveDuplicatescode paths modified by PR 88765. However, PR 88765 is the only staging PR that directly touches the duplicate review flow code. A secondary candidate, PR 51366, makes significant architectural changes to how reports are opened (scrolling to first unread action), which could interact with the new dismissed-violation report action added by "Keep All". Neither candidate is confirmed without reproduction and stack trace data from Sentry.Assigned: @MelvinBot (PR author), @dmkt9, @stitesExpensify (approving reviewers) from highest-confidence causing PR | @janicduplessis (author of secondary candidate)
Labels:
DeployBlockerCashlabel kept (staging-only bug with App PR candidates). No label changes made.Detailed Analysis
Evidence
PR 88765 - Fix empty tax code page in Review Duplicates flow:
src/libs/actions/IOU/Duplicate.ts,src/pages/TransactionDuplicate/Confirmation.tsx,src/libs/TransactionUtils/index.ts,src/libs/API/parameters/MergeDuplicatesParams.ts, andsrc/libs/API/parameters/ResolveDuplicatesParams.ts.Confirmation.tsxwith newuseOnyxhooks forduplicatedTransactionPolicy, newtaxDatamemoization, and changed howhandleMergeDuplicatesandhandleResolveDuplicatesare called.buildOptimisticTransactionDatahelper that now explicitly setstaxName: taxCode ? null : originalSelectedTransaction?.taxName.Confirmation.tsxormergeDuplicates/resolveDuplicates. It callsdismissDuplicateTransactionViolationinTransaction.tsdirectly fromReview.tsx.PR 51366 - Open reports at first unread action:
ReportActionsView.tsx,ReportActionsList.tsx,usePaginatedReportActions.ts,PaginationUtils.ts, anduseFlashListScrollKey.ts.dismissDuplicateTransactionViolation) adds a new optimisticDISMISSED_VIOLATIONreport action to each transaction's thread report. When the user subsequently opens an expense thread, PR 51366's new logic tries to scroll to the "first unread action" - which could be the newly-added dismissed violation action. If the pagination or scroll-key logic encounters an unexpected state (null/undefined) in this path, it could cause a crash.Why this is staging-only: Both PRs are new to staging and not in production.
Platforms affected: Crash is on iOS App, Android App, Windows Chrome, MacOS Chrome/Safari - consistent with a JavaScript-level crash rather than platform-specific.
Verification
src/pages/TransactionDuplicate/Confirmation.tsx,src/libs/actions/IOU/Duplicate.ts, andsrc/libs/TransactionUtils/index.ts- all core to the duplicate review flow.src/pages/inbox/report/ReportActionsView.tsx,src/pages/inbox/report/ReportActionsList.tsx,src/hooks/usePaginatedReportActions.ts- core to how expense thread reports are opened.src/pages/TransactionDuplicate/Review.tsxcallsdismissDuplicateTransactionViolationthenNavigation.goBack(). The function adds new report actions to the transaction thread.Root Cause
Cannot be definitively confirmed without a Sentry stack trace. Two plausible theories:
PR 88765 side-effect theory: Changes to
buildOptimisticTransactionData(settingtaxName: null) or changes toConfirmation.tsx's hooks may have introduced a state inconsistency in theREVIEW_DUPLICATESOnyx key that persists after "Keep All" and causes a crash when the expense is subsequently opened.PR 51366 interaction theory: After "Keep All" dismisses the duplicate violation and adds a new report action to the expense thread, PR 51366's new "open at first unread action" logic encounters unexpected pagination state (the newly-created dismissed violation action as the anchor) and crashes. The "Wait some seconds" timing in the repro steps supports an async scroll/pagination operation failing.
The PR authors and reviewers should be looped in to confirm which path is actually crashing, likely using Sentry crash data from staging.
MelvinBot commentedon May 8, 2026
Proposal
Problem: After resolving duplicate expenses via "Keep All", opening one of the expenses causes the app to crash a few seconds later.
Root Cause: The crash is triggered by the
DismissViolationserver response arriving while the user is viewing a transaction thread. ThekeepAllfunction inReview.tsx:151-161callsdismissDuplicateTransactionViolation(which optimistically removesDUPLICATED_TRANSACTIONviolations) and thenNavigation.goBack(). When the server processes this a few seconds later, it sends back Onyx updates that trigger a re-render cascade across several deeply-subscribed components.On a Collect workspace (the repro steps create one), auto-submit is enabled by default. When the duplicate violation — the only blocking violation — is dismissed, the server likely auto-submits the expense report, changing its
statusNumfrom OPEN to SUBMITTED. This state transition propagates through thereportTransactionsAndViolationsderived value and into the component tree viewing the transaction thread, whereMoneyRequestHeader,MoneyRequestHeaderPrimaryAction, andMoneyRequestReportTransactionsNavigationall re-render simultaneously with changed violation, report action, and report state data.Additionally, the
successDataindismissDuplicateTransactionViolationsets optimistic dismissed-violation report actions tonullon the transaction thread reports exactly when the user may be viewing them.Confidence: Medium — the code investigation confirms the mechanism (optimistic removal → server response → state transition → re-render cascade), but without the Sentry crash stack trace for version 9.3.69-0, I cannot pinpoint the exact line that throws. The timing ("wait some seconds") strongly correlates with server response arrival.
Investigation details
Key code flow
Review.tsx:151) callsdismissDuplicateTransactionViolation+Navigation.goBack()Transaction.ts:601-626): removes DUPLICATED_TRANSACTION violations, addsdismissedViolationsto transactions, creates optimistic report actions, updates expense report nextStepTransaction.ts:659-671): successData nullifies optimistic report actions on transaction thread reports + server may push additional auto-submit updatesPotential regression PRs in 9.3.69-0
ReportActionsList,ReportActionsView, andPaginationUtilsthat changed how report actions are loaded and displayed, including forMoneyRequestReportActionsListMoneyRequestReportTransactionListsorting logicWhat would confirm/disprove this
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.3 remaining items
m-natarajan commentedon May 9, 2026
Not repro, Chrome and iPhone13/26.4.2 / v9.3.69-3 (Waiting for validation on Android)
ScreenRecording_05-09-2026.16-14-50_1.MP4
REC-20260509204736.mp4
melvin-bot commentedon May 12, 2026
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.
[-]Expense - App crashes if expense opens after resolving duplicates by "Keep All"[/-][+][Due for payment 2026-05-20] Expense - App crashes if expense opens after resolving duplicates by "Keep All"[/+]melvin-bot commentedon May 13, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 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-05-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 13, 2026
@dmkt9 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]