Repository navigation
Description
Customer report
A customer using New Expensify reports that receipts are intermittently missing after they add them, and that expense descriptions are being erased. They now retain separate copies of their receipts because they do not trust capture to persist reliably.
These are customer-reported symptoms, not yet reproduced or independently verified. It is not yet known whether the receipts fail to upload, fail to sync, become detached, or are simply not displayed. It is also unknown whether the description loss shares the same cause.
Expected behavior
Receipts added to expenses remain accessible, and saved descriptions persist unless explicitly changed or removed.
Investigation
- Review the affected sessions and available receipt-upload/sync telemetry through an appropriately private channel.
- Establish the capture method, device/OS, app version, connectivity state, and timing of an affected attempt.
- Trace an affected receipt from capture through upload, expense creation, and subsequent updates to identify where it stops being accessible.
- Investigate which operation clears the description and whether it is related to the receipt symptom.
- Record verified reproduction steps and scope; add regression coverage once the cause is established.
Known limitations
No reproduction steps, affected expense/receipt IDs, session timestamps, or confirmed root cause are available in this sanitized report. Default platform was reported as New Expensify; the exact client is unconfirmed.
Privacy
Customer names, email addresses, company information, account identifiers, customer quotes, and links to customer records or identifying source material are intentionally omitted.
Issue Owner
Current Issue Owner: @rinejUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022118472441771038138
- Upwork Job ID: 2118472441771038138
- Last Price Increase: 2026-11-05
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsCRITICAL
Activity
melvin-bot commentedon Nov 5, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)[-]Receipt retention bug[/-][+][$175] Receipt retention bug[/+]melvin-bot commentedon Nov 5, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022118472441771038138
vanshshah11 commentedon Nov 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue
Customers on New Expensify report that receipts attached to expenses intermittently disappear, and that expense descriptions (comments) get erased. No reproduction exists yet — the failure is intermittent and the affected sessions were not captured. We need the actual root cause, verified reproduction steps, and a fix.
What is the root cause of that problem?
I've traced the write paths, and I believe both symptoms share one mechanism: when a queued transaction write gives up after exhausting retries, its
failureDatareverts the entire transaction snapshot captured at queue time — wiping out any receipt/description changes that were made after that write was queued.The chain:
updateMoneyRequestDescription,updateMoneyRequestMerchant, etc. all build their failure revert ingetUpdateMoneyRequestParams(src/libs/actions/IOU/UpdateMoneyRequest.ts:2323-2333) as a whole-object snapshot:value: {...transaction, pendingFields: clearedPendingFields, ...}. Note the asymmetry —pendingFieldsis carefully field-scoped (getUpdatedTransaction.ts:45), but the value revert is not.SequentialQueuefires that revert on retry exhaustion (src/libs/Network/SequentialQueue.ts:580-601— "Request failed too many times, giving up" →Onyx.update(requestToProcess.failureData)).UPDATE_MONEY_REQUEST_*commands —RequestConflictUtils.tsonly matches OpenReport/reconnect/comment/policy commands — so a description edit and a merchant edit on the same expense queue as independent entries, each carrying its own full-snapshot revert.So the customer scenario is: edit a field (merchant/amount) while flaky-networked → queue backs up → user then adds a receipt and edits the description (optimistic merges land locally) → the original write fails permanently and exhausts retries → its failureData merges the stale snapshot back over the transaction → description reverts to the old value and the receipt reverts to whatever existed before (or
null) — both reported symptoms in one mechanism.Two adjacent contributors for the receipt-specific symptom:
replaceReceipt's failureData (src/libs/actions/IOU/Receipt.ts:328-348) revertsreceipttooldReceipt ?? null— when a first-ever receipt attach gives up, the receipt silently becomesnull(only alogReceiptGaveUptelemetry line, invisible to the user).ReceiptUploadRetryHandler(src/libs/ReceiptUploadRetryHandler/index.ts:81-84) gives up permanently if the local file was evicted mid-retry-window — no recovery path.This explains the intermittency (requires failure + retry exhaustion), why it survives app restarts (queue is persisted via
PersistedRequests.ts), and why the customer "no longer trusts capture to persist."What changes do you think we should make in code to solve the problem?
getUpdateMoneyRequestParams, revert only the fields the command actually changed (mirrorgetClearedPendingFields), instead of spreading the whole queued snapshot. This is the core fix.UPDATE_MONEY_REQUEST_*commands keyed ontransactionID(coalesce queued updates for the same transaction to the latest, following the existingcheckAndFixConflictingRequestpattern) so multiple independent full-snapshot reverts can't interleave.What specific scenarios should be covered by automated tests?
REPLACE_RECEIPTretry exhaustion → assert receipt state and user-visible error.UPDATE_MONEY_REQUEST_*for the sametransactionID→ assert no stale-snapshot clobber after one fails.What alternative solutions did you explore?
OnyxUpdates.tsflat merges): possible for the description symptom when two clients are involved, but doesn't explain receipt disappearance — kept as secondary diagnostic.ReceiptStorageeviction alone: explains receipts only, not descriptions. The unified failureData mechanism explains both and matches "intermittent" precisely.Investigation plan (the issue's checkboxes)
logReceiptGaveUp+ "Request failed too many times" telemetry for transactionIDs with 2+ queued UPDATE_MONEY_REQUEST commands followed by the symptom.PR
PR will be linked here once created.
vanshshah11 commentedon Nov 6, 2026
Contributor details
Your Expensify account email: svansh1111@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01b6a593fd295a20bf
melvin-bot commentedon Nov 6, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
6 remaining items
mountiny commentedon Nov 10, 2026
@rinej @adhorodyski there are still a bunch of reviews by customers coming in, reporting various issues with the receipts retention. Let's keep on going through the logs and full story sessions to try to identify the flows where we might be missing the receipts
mountiny commentedon Nov 10, 2026
@rinej @adhorodyski another user email to check is here https://expensify.slack.com/archives/C05LX9D6E07/p1794343608742559
melvin-bot commentedon Nov 11, 2026
@rinej Huh... This is 4 days overdue. Who can take care of this?
adhorodyski commentedon Nov 13, 2026
Not overdue, investigating it. I'll post an update in Slack on my findings.