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-11-05] [$175] Android - Unexpected error text appears instead of Review text when connect BA #104723
Version Number: 9.5.16-0 Reproducible in staging?: Yes Reproducible in production?: Unable to validate in Prod - Provide reasoning. If this was caught during regression testing, add the test name, ID and link from BrowserStack:#104434 Email or phone of affected tester (no customers):fischer9966+102226+104434am@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Google Pixel 5 / Android 14 App Component: User Settings
Action Performed:
Precondition:
As the admin in OldDot create new workspace
Enable Workflows > "Collect bank account details" for this workspace
Invite new member without personal bank account connected
Steps:
Login to Android App as member from Precondition Step 3
Check an "Add deposit account" task with "Fix" button is shown in the Time sensitive section of Home Tab
Tap "Fix"
Verify the Collect deposit account flow opens
Complete the flow and add a bank account.
Tap "Confirm" on "Check your info" page
Verify that the warning is displayed with text "Please review your account number and routing number one more time before continuing..."
Expected Result:
The warning is displayed with text "Please review your account number and routing number one more time before continuing..." on "Check your info" page when user connect personal BA.
Actual Result:
Text "Unexpected error ..." is displayed instead of warning "Please review your account number and routing number one more time before continuing..." on "Check your info" page when user connect personal BA.
When the bank check fails, two errors land in PERSONAL_BANK_ACCOUNT.errors, and the page shows only the one with the newest timestamp key:
The backend sends the specific "Please review your account number…" error. The server clock sets its key.
The request's failureData adds the generic "An unexpected error occurred while trying to add your bank account…" error. The device clock sets its key (BankAccounts.ts:95-101).
The Home-tab entry point is not involved. Wallet and Home use the same component and API call.
What changes do you think we should make in order to solve the problem?
In createCollectOnlyDepositAccount, pass 0 as the error key for the generic failureData error. A server error then always sorts newer, and the generic text still shows when the server sends no error. The same file already does this, with a comment about clock skew (BankAccounts.ts:612-615).
Add a unit test: given a server error and the generic fallback, getLatestError returns the server error.
What alternative solutions did you explore? (Optional)
On the Confirm page, hide the generic fallback whenever another error exists. This works, but it puts the fix in the UI and doesn't fix the data.
Investigation details
The "Please review…" text is not in App, so it comes from the backend response's onyxData.
OnyxUpdates.ts:74-99 applies the response onyxData first, then merges failureData. Both errors stay in errors.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/104723) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Note: no analysis from Kimi was provided, and the discussion has no developer investigation. The root cause below is inferred from the symptoms and from how Expensify's API error handling normally works. Step 1 of the changes confirms it before the fix is applied.
Please re-state the problem that we are trying to solve in this issue.
A member adds a personal deposit bank account through the "Add deposit account" flow, which opens from the Home "Time sensitive" Fix task when the workspace has "Collect bank account details" enabled. On the "Check your info" page they tap Confirm. The backend's first-attempt response should show the message "Please review your account number and routing number one more time before continuing…". Instead the page shows the generic "Unexpected error…" text, so the user never sees the guidance they need to double-check their details. It was reproduced on Android.
What is the root cause of that problem?
The server returns a specific, user-facing message with a non-200 jsonCode when the user first confirms the account details. The client then displays the generic error instead of that message.
The most likely cause is in the personal bank account action (addPersonalBankAccount in src/libs/actions/BankAccounts.ts, used by the Check your info step). Its failureData unconditionally sets a hard-coded error, getMicroSecondOnyxErrorWithTranslationKey('walletPage.addBankAccountFailure'), on ONYXKEYS.PERSONAL_BANK_ACCOUNT. When the request comes back with a non-success jsonCode, this failureData is applied to Onyx and wins over the server's message. The confirmation step only renders personalBankAccount.errors, so it shows the generic text and the server's message is dropped.
This is a client-side issue in the request handling. The server response is correct. The reproduction was only on Android, but the logic is not platform-specific, so other platforms are likely affected too.
What changes do you think we should make in order to solve the problem?
Confirm the cause. Log or inspect the AddPersonalBankAccount response on Android. It should contain jsonCode ≠ 200 and a message with the "Please review your account number…" text. Also check whether PERSONAL_BANK_ACCOUNT.errors is overwritten by failureData.
Stop the hard-coded failure error from overriding the server message. In src/libs/actions/BankAccounts.ts, keep the generic error only as a fallback. Switch the call to API.makeRequestWithSideEffects, or add a response handler, so the server message can be used:
functionaddPersonalBankAccount(account: PlaidBankAccount,policyID?: string,source?: string){constparameters={/* unchanged */};constonyxData: OnyxData={optimisticData: [{onyxMethod: Onyx.METHOD.MERGE,key: ONYXKEYS.PERSONAL_BANK_ACCOUNT,value: {isLoading: true,errors: null},}],successData: [{onyxMethod: Onyx.METHOD.MERGE,key: ONYXKEYS.PERSONAL_BANK_ACCOUNT,value: {isLoading: false,errors: null,shouldShowSuccess: true},}],// No hard-coded error here – it is resolved from the response belowfailureData: [{onyxMethod: Onyx.METHOD.MERGE,key: ONYXKEYS.PERSONAL_BANK_ACCOUNT,value: {isLoading: false},}],};API.makeRequestWithSideEffects(WRITE_COMMANDS.ADD_PERSONAL_BANK_ACCOUNT,parameters,onyxData).then((response)=>{
changed the title [-]Android - Unexpected error text appears instead of Review text when connect BA[/-][+][$175] Android - Unexpected error text appears instead of Review text when connect BA[/+]on Oct 22, 2026
Activity
applause-bot commentedon Oct 22, 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/911b4c861262349064230a26b56c2d49c9bbda6dadc0983a2abcf0e893c4977b
https://platform.applause.com/services/links/v1/external/754e2ac518f7a4624dc7c2ebb28654760101645a8a9eee246e9e8af94a40cead
MelvinBot commentedon Oct 22, 2026
Proposal
What is the root cause of that problem?
When the bank check fails, two errors land in
PERSONAL_BANK_ACCOUNT.errors, and the page shows only the one with the newest timestamp key:failureDataadds the generic "An unexpected error occurred while trying to add your bank account…" error. The device clock sets its key (BankAccounts.ts:95-101).Surface verification error in Collect Deposit Account flow changed the Confirm page to show only
getLatestError(...)(Confirmation.tsx:97-101). If the device clock runs ahead of the server, the generic error gets the larger key and wins. That explains why one device shows it and others don't.The Home-tab entry point is not involved. Wallet and Home use the same component and API call.
What changes do you think we should make in order to solve the problem?
In
createCollectOnlyDepositAccount, pass0as the error key for the genericfailureDataerror. A server error then always sorts newer, and the generic text still shows when the server sends no error. The same file already does this, with a comment about clock skew (BankAccounts.ts:612-615).Add a unit test: given a server error and the generic fallback,
getLatestErrorreturns the server error.What alternative solutions did you explore? (Optional)
On the Confirm page, hide the generic fallback whenever another error exists. This works, but it puts the fix in the UI and doesn't fix the data.
Investigation details
onyxData.OnyxUpdates.ts:74-99applies the responseonyxDatafirst, then mergesfailureData. Both errors stay inerrors.Date.now() * 1000on the device (ErrorUtils.ts:49-51).getLatestErrorpicks the highest key (ErrorUtils.ts:173-180).Possibly related: [$175] All - Empty "Check your info" page appears in RHP after adding BA to Wallet shows the same generic error after Confirm, but it comes from a stale screen left after success. It is a different cause.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/104723)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Oct 22, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @huult (
External)Abdallah-1551 commentedon Oct 22, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
A member adds a personal deposit bank account through the "Add deposit account" flow, which opens from the Home "Time sensitive" Fix task when the workspace has "Collect bank account details" enabled. On the "Check your info" page they tap Confirm. The backend's first-attempt response should show the message "Please review your account number and routing number one more time before continuing…". Instead the page shows the generic "Unexpected error…" text, so the user never sees the guidance they need to double-check their details. It was reproduced on Android.
What is the root cause of that problem?
The server returns a specific, user-facing message with a non-200
jsonCodewhen the user first confirms the account details. The client then displays the generic error instead of that message.The most likely cause is in the personal bank account action (
addPersonalBankAccountinsrc/libs/actions/BankAccounts.ts, used by the Check your info step). ItsfailureDataunconditionally sets a hard-coded error,getMicroSecondOnyxErrorWithTranslationKey('walletPage.addBankAccountFailure'), onONYXKEYS.PERSONAL_BANK_ACCOUNT. When the request comes back with a non-successjsonCode, thisfailureDatais applied to Onyx and wins over the server's message. The confirmation step only renderspersonalBankAccount.errors, so it shows the generic text and the server'smessageis dropped.This is a client-side issue in the request handling. The server response is correct. The reproduction was only on Android, but the logic is not platform-specific, so other platforms are likely affected too.
What changes do you think we should make in order to solve the problem?
Confirm the cause. Log or inspect the
AddPersonalBankAccountresponse on Android. It should containjsonCode≠ 200 and amessagewith the "Please review your account number…" text. Also check whetherPERSONAL_BANK_ACCOUNT.errorsis overwritten byfailureData.Stop the hard-coded failure error from overriding the server message. In
src/libs/actions/BankAccounts.ts, keep the generic error only as a fallback. Switch the call toAPI.makeRequestWithSideEffects, or add a response handler, so the server message can be used:[-]Android - Unexpected error text appears instead of Review text when connect BA[/-][+][$175] Android - Unexpected error text appears instead of Review text when connect BA[/+]melvin-bot commentedon Oct 22, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022113243998145821352
melvin-bot commentedon Oct 22, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
camesenin commentedon Oct 22, 2026
melvin-bot commentedon Oct 22, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
huult commentedon Oct 23, 2026
App/src/libs/actions/BankAccounts.ts
Lines 614 to 615 in ba97c03
We can add key 0 so that a server-sent error always sorts newer than this fallback, even when there's device clock skew, as in the current solution.
App/src/libs/actions/BankAccounts.ts
Line 99 in ba97c03
I'm happy to proceed with @MelvinBot's proposal. LGTM!
🎀 👀 🎀 c+ reviewed.
21 remaining items
melvin-bot commentedon Nov 4, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Nov 4, 2026
Payment Summary
Resolving PRs:
Show the server bank verification error over the generic fallback in Collect deposit account #105122
Reviewer: @huult owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Nov 6, 2026
Payment Summary
Contributor+: @huult due $175 via NewDot
JmillsExpensify commentedon Nov 15, 2026
$175 approved for @huult