Skip to content

[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" #101128

Closed

Description

@blimpich

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.

  1. Sign in as a workspace admin with no existing verified business bank account.
  2. Go to Workspace > Workflows and start adding a business bank account (USD).
  3. Choose Plaid and select Chase.
  4. Sign in with the Plaid sandbox credentials user_good / pass_good.
  5. Select the Plaid Saving test account and continue.
  6. 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

  1. 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.
  2. Same test for a non-Chase new account and an existing Chase account: API and navigation behavior unchanged.
  3. Manual submission after the fallback sends a non-zero bank account ID and advances normally.
  4. Invalid routing or account details show the validation error and keep the user on the bank information step.
  5. Network logs show no personal-information request with bankAccountID = 0, no StaleBankAccountError, and no Onfido invalid_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.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. self-assigned this
    on Sep 14, 2026
  2. added
    Daily
    Internal
    External
    and removed
    Internal
    on Sep 14, 2026
  3. melvin-bot commented on Sep 14, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi (External)

  4. melvin-bot commented on Sep 14, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  5. mkhutornyi commented on Sep 15, 2026

    @mkhutornyi
    Contributor

    @MelvinBot implement this. The solution is already detailed in OP

  6. MelvinBot commented on Sep 15, 2026

    @MelvinBot
    Contributor

    🤖 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, and BankInfo only calls markSubmitting() 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 with bankAccountID = 0.

    Behavior is unchanged for manual submissions, non-Chase new accounts, and existing-account Chase reconnects.

    Implementation details

    Three files changed:

    This follows the approach in the closed draft #100981, which I used as the starting point.

    Automated checks run locally
    • npm test on tests/actions/BankAccountsTest.ts and tests/unit/BankAccountsTest.ts — passed (15 tests)
    • npm test on tests/unit/pages/USDVerifiedBankAccountFlowPageTest.tsx, tests/unit/pages/USDVerifiedBankAccountFlowPageBackTest.tsx, tests/actions/ReimbursementAccountTest.ts, tests/unit/ReimbursementAccountTest.ts — passed (17 tests)
    • npm run typecheck — passed
    • npm run lint on the changed files — passed
    • npm run react-compiler-compliance-check on BankInfo.tsx — passed

    ⚠️ I could not verify the flow end-to-end in a browser. The test session available to me failed during onboarding and left a blank page, so I never reached the bank account setup. Items 3, 4, and 5 from the "Tests to cover" list in the OP — the manual submission after the fallback, the invalid routing/account validation, and the network-log assertions — are still unverified. The PR body carries those as suggested manual steps for the human co-author to run before marking it ready for review.


    view run · no recording available

  7. added
    Reviewing
    Weekly
    and removed
    Daily
    on Sep 15, 2026
  8. melvin-bot commented on Sep 15, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  9. removed
    Reviewing
    on Sep 16, 2026
  10. 2 remaining items

  11. changed the title [-]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"[/+] on Sep 16, 2026
  12. melvin-bot commented on Sep 16, 2026

    @melvin-bot

    @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]

  13. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    @mkhutornyi Huh... This is 4 days overdue. Who can take care of this?

  14. added
    Awaiting Payment
    on Sep 21, 2026
  15. melvin-bot commented on Sep 22, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. melvin-bot commented on Sep 22, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  17. mkhutornyi commented on Sep 24, 2026

    @mkhutornyi
    Contributor

    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:

    1. Sign in as a workspace admin with no existing verified business bank account.
    2. Go to Workspace > Workflows and start adding a business bank account (USD).
    3. Choose Plaid and select Chase.
    4. Sign in with the Plaid sandbox credentials user_good / pass_good.
    5. Select the Plaid Saving test account and continue.
    6. Verify the flow stays on the bank information step and shows the manual account/routing number form, instead of advancing to Personal Information.
    7. Enter valid account and routing numbers and continue. Verify the flow advances to Personal Information and the rest of setup completes without "An error occurred while processing this step, please try again".
    8. Enter an invalid routing number and verify the validation error shows and the user stays on the bank information step.
    9. Repeat steps 2-5 with a non-Chase bank and verify the flow advances as before.
    10. Repeat with an existing Chase bank account (reconnect) and verify the flow advances as before.

    Do we agree 👍 or 👎

  18. mallenexpensify commented on Sep 25, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @mkhutornyi due $250 via NewDot

  19. trjExpensify commented on Oct 15, 2026

    @trjExpensify
    Contributor

    approved $250 for @mkhutornyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions