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-10-21] [$175] IOU - Blank screen appears on Onfido identity verification step after entering magic code #102336
Version Number: 9.4.94-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:#102055 Email or phone of affected tester (no customers):applausetester+bm890333@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Web App Component: Money Requests
Action Performed:
Preconditions:
Users preferred currency is set to USD.
User A sends an IOU to User B in USD
Go to staging.new.expensify.com
Log in as User B and open the IOU request from User A
Click Pay with personal bank account
Complete the payment setup steps until reaching identity verification 3rd step
If the magic code page appears, enter the magic code.
Expected Result:
Onfido identity verification screen should load properly after entering magic code.
Actual Result:
A blank screen appears instead of the Onfido identity verification flow.
⚠️Preliminary analysis (low confidence) — treat as a starting point, not a conclusion.
This is probably not a regression from the 9.4.94-0 deploy. None of the 55 PRs in the current staging deploy touch the Onfido, wallet, or magic-code files. Migrate src/components single-account personal details reads to usePersonalDetail appears in the issue only because it was the PR under regression testing. Its BaseKYCWall change affects only the business-bank-account branch, not "Pay with personal bank account."
I think the blank screen comes from the magic-code page sending the user to a second copy of the identity-verification screen:
The IOU flow opens the Pay-flow page. When the phone number changes, useWalletPhoneValidateCode.ts:31 opens the Settings magic-code page.
After the code is accepted, WalletConfirmValidateCodePage.tsx:64-67 always goes to the Settings/WalletVERIFY_IDENTITY page, even when the user started in the Pay flow.
Both render <div id="onfido-mount">, and the SDK is started by containerId (BaseOnfidoWeb.tsx:34). If the SDK looks up the first matching element, it renders into the hidden screen and the visible one stays blank.
There's also a simpler possibility. The Wallet VerifyIdentity mounts Onfido with sdkToken ?? '' and no loading check, unlike OnfidoStep.tsx:26. The SDK starts only once, on mount (BaseOnfidoWeb.tsx:149-170), so an empty token never recovers.
I couldn't confirm this because I didn't reproduce the flow, and the Onfido SDK's container lookup isn't visible in the package. To confirm, you can:
After entering the magic code, run document.querySelectorAll('#onfido-mount').length in DevTools. A result of 2 confirms the duplicate-mount theory.
Ask Applause to retry on 9.4.93 or production to confirm this isn't a new regression.
Possible fix (if confirmed)
In WalletConfirmValidateCodePage, call Navigation.goBack() when the user came from the Pay flow, instead of always navigating to the Settings VERIFY_IDENTITY route.
Pass containerEl (the ref) instead of the shared containerId in BaseOnfidoWeb. Also add the !isLoading && sdkToken check to Wallet VerifyIdentity.
Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.
Please re-state the problem that we are trying to solve in this issue.
When paying an IOU with a personal bank account, after submitting the magic code on the phone number validation step, a blank screen appears instead of the Onfido identity verification flow.
What is the root cause of that problem?
In src/pages/EnablePayments/shared/WalletConfirmValidateCodePage.tsx:
useWalletPhoneValidateCode is shared between both the Settings Wallet KYC flow and the IOU Pay flow (src/pages/EnablePayments/Pay/EnablePaymentsPage.tsx).
When the user submits the magic code, updatePersonalDetails succeeds on the backend, advancing userWallet.currentStep to CONST.WALLET.STEP.ONFIDO.
The underlying IOU screen (EnablePaymentsPage.tsx) is already mounted in the EnablePaymentsStackNavigator and observes userWallet.currentStep === CONST.WALLET.STEP.ONFIDO, mounting its own OnfidoStep.tsx.
However, WalletConfirmValidateCodePage.tsx unconditionally executes Navigation.navigate(ROUTES.SETTINGS_ENABLE_PAYMENTS.getRoute({page: CONST.ENABLE_PAYMENTS.PAGE_NAMES.VERIFY_IDENTITY})).
This forcibly pushes the Settings Wallet stack (Settings/Wallet/EnablePayments.tsx -> VerifyIdentity.tsx) right on top of the Pay flow.
When VerifyIdentity.tsx mounts, it also renders <Onfido />. Both Onfido components look for the hardcoded container ID CONST.ONFIDO.CONTAINER_ID (#onfido-mount). The duplicate mounting/teardown collides in the DOM, leaving the user with a completely blank screen.
Additionally, VerifyIdentity.tsx mounts <Onfido sdkToken={walletOnfidoData?.sdkToken ?? ''} /> without checking !walletOnfidoData?.isLoading && !walletOnfidoData?.errors && !!walletOnfidoData?.sdkToken (unlike OnfidoStep.tsx). Because BaseOnfidoWeb.tsx initializes the Onfido SDK only once on mount (useEffect(..., [])), initializing with an empty token fails silently and never recovers.
What changes do you think we should make in order to solve the problem?
In src/pages/EnablePayments/shared/WalletConfirmValidateCodePage.tsx:
Replace the hardcoded navigation to the Settings route with Navigation.goBack():
In the IOU Pay flow: It cleanly pops WalletConfirmValidateCodePage and returns to EnablePaymentsPage.tsx, which renders OnfidoStep.tsx without route conflicts or duplicate Onfido instances.
In the Settings Wallet flow: It cleanly pops back to Settings/Wallet/EnablePayments.tsx, where the existing useEffect in EnablePayments.tsx (lines 78-90) automatically performs the URL correction to the canonical step.
In src/pages/EnablePayments/Wallet/VerifyIdentity/VerifyIdentity.tsx:
Add the guard to ensure Onfido is only mounted when a valid token is loaded, matching OnfidoStep.tsx:
What alternative solutions did you explore? (Optional)
Pass a backTo query param through useWalletPhoneValidateCode. However, since all other ConfirmValidateCodePage components in the app (e.g., PrivatePersonalDetailsConfirmValidateCodePage, IssueNewCardConfirmValidateCodePage) simply call Navigation.goBack() upon successful code verification, using Navigation.goBack() is the most consistent and standard architectural approach.
We fixed a deploy blocker here: #103942. However, I don't think this should affect the payment, as the issue wasn't caused by our PR. I also commented on the offending PR here: #102944 (comment).
I'm working with Melvin to resolve this since it's blocking testing of our PR.
Activity
applause-bot commentedon Sep 25, 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/b4a3ddfcc0aa0a81462bb5e8fc935602746b5f9da3880f2336293f4aca841c4a
nlemma commentedon Sep 25, 2026
I added the DeployBlocker label because we can’t verify this on production. Since it’s about a bank account flow.
MelvinBot commentedon Sep 25, 2026
This is probably not a regression from the 9.4.94-0 deploy. None of the 55 PRs in the current staging deploy touch the Onfido, wallet, or magic-code files. Migrate src/components single-account personal details reads to usePersonalDetail appears in the issue only because it was the PR under regression testing. Its
BaseKYCWallchange affects only the business-bank-account branch, not "Pay with personal bank account."I think the blank screen comes from the magic-code page sending the user to a second copy of the identity-verification screen:
useWalletPhoneValidateCode.ts:31opens the Settings magic-code page.WalletConfirmValidateCodePage.tsx:64-67always goes to the Settings/WalletVERIFY_IDENTITYpage, even when the user started in the Pay flow.EnablePaymentsPage.tsx:95). Once the SDK token arrives,OnfidoStep.tsx:59-65andVerifyIdentity.tsx:76-82both mount<Onfido>.<div id="onfido-mount">, and the SDK is started bycontainerId(BaseOnfidoWeb.tsx:34). If the SDK looks up the first matching element, it renders into the hidden screen and the visible one stays blank.There's also a simpler possibility. The Wallet
VerifyIdentitymounts Onfido withsdkToken ?? ''and no loading check, unlikeOnfidoStep.tsx:26. The SDK starts only once, on mount (BaseOnfidoWeb.tsx:149-170), so an empty token never recovers.The cross-flow navigation came from Strip new magic codes instances and Preserve wallet SSN errorCode across validate-code navigation. Both are already on production.
I couldn't confirm this because I didn't reproduce the flow, and the Onfido SDK's container lookup isn't visible in the package. To confirm, you can:
document.querySelectorAll('#onfido-mount').lengthin DevTools. A result of2confirms the duplicate-mount theory.Possible fix (if confirmed)
WalletConfirmValidateCodePage, callNavigation.goBack()when the user came from the Pay flow, instead of always navigating to the SettingsVERIFY_IDENTITYroute.containerEl(the ref) instead of the sharedcontainerIdinBaseOnfidoWeb. Also add the!isLoading && sdkTokencheck to WalletVerifyIdentity.Next Steps: Reply with
@MelvinBot <your feedback>to refine this analysis.view run
melvin-bot commentedon Sep 25, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (
External)[-]IOU - Blank screen appears on Onfido identity verification step after entering magic code[/-][+][$175] IOU - Blank screen appears on Onfido identity verification step after entering magic code[/+]melvin-bot commentedon Sep 25, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022103554217231854968
fix(wallet): return to previous screen after validateCode confirmation (
fix(wallet): guard Onfido initialization on valid sdkToken in VerifyI…
ashusatyarthi-wq commentedon Sep 25, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When paying an IOU with a personal bank account, after submitting the magic code on the phone number validation step, a blank screen appears instead of the Onfido identity verification flow.
What is the root cause of that problem?
In
src/pages/EnablePayments/shared/WalletConfirmValidateCodePage.tsx:useWalletPhoneValidateCodeis shared between both the Settings Wallet KYC flow and the IOU Pay flow (src/pages/EnablePayments/Pay/EnablePaymentsPage.tsx).updatePersonalDetailssucceeds on the backend, advancinguserWallet.currentSteptoCONST.WALLET.STEP.ONFIDO.EnablePaymentsPage.tsx) is already mounted in theEnablePaymentsStackNavigatorand observesuserWallet.currentStep === CONST.WALLET.STEP.ONFIDO, mounting its ownOnfidoStep.tsx.WalletConfirmValidateCodePage.tsxunconditionally executesNavigation.navigate(ROUTES.SETTINGS_ENABLE_PAYMENTS.getRoute({page: CONST.ENABLE_PAYMENTS.PAGE_NAMES.VERIFY_IDENTITY})).Settings/Wallet/EnablePayments.tsx->VerifyIdentity.tsx) right on top of the Pay flow.VerifyIdentity.tsxmounts, it also renders<Onfido />. Both Onfido components look for the hardcoded container IDCONST.ONFIDO.CONTAINER_ID(#onfido-mount). The duplicate mounting/teardown collides in the DOM, leaving the user with a completely blank screen.VerifyIdentity.tsxmounts<Onfido sdkToken={walletOnfidoData?.sdkToken ?? ''} />without checking!walletOnfidoData?.isLoading && !walletOnfidoData?.errors && !!walletOnfidoData?.sdkToken(unlikeOnfidoStep.tsx). BecauseBaseOnfidoWeb.tsxinitializes the Onfido SDK only once on mount (useEffect(..., [])), initializing with an empty token fails silently and never recovers.What changes do you think we should make in order to solve the problem?
src/pages/EnablePayments/shared/WalletConfirmValidateCodePage.tsx:Replace the hardcoded navigation to the Settings route with
Navigation.goBack():When
Navigation.goBack()is called:WalletConfirmValidateCodePageand returns toEnablePaymentsPage.tsx, which rendersOnfidoStep.tsxwithout route conflicts or duplicate Onfido instances.Settings/Wallet/EnablePayments.tsx, where the existinguseEffectinEnablePayments.tsx(lines 78-90) automatically performs the URL correction to the canonical step.src/pages/EnablePayments/Wallet/VerifyIdentity/VerifyIdentity.tsx:Add the guard to ensure
Onfidois only mounted when a valid token is loaded, matchingOnfidoStep.tsx:What alternative solutions did you explore? (Optional)
Pass a
backToquery param throughuseWalletPhoneValidateCode. However, since all otherConfirmValidateCodePagecomponents in the app (e.g.,PrivatePersonalDetailsConfirmValidateCodePage,IssueNewCardConfirmValidateCodePage) simply callNavigation.goBack()upon successful code verification, usingNavigation.goBack()is the most consistent and standard architectural approach.Verified Branch & Pre-tested Commits:
The implementation has been staged and verified on:
ashusatyarthi-wq/App:fix/iou-onfido-blank-screen-102336(Commitsc624972,fd14e2b).35 remaining items
ahmedGaber93 commentedon Oct 21, 2026
We fixed a deploy blocker here: #103942. However, I don't think this should affect the payment, as the issue wasn't caused by our PR. I also commented on the offending PR here: #102944 (comment).
I'm working with Melvin to resolve this since it's blocking testing of our PR.
mallenexpensify commentedon Oct 21, 2026
@madmax330 do you think the above should be considered a regression. I'm leaning towards no, Melvin's comments on the PR weren't the most convincing.
melvin-bot commentedon Oct 29, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
mallenexpensify commentedon Oct 30, 2026
@madmax330 👀 above plz.
madmax330 commentedon Oct 30, 2026
Yeah I don't think we need to consider it a regression
mallenexpensify commentedon Oct 30, 2026
Payment Summary
Contributor+: @ahmedGaber93 due $175 via NewDot
flaviadefaria commentedon Nov 9, 2026
Approved: @ahmedGaber93 due $175 via NewDot