Repository navigation
Description
Problem
When a user sets up a new USD business bank account and selects Chase through Plaid, NewDot advances past the bank information step without ever creating a bank account. Every step after that operates on a bank account that does not exist, so the user eventually hits "An error occurred while processing this step, please try again" and cannot finish adding their bank account.
The error surfaces on the date of birth step, but the date of birth is not the problem.
Reproduction Steps
These apply to staging or local development.
- Sign in as a workspace admin with no existing verified business bank account.
- Go to Workspace > Workflows and start adding a business bank account (USD).
- Choose Plaid and select Chase.
- Sign in with the Plaid sandbox credentials
user_good/pass_good. - Select the
Plaid Savingtest account and continue. - Continue through the personal information step and enter a date of birth.
Expected Behavior: After step 5, the flow stays on the bank information step and shows the manual account/routing entry form, because Chase returns substitute numbers that cannot be used. Manual entry then creates a real bank account and the rest of setup proceeds normally.
Actual Behavior: After step 5 the flow advances to Personal Information with no bank account created. The identity verification step then launches with an empty token, and the user is shown "An error occurred while processing this step, please try again" at the date of birth step. The setup cannot be completed.
Solution
In src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx, markSubmitting() is called outside the branch that fires the API request, so the deferred navigation callback is armed even when no request was made.
- Have
connectBankAccountWithPlaid()report whether it actually started a backend request. - Call
markSubmitting()only when a request was started. - For the new-Chase fallback, stay on the bank information step so the manual form renders instead of advancing.
- Leave behavior unchanged for manual submissions, non-Chase new accounts, and existing-account Chase reconnects.
Tests to cover
- Existing App unit test for a new Chase account: the Chase action switches to manual, clears the substitute account/routing values, makes no Plaid-connect API request, and does not arm deferred navigation.
- Same test for a non-Chase new account and an existing Chase account: API and navigation behavior unchanged.
- Manual submission after the fallback sends a non-zero bank account ID and advances normally.
- Invalid routing or account details show the validation error and keep the user on the bank information step.
- Network logs show no personal-information request with
bankAccountID = 0, noStaleBankAccountError, and no Onfidoinvalid_token.
Extra context
Reported by a customer in Expensify/Expensify#678213. Original Slack thread: https://expfirstresponders.slack.com/archives/CAS1DND4H/p1788202481819529 — contributor ask: https://expensify.slack.com/archives/C086VHWPPUM/p1789145438985859
Root cause chain
For a new Chase account, Plaid returns substitute account and routing numbers. The App intentionally handles that by switching the user to manual entry and clearing those substitute numbers. But it still arms its deferred submit/navigation callback even though no bank-account API request was made, so it advances to Personal Information with bankAccountID = 0.
The personal-information request cannot find a bank-account row, so the backend resets the in-progress VBA state, including the Onfido token. The App then launches Onfido with an empty token, producing invalid_token and the generic error message. The date of birth error is a downstream symptom of the reset state and blank retry payload.
Production traces across three sessions for the reporting customer, plus two unrelated accounts, show the same sequence: Plaid selection succeeds, ConnectBankAccountWithPlaid is absent, personal information is submitted with bank account ID 0, the backend logs StaleBankAccountError, and the App logs Onfido invalid_token.
This is not a Chase limitation in the underlying bank-account flow — the legacy backend already routes Chase's substitute numbers to manual entry, and the customer can complete setup in OldDot as a workaround.
Likely regression source
Interaction between the App-side Chase fallback from App PR #85399 and the later deferred-navigation USD flow refactor, restored in App PR #90302.
Prior art
A draft implementation exists in App PR #100981 (closed, unmerged) and can be used as a starting point.
Backend hardening (out of scope here)
The backend could reject bankAccountID = 0 during later setup steps instead of returning a successful response that lets the App launch identity verification without a token. That is defense-in-depth, not the primary fix, and is not tracked by this issue.
Activity
melvin-bot commentedon Sep 14, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi (
External)melvin-bot commentedon Sep 14, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
mkhutornyi commentedon Sep 15, 2026
@MelvinBot implement this. The solution is already detailed in OP
MelvinBot commentedon Sep 15, 2026
🤖 Draft PR created: #101154
Please mark it as "Ready for review" when it is ready for review.
What changed:
connectBankAccountWithPlaid()now returns whether it actually started a backend request, andBankInfoonly callsmarkSubmitting()when one was started. The new-Chase case sends no request and switches to manual entry, so the flow now stays on the bank information step instead of advancing to Personal Information withbankAccountID = 0.Behavior is unchanged for manual submissions, non-Chase new accounts, and existing-account Chase reconnects.
Implementation details
Three files changed:
src/libs/actions/BankAccounts.ts—connectBankAccountWithPlaid()returnsboolean:falseon the new-Chase short-circuit,trueafterAPI.write.src/pages/ReimbursementAccount/USD/BankInfo/BankInfo.tsx—submit()tracksdidStartRequestand returns early beforemarkSubmitting()when nothing was sent.tests/actions/BankAccountsTest.ts— the two existingconnectBankAccountWithPlaidtests now assert the return value, plus a new test covering a non-Chase new account (request sent, stays in the Plaid sub step).This follows the approach in the closed draft #100981, which I used as the starting point.
Automated checks run locally
npm testontests/actions/BankAccountsTest.tsandtests/unit/BankAccountsTest.ts— passed (15 tests)npm testontests/unit/pages/USDVerifiedBankAccountFlowPageTest.tsx,tests/unit/pages/USDVerifiedBankAccountFlowPageBackTest.tsx,tests/actions/ReimbursementAccountTest.ts,tests/unit/ReimbursementAccountTest.ts— passed (17 tests)npm run typecheck— passednpm run linton the changed files — passednpm run react-compiler-compliance-checkonBankInfo.tsx— passedview run · no recording available
melvin-bot commentedon Sep 15, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
2 remaining items
[-]Cannot add a Chase business bank account in NewDot — setup fails with "An error occurred while processing this step"[/-][+][Due for payment 2026-09-23] Cannot add a Chase business bank account in NewDot — setup fails with "An error occurred while processing this step"[/+]melvin-bot commentedon Sep 16, 2026
@mkhutornyi
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.80-0 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-09-23. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Sep 21, 2026
@mkhutornyi Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Sep 22, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Sep 22, 2026
Payment Summary
Resolving PRs:
Only arm deferred VBBA navigation when a bank account request was started #101154
Reviewer: @mkhutornyi owed $250 via NewDot
BugZero Checklist (@mallenexpensify)
mkhutornyi commentedon Sep 24, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Test:
user_good/pass_good.Plaid Savingtest account and continue.Do we agree 👍 or 👎
mallenexpensify commentedon Sep 25, 2026
Payment Summary
Contributor+: @mkhutornyi due $250 via NewDot
trjExpensify commentedon Oct 15, 2026
approved $250 for @mkhutornyi