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
IOU - An expected error when Pay with wallet to user without wallet #98966
Version Number: v9.4.55-4 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#95005 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Windows 11 / Chrome, Android 13 / Xiaomi Poco F5 App Component: Money Requests
Action Performed:
Preconditions:
User A: Enable the wallet as payer account
User A and B set the USD currency
Login as user A (payer)
Start chat with user B > click + button > Pay B
Enter any amount > Pay with wallet
Open the expense details
Expected Result:
User A successfully Pay with wallet to a user without a wallet
Actual Result:
An expected error when Pay with wallet to user without wallet
Root Cause: The App is correctly rendering an error that the backend returns. Paying a wallet‑less recipient with the Expensify Wallet should hold the funds (a "Payment is on hold until they enable their wallet" state), but the backend command is instead responding with a failure jsonCode. The frontend only ever attaches this generic error on an API failure of the wallet‑payment command — there is no client‑side/optimistic path that produces it — so the red "Unexpected error. Please try again later." on the expense is a faithful reflection of a backend rejection, not an App bug.
This almost certainly means the frontend for the held‑payment feature (PR #95005) merged ahead of its companion backend support. That PR's own description notes it "relies on the companion backend change… so the user‑initiated cancel actually returns the held wallet funds." If the backend doesn't yet accept/hold a wallet payment to a wallet‑less recipient, the very first step (Pay) errors out and QA never reaches the new Cancel‑payment flow.
Recommended Fix: This requires a change outside the App repo — the wallet‑payment backend command must accept a payment to a wallet‑less recipient and place it in the held/queued state instead of returning an error. Please escalate to an internal engineer with backend access (this ties to the internal issue linked from PR #95005). No App‑repo code change is needed to stop the error; the App is behaving correctly.
Investigation details & evidence
How the error surfaces (all in the public App repo, SHA 07a4f68):
The "Pay with wallet" path routes to WRITE_COMMANDS.PAY_MONEY_REQUEST_WITH_WALLET (or SEND_MONEY_WITH_WALLET for the + → Pay send‑money flow): PayMoneyRequest.ts:930-938.
The error is set only in failureData (applied by Onyx only on a non‑200 API response) — it attaches iou.error.other to the PAY IOU report action: PayMoneyRequest.ts:416-425 (and the send‑money equivalent in SendMoney.ts). Optimistic/success data never sets it.
It renders as the red brick‑road row via getLatestErrorMessageField(action) inside OfflineWithFeedback: ReportActionItem.tsx:596-604.
What the correct (non‑error) outcome looks like: a REIMBURSEMENT_QUEUED action rendered by ReimbursementQueuedContent.tsx showing "started settling up. Payment is on hold until {name} enables their wallet." with an "Enable wallet" button — iou.waitingOnEnabledWallet at en.ts:1626. Seeing a red error instead of this queued action is the tell that the backend rejected the payment.
Alternative explanations considered:
Frontend optimistic bug — ruled out: no optimistic/success branch sets this error; it exists only in failureData.
Missing receiver‑wallet pre‑check in App — the KYCWall path checks the payer's wallet, not the recipient's, so the App legitimately hands the "held payment" decision to the backend by design.
Production log confirmation: I was unable to pull VictoriaLogs in this run (the log tooling wasn't available). To close this out definitively, an engineer can check the jsonCode returned by the wallet‑payment command for a wallet‑less recipient in the reported window (~2026‑08‑19, v9.4.55‑4) — a non‑200 code with no REIMBURSEMENT_QUEUED action confirms the backend rejection.
Possibly related:#96345 — "[Exploratory] Report - Error appears on the report when Cancel Payment" (same P2P‑wallet cancel/hold feature area; may share the same backend dependency).
Next Steps: This needs a backend change and can't be fixed in the App repo — an internal engineer should verify/deploy the held‑payment backend support behind PR #95005. Reply with @MelvinBot <your feedback> to refine this analysis.
Yes — I agree this can be closed as "not a bug", with one caveat: nobody posted a retest result after KioCoan updated the QA preconditions, so the closure rests on his explanation rather than a fresh QA pass.
Why the App side supports closing:
The error is set only in failureData — it attaches on a non-200 API response and nothing else: src/libs/actions/IOU/PayMoneyRequest.ts:416-425. There's no optimistic or client-side path that produces "Unexpected error. Please try again later.", so the App is faithfully rendering a backend rejection. That matches KioCoan's explanation exactly: the payment was rejected because one side was a test wallet (staging, activated with test PII) and the other wasn't — an environment artifact, not a code defect in App.
What I could not verify: the backend rejection rule itself. The Auth repo isn't accessible from this run, and log tooling wasn't available, so I have no server-side jsonCode to confirm the test-wallet mismatch was the actual cause.
Suggested path: ask mitarachim to rerun the updated QA steps on #95005 (User B must complete only the Additional Details step with test PII, and stop). A passing retest turns this from "explained" into "confirmed". If a retest isn't practical, closing on the current evidence is reasonable.
Note #96345 ("Error appears on the report when Cancel Payment") is a separate open issue in the same feature area — closing this one doesn't cover it.
@Krishna2323 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Activity
applause-bot commentedon Aug 19, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/f73973d31231cc78d9e48fdeb1143d477b73551cb71f0288437b4a8b1bef4e71
MelvinBot commentedon Aug 19, 2026
Issue Analysis
Root Cause: The App is correctly rendering an error that the backend returns. Paying a wallet‑less recipient with the Expensify Wallet should hold the funds (a "Payment is on hold until they enable their wallet" state), but the backend command is instead responding with a failure
jsonCode. The frontend only ever attaches this generic error on an API failure of the wallet‑payment command — there is no client‑side/optimistic path that produces it — so the red "Unexpected error. Please try again later." on the expense is a faithful reflection of a backend rejection, not an App bug.This almost certainly means the frontend for the held‑payment feature (PR #95005) merged ahead of its companion backend support. That PR's own description notes it "relies on the companion backend change… so the user‑initiated cancel actually returns the held wallet funds." If the backend doesn't yet accept/hold a wallet payment to a wallet‑less recipient, the very first step (Pay) errors out and QA never reaches the new Cancel‑payment flow.
Recommended Fix: This requires a change outside the App repo — the wallet‑payment backend command must accept a payment to a wallet‑less recipient and place it in the held/queued state instead of returning an error. Please escalate to an internal engineer with backend access (this ties to the internal issue linked from PR #95005). No App‑repo code change is needed to stop the error; the App is behaving correctly.
Investigation details & evidence
How the error surfaces (all in the public App repo, SHA
07a4f68):WRITE_COMMANDS.PAY_MONEY_REQUEST_WITH_WALLET(orSEND_MONEY_WITH_WALLETfor the+ → Paysend‑money flow):PayMoneyRequest.ts:930-938.failureData(applied by Onyx only on a non‑200 API response) — it attachesiou.error.otherto the PAY IOU report action:PayMoneyRequest.ts:416-425(and the send‑money equivalent inSendMoney.ts). Optimistic/success data never sets it.getLatestErrorMessageField(action)insideOfflineWithFeedback:ReportActionItem.tsx:596-604.iou.error.other= "Unexpected error. Please try again later." —en.ts:1597.What the correct (non‑error) outcome looks like: a
REIMBURSEMENT_QUEUEDaction rendered byReimbursementQueuedContent.tsxshowing "started settling up. Payment is on hold until {name} enables their wallet." with an "Enable wallet" button —iou.waitingOnEnabledWalletaten.ts:1626. Seeing a red error instead of this queued action is the tell that the backend rejected the payment.Alternative explanations considered:
failureData.Production log confirmation: I was unable to pull VictoriaLogs in this run (the log tooling wasn't available). To close this out definitively, an engineer can check the
jsonCodereturned by the wallet‑payment command for a wallet‑less recipient in the reported window (~2026‑08‑19, v9.4.55‑4) — a non‑200 code with noREIMBURSEMENT_QUEUEDaction confirms the backend rejection.Possibly related: #96345 — "[Exploratory] Report - Error appears on the report when Cancel Payment" (same P2P‑wallet cancel/hold feature area; may share the same backend dependency).
Next Steps: This needs a backend change and can't be fixed in the App repo — an internal engineer should verify/deploy the held‑payment backend support behind PR #95005. Reply with
@MelvinBot <your feedback>to refine this analysis.melvin-bot commentedon Aug 19, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Krishna2323 (
External)melvin-bot commentedon Aug 19, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022090013411646587648
melvin-bot commentedon Aug 24, 2026
@Krishna2323 Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Aug 26, 2026
@Krishna2323 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Aug 28, 2026
@Krishna2323 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
Krishna2323 commentedon Aug 31, 2026
@MelvinBot can you please check #95005 (comment) and confirm this issue can be closed?
MelvinBot commentedon Aug 31, 2026
Yes — I agree this can be closed as "not a bug", with one caveat: nobody posted a retest result after
KioCoanupdated the QA preconditions, so the closure rests on his explanation rather than a fresh QA pass.Why the App side supports closing:
failureData— it attaches on a non-200 API response and nothing else:src/libs/actions/IOU/PayMoneyRequest.ts:416-425. There's no optimistic or client-side path that produces "Unexpected error. Please try again later.", so the App is faithfully rendering a backend rejection. That matchesKioCoan's explanation exactly: the payment was rejected because one side was a test wallet (staging, activated with test PII) and the other wasn't — an environment artifact, not a code defect in App.What I could not verify: the backend rejection rule itself. The Auth repo isn't accessible from this run, and log tooling wasn't available, so I have no server-side
jsonCodeto confirm the test-wallet mismatch was the actual cause.Suggested path: ask
mitarachimto rerun the updated QA steps on #95005 (User B must complete only the Additional Details step with test PII, and stop). A passing retest turns this from "explained" into "confirmed". If a retest isn't practical, closing on the current evidence is reasonable.Note #96345 ("Error appears on the report when Cancel Payment") is a separate open issue in the same feature area — closing this one doesn't cover it.
view run
Evidence (1)
Recordings
- [▶ Session recording of the verification run](https://melvinbot-assets.exops.io/session-33351230669-1-70d1d3f5-014b-470a-8b8a-ae38551e84ae.webm)melvin-bot commentedon Sep 2, 2026
@Krishna2323 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
melvin-bot commentedon Sep 3, 2026
@Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Sep 3, 2026
@Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 4, 2026
@Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Sep 7, 2026
@Krishna2323 Still overdue 6 days?! Let's take care of this!
Krishna2323 commentedon Sep 8, 2026
This issue should be closed as per this: #95005 (comment)
melvin-bot commentedon Sep 11, 2026
@Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick!