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
Locked BA - After going online and clicking Pay Locked BA modal is not shown, failed attempt #98998
Create a manual expense in the workspace, submit and approve it
Open the expense details, go offline
Click green Pay button and select Pay with bank account
Click Cancel on the Locked bank account modal
Go online and repeat step 4
Expected Result:
Locked bank account modal is displayed
Actual Result:
After going online and clicking Pay "Locked BA" modal is not shown. "Paid with bank account xxxx" system message appears with an error "The selected bank account isn't a valid withdrawal account for you. Please choose a different account to pay from."
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
changed the title [-]Locked BA-After going online and clicking Pay Locked BA modal is not shown, failed attempt[/-][+]Locked BA - After going online and clicking Pay Locked BA modal is not shown, failed attempt[/+]on Aug 19, 2026
Classification: Undetermined (leaning Frontend/data) — no App PR confidently identified Causing PR: None identified with sufficient confidence (see ruled-out candidates below) Related Issues: N/A
Recommendation: NEEDS INVESTIGATION
The client-side guard that should surface the "Locked bank account" modal lives in SettlementButton and is unchanged since 2026-08-10 (already on production), yet the bug only reproduces on staging — so I could not pin it to a specific PR in this deploy. Keeping the label and flagging for the Payments team.
Assigned: none (no causing PR at medium+ confidence) Labels: No changes. DeployBlockerCash kept (issue does not reproduce on production, and no clear App PR could be blamed — erring on the side of keeping the blocker).
📋 Detailed Analysis
Root Cause (hypothesis)
The Pay button on the expense-details header renders SettlementButton (via MoneyReportHeaderPrimaryAction/PayPrimaryAction). When "Pay with bank account" is chosen, runPaymentAction → checkForNecessaryAction → checkForPostValidationBlockers gates the payment. The locked-BA gate is:
Offline (step 4): the cached policy still has achAccount.state === LOCKED, so the gate fires and the modal is shown correctly.
Online (step 6): the modal is not shown and the payment is dispatched, then the backend rejects it ("The selected bank account isn't a valid withdrawal account…"). For the gate to stop firing, policy.achAccount.state must no longer equal LOCKED after the app reconnects/refetches.
So the regression most likely comes from what the app receives/merges for policy.achAccount when going back online, not from the gate logic itself (which is identical to production).
git/GitHub history: last change to SettlementButton/index.tsx was 2026-08-10, i.e. it shipped in a prior (production) release. No PR in the 9.4.56 StagingDeployCash touches this file, useVerifyAccountAndResume.ts, or the isBankAccountLocked / achAccount state path.
The user-facing gate is App code and unchanged from production, so a straight revert has no obvious target. The staging-only reproduction points at a change in the data returned/merged for the locked withdrawal account on reconnect. This needs eyes from the Payments/withdrawal-account owners to confirm whether the offending change is in the app's online data merge or in the API response for the locked account. Because the issue does not reproduce on production, the DeployBlockerCash label is intentionally kept.
Suggested next steps for the assignee
On staging, reproduce and inspect policy.<id>.achAccount.state in Onyx immediately after going online — confirm whether it flips away from LOCKED.
If it flips, bisect the source of the refreshed policy data (OpenReport/reconnect payload vs. client merge). If the API now omits the locked-account state, this is a backend issue and should be re-classified.
The expected behavior is clear: a locked business bank account must block every payment entry point and show the locked-account modal; it must not submit PayMoneyRequest.
#96624 is an open, closely related report: payment could proceed from another surface despite the bank account being locked. It reproduced on both staging and production in 9.4.41-0, so it supports a pre-existing cross-surface guard gap rather than a new staging-only regression.
#95026 established the same contract and regression test: lock the account, attempt payment, and verify the locked-account modal appears. Its App fix (#95063) was deployed; that issue is still open only for administrative/payment follow-up.
#91300 separately defines the locked-account status UX ("requires attention" / unlock path).
App code and log evidence
The report-details payment path still goes through SettlementButton's locked-account guard. The file is byte-for-byte unchanged between production 9.4.55-4 and the reported staging build 9.4.56-2; there is no release diff that bypasses this guard.
Staging logs show that the attempted action did reach the backend: PayMoneyRequest was rejected with the business error "Payer does not own a valid withdrawal bank account with that ID" on 9.4.56-2. Crucially, the same error is also present in staging logs from 9.4.55-3, before this issue's release range. That rules out 9.4.56-2 as the introduction point, but does not prove why the client allowed the request.
The available logs contain request metadata and the backend rejection, but not the returned Onyx policy payload. The remaining question is whether, after reconnect, the client received:
policy.achAccount.state !== LOCKED (or a missing/wrong policy), while the backend still rejects the selected withdrawal account — a staging data/server consistency issue; or
Do not close this as an invalid expectation, and do not ship a speculative App change or revert. Reclassify it as a pre-existing staging payment-state investigation until we capture the policy/bank-account snapshot around reconnect. If the account is still LOCKED, link this to #96624 and fix the bypass; if it is not, route it to the team that owns the policy/bank-account response consistency.
@MelvinBot please investigate this independently, focusing on the policy and bank-account data delivered immediately after reconnect for the reported staging test account, and reconcile it with the backend's withdrawal-account rejection.
🤖 Posted by Codex, an AI coding agent acting for @Beamanator.
Independent investigation — reconnect data vs. backend rejection
Conclusion: this is most consistent with your scenario 1 (a data/consistency issue where the reconnected client no longer sees achAccount.state === LOCKED), not an App guard defect like Expensify/App#96624. The report-details guard exists, is on the online path, and its only input is policy.achAccount.state, which the App never writes during reconnect. I couldn't capture the actual reconnect payload here, so the final attribution is medium confidence — but the code rules out the guard-defect branch for this specific surface.
I agree with your recommendation: don't close as invalid, don't ship a speculative App change or revert. Keep it as a pre-existing payment-state investigation and route the confirming step to the team that owns the policy/bank-account response.
Why it's not the #96624 guard-defect branch
#96624 is a guard absence on the Spend surface. The report-details Pay path here is different — the locked-account guard is present and fires on the online path, so "modal offline, no modal online" cannot be explained by a missing guard on this surface. It can only be explained by the guard's input (achAccount.state) no longer being LOCKED after reconnect.
It is reached on the online path: checkForNecessaryAction returns checkForPostValidationBlockers() at :262, and every Pay entry (including VBBA) routes through runPaymentAction (:265, :342, :588).
policy is a reactive usePolicy read and the guard functions are recomputed every render (no memoization/stale closure), so the second (online) click evaluates the currentachAccount.state. The offline vs. online code path is identical.
The App has no client-side write to achAccount during reconnect: grep achAccount in src/libs/actions/Report.ts (OpenReport) and src/libs/actions/App.ts (ReconnectApp) → zero matches. Those flows only Onyx.merge whatever onyxData the backend returns into the policy key. The only App-side achAccount writes are unrelated bank-setup flows (Policy.ts reimbursement setup, resetUSD/NonUSDBankAccount), none triggered by opening a report or reconnecting.
Given Onyx.merge deep-merge semantics, the reconnect outcome is decided entirely by the backend payload: omit achAccount (or omit state) → LOCKED persists and the modal keeps showing; include achAccount with a non-LOCKEDstate → LOCKED is overwritten, the guard stops firing, PayMoneyRequest is dispatched and rejected. The reported behavior matches the last case.
The decisive next step (needs internal eyes)
The one piece that settles it is the ReconnectApp / OpenReport / OpenPolicy response payload for a LOCKED business bank account: does it still carry achAccount.state === "LOCKED"? That's a backend response-shape question, so a separate internal investigation is needed — VictoriaLogs holds the request metadata and the PayMoneyRequest rejection, but not the returned Onyx policy payload. To capture it directly: reproduce on staging with applausetester+lockedba@applause.expensifail.com and read policy.<id>.achAccount.state in Onyx (or a network trace of the reconnect response) immediately after going online.
If state is notLOCKED after reconnect → confirmed data/consistency issue; route to the policy/bank-account response owners. (No App change.)
If stateis stillLOCKED yet payment submitted → that would contradict this code trace and warrant re-opening the App-guard angle.
Since confirmation and any fix live outside the App repo, I'm not proposing an App code change or revert. #96624 remains a genuinely separate Spend-surface bypass and shouldn't be conflated with this report-details path.
@tylerkaraszewski this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. 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/1540f96c9ed2d6fe8674fe035ed07cb21dd923245fcb0cb8f1a6746bd86e24e7
github-actions commentedon Aug 19, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Aug 19, 2026
Triggered auto assignment to @tylerkaraszewski (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Aug 19, 2026
💬 A slack conversation has been started in #expensify-open-source
[-]Locked BA-After going online and clicking Pay Locked BA modal is not shown, failed attempt[/-][+]Locked BA - After going online and clicking Pay Locked BA modal is not shown, failed attempt[/+]MelvinBot commentedon Aug 19, 2026
🔍 Investigation Summary
Classification: Undetermined (leaning Frontend/data) — no App PR confidently identified
Causing PR: None identified with sufficient confidence (see ruled-out candidates below)
Related Issues: N/A
Recommendation: NEEDS INVESTIGATION
The client-side guard that should surface the "Locked bank account" modal lives in
SettlementButtonand is unchanged since 2026-08-10 (already on production), yet the bug only reproduces on staging — so I could not pin it to a specific PR in this deploy. Keeping the label and flagging for the Payments team.Assigned: none (no causing PR at medium+ confidence)
Labels: No changes.
DeployBlockerCashkept (issue does not reproduce on production, and no clear App PR could be blamed — erring on the side of keeping the blocker).📋 Detailed Analysis
Root Cause (hypothesis)
The Pay button on the expense-details header renders
SettlementButton(viaMoneyReportHeaderPrimaryAction/PayPrimaryAction). When "Pay with bank account" is chosen,runPaymentAction→checkForNecessaryAction→checkForPostValidationBlockersgates the payment. The locked-BA gate is:achAccount.state === LOCKED, so the gate fires and the modal is shown correctly.policy.achAccount.statemust no longer equalLOCKEDafter the app reconnects/refetches.So the regression most likely comes from what the app receives/merges for
policy.achAccountwhen going back online, not from the gate logic itself (which is identical to production).Verification
src/components/SettlementButton/index.tsxL197–L262 (isBankAccountLocked,checkForPostValidationBlockers,checkForNecessaryAction,runPaymentAction).git/GitHub history: last change toSettlementButton/index.tsxwas 2026-08-10, i.e. it shipped in a prior (production) release. No PR in the 9.4.56 StagingDeployCash touches this file,useVerifyAccountAndResume.ts, or theisBankAccountLocked/achAccountstate path.Candidate PRs examined and ruled out
Search/SearchBulkActionsButton.tsxandactions/Search.ts(Search bulk-pay flow), not the expense-report Pay path.cancelSendMoneyPaymentbranch inPayMoneyRequest.ts; does not changepayMoneyRequestor the locked-BA gate.BankAccountUtils.getBankAccountConnectionStatus; its own tests assertLOCKEDis unaffected.actions/PaymentMethods.ts(card RBR), unrelated to withdrawal-account locking.Why NEEDS INVESTIGATION (not a revert)
The user-facing gate is App code and unchanged from production, so a straight revert has no obvious target. The staging-only reproduction points at a change in the data returned/merged for the locked withdrawal account on reconnect. This needs eyes from the Payments/withdrawal-account owners to confirm whether the offending change is in the app's online data merge or in the API response for the locked account. Because the issue does not reproduce on production, the
DeployBlockerCashlabel is intentionally kept.Suggested next steps for the assignee
policy.<id>.achAccount.statein Onyx immediately after going online — confirm whether it flips away fromLOCKED.Beamanator commentedon Aug 19, 2026
Investigation update
What the evidence shows
The expected behavior is clear: a locked business bank account must block every payment entry point and show the locked-account modal; it must not submit
PayMoneyRequest.9.4.41-0, so it supports a pre-existing cross-surface guard gap rather than a new staging-only regression.App code and log evidence
The report-details payment path still goes through
SettlementButton's locked-account guard. The file is byte-for-byte unchanged between production9.4.55-4and the reported staging build9.4.56-2; there is no release diff that bypasses this guard.Staging logs show that the attempted action did reach the backend:
PayMoneyRequestwas rejected with the business error "Payer does not own a valid withdrawal bank account with that ID" on9.4.56-2. Crucially, the same error is also present in staging logs from9.4.55-3, before this issue's release range. That rules out9.4.56-2as the introduction point, but does not prove why the client allowed the request.The available logs contain request metadata and the backend rejection, but not the returned Onyx policy payload. The remaining question is whether, after reconnect, the client received:
policy.achAccount.state !== LOCKED(or a missing/wrong policy), while the backend still rejects the selected withdrawal account — a staging data/server consistency issue; orstate === LOCKED, but a payment entry point still submitted — an App guard defect, likely related to [Exploratory] Bank-Expenses can be paid using a locked bank account from the Spend page #96624.Recommendation
Do not close this as an invalid expectation, and do not ship a speculative App change or revert. Reclassify it as a pre-existing staging payment-state investigation until we capture the policy/bank-account snapshot around reconnect. If the account is still
LOCKED, link this to #96624 and fix the bypass; if it is not, route it to the team that owns the policy/bank-account response consistency.@MelvinBot please investigate this independently, focusing on the policy and bank-account data delivered immediately after reconnect for the reported staging test account, and reconcile it with the backend's withdrawal-account rejection.
🤖 Posted by Codex, an AI coding agent acting for @Beamanator.
MelvinBot commentedon Aug 19, 2026
Independent investigation — reconnect data vs. backend rejection
Conclusion: this is most consistent with your scenario 1 (a data/consistency issue where the reconnected client no longer sees
achAccount.state === LOCKED), not an App guard defect likeExpensify/App#96624. The report-details guard exists, is on the online path, and its only input ispolicy.achAccount.state, which the App never writes during reconnect. I couldn't capture the actual reconnect payload here, so the final attribution is medium confidence — but the code rules out the guard-defect branch for this specific surface.I agree with your recommendation: don't close as invalid, don't ship a speculative App change or revert. Keep it as a pre-existing payment-state investigation and route the confirming step to the team that owns the policy/bank-account response.
Why it's not the
#96624guard-defect branch#96624is a guard absence on the Spend surface. The report-details Pay path here is different — the locked-account guard is present and fires on the online path, so "modal offline, no modal online" cannot be explained by a missing guard on this surface. It can only be explained by the guard's input (achAccount.state) no longer beingLOCKEDafter reconnect.Code evidence (App @
3dc2897)policy.achAccount.state:SettlementButton/index.tsx:197→:206shows the locked-BA modal and blocks payment.checkForNecessaryActionreturnscheckForPostValidationBlockers()at:262, and every Pay entry (including VBBA) routes throughrunPaymentAction(:265,:342,:588).policyis a reactiveusePolicyread and the guard functions are recomputed every render (no memoization/stale closure), so the second (online) click evaluates the currentachAccount.state. The offline vs. online code path is identical.achAccountduring reconnect:grep achAccountinsrc/libs/actions/Report.ts(OpenReport) andsrc/libs/actions/App.ts(ReconnectApp) → zero matches. Those flows onlyOnyx.mergewhateveronyxDatathe backend returns into the policy key. The only App-sideachAccountwrites are unrelated bank-setup flows (Policy.tsreimbursement setup,resetUSD/NonUSDBankAccount), none triggered by opening a report or reconnecting.Given
Onyx.mergedeep-merge semantics, the reconnect outcome is decided entirely by the backend payload: omitachAccount(or omitstate) →LOCKEDpersists and the modal keeps showing; includeachAccountwith a non-LOCKEDstate→LOCKEDis overwritten, the guard stops firing,PayMoneyRequestis dispatched and rejected. The reported behavior matches the last case.The decisive next step (needs internal eyes)
The one piece that settles it is the ReconnectApp / OpenReport / OpenPolicy response payload for a
LOCKEDbusiness bank account: does it still carryachAccount.state === "LOCKED"? That's a backend response-shape question, so a separate internal investigation is needed — VictoriaLogs holds the request metadata and thePayMoneyRequestrejection, but not the returned Onyx policy payload. To capture it directly: reproduce on staging with applausetester+lockedba@applause.expensifail.com and readpolicy.<id>.achAccount.statein Onyx (or a network trace of the reconnect response) immediately after going online.stateis notLOCKEDafter reconnect → confirmed data/consistency issue; route to the policy/bank-account response owners. (No App change.)stateis stillLOCKEDyet payment submitted → that would contradict this code trace and warrant re-opening the App-guard angle.Since confirmation and any fix live outside the App repo, I'm not proposing an App code change or revert.
#96624remains a genuinely separate Spend-surface bypass and shouldn't be conflated with this report-details path.view run
4 remaining items
melvin-bot commentedon Aug 25, 2026
@tylerkaraszewski Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Aug 27, 2026
@tylerkaraszewski Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Aug 31, 2026
@tylerkaraszewski 10 days overdue. I'm getting more depressed than Marvin.
melvin-bot commentedon Sep 2, 2026
@tylerkaraszewski this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
melvin-bot commentedon Sep 4, 2026
@tylerkaraszewski Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 5, 2026
@tylerkaraszewski Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 8, 2026
@tylerkaraszewski Still overdue 6 days?! Let's take care of this!
tylerkaraszewski commentedon Sep 9, 2026
I think this is fixed here:
https://github.com/Expensify/Auth/pull/24160