Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.3.69-3
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176726/test-cases/41237088
Email or phone of affected tester (no customers): lattelover1412+09054@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: android
App Component: Other
Action Performed:
Setup - Can be executed in a Secondary device or browser
- Log in as an admin of a workspace or create one
- Click on the Invite Member button
- Add an email address that does not have an Expensify account >> set Admin Role
- Click Invite (Should be a real account with an inbox that can receive the invite)
Main Device
- User is not logged in
- Open the email inbox of the invited user
- Click on the bottom link "Open it in Expensify"
- Verify that you are redirected to the workspace chat
- Tap back arrow (the top left) to return Home page
Expected Result:
A blank page should not be displayed, and appropriate page with bottom button (Home, Account, Spend, etc) should be displayed after user tap back arrow
Actual Result:
Endless loading with white blank page displayed, user is not able to proceed further steps.
Note: close the app and relaunch, user is able to open Home page
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
Video.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022053692491034956430
- Upwork Job ID: 2053692491034956430
- Last Price Increase: 2026-05-18
Issue Owner
Current Issue Owner: @mallenexpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
MelvinBot commentedon May 11, 2026
Proposal
What is the root cause of that problem?
When a new user opens a workspace invite email link ("Open it in Expensify"), the app navigates via a transition URL with
exitTo=/r/REPORTID. Two competing navigation paths race against each other:setUpPoliciesAndNavigatefires immediately when AuthScreens mount and callsNavigation.navigate(exitTo)viawaitForProtectedRoutes().LogOutPreviousUserPageis delayed becausesignInWithShortLivedAuthTokensetsaccount.isLoading = true, blocking itsgoBack(ROUTES.HOME)call that would remove theTRANSITION_BETWEEN_APPSscreen.Because
setUpPoliciesAndNavigatefires first whileTRANSITION_BETWEEN_APPSis still on top of the root stack,linkTosees the top route is NOTTAB_NAVIGATORand PUSHes a newTAB_NAVIGATORabove it. This creates a corrupted root state:[TAB_NAVIGATOR, TRANSITION_BETWEEN_APPS, TAB_NAVIGATOR(REPORTS_SPLIT > [REPORT])].Additionally,
SplitRouter.adaptStateIfNecessarychecksrootState.routes.length === 1to decide if this is an initial route. With 3 routes in the root state,isInitialRouteisfalse, so on narrow layout (Android phone) the INBOX sidebar is NOT added to the split navigator — it only contains[REPORT].When the user taps the back arrow (
ReportHeader.tsx:49-71),GO_BACKcan't be handled by the split (no sidebar to pop to), so it bubbles up and pops the root stack — revealing theTRANSITION_BETWEEN_APPSscreen, which rendersFullScreenLoadingIndicator— the endless blank loading page.What changes do you think we should make in order to solve the problem?
In
linkTo, when the current top route isTRANSITION_BETWEEN_APPSand we're navigating toTAB_NAVIGATOR, we should useREPLACEinstead ofPUSH. This ensures the transition screen is removed from the stack rather than having a newTAB_NAVIGATORpushed on top of it:This way the
TRANSITION_BETWEEN_APPSscreen is properly replaced by theTAB_NAVIGATORcontaining the report, the root state stays clean ([TAB_NAVIGATOR, TAB_NAVIGATOR(REPORTS_SPLIT)]),isInitialRouteremains correct, and back navigation works as expected.What alternative solutions did you explore?
An alternative would be to fix the timing in
LogOutPreviousUserPageso thatgoBack(ROUTES.HOME)fires beforesetUpPoliciesAndNavigatenavigates. However, this is fragile since it depends on the timing ofaccount.isLoadingbeing set back tofalse, and could break other transition flows. ThelinkTofix is more defensive — it handles the corrupted state at the navigation layer regardless of which path fires first.Investigation details
Evidence chain:
TRANSITION_BETWEEN_APPSscreen mounts and rendersFullScreenLoadingIndicatorsignInWithShortLivedAuthTokenis called atLogOutPreviousUserPage.tsx:60, settingaccount.isLoading = trueLogOutPreviousUserPage.tsx:66-84is blocked byisAccountLoadingcheck on line 74setUpPoliciesAndNavigatefires and navigates to/r/REPORTIDlinkToat line 211 seesTRANSITION_BETWEEN_APPSon top → PUSHes newTAB_NAVIGATOR[TAB_NAVIGATOR, TRANSITION_BETWEEN_APPS, TAB_NAVIGATOR(REPORTS_SPLIT > [REPORT])]SplitRouter.ts:49:rootState.routes.length = 3→isInitialRoute = false→ no sidebar added on narrow layoutTRANSITION_BETWEEN_APPS→ endless loadingWhy Android-only: The
isNarrowLayoutcheck inadaptStateIfNecessarymeans the sidebar IS added on wide layouts (web/tablet), soGO_BACKis handled within the split navigator. On narrow layout (Android phone), the sidebar is skipped, causingGO_BACKto bubble to the root.Why staging but not production: The
linkToPUSH logic at line 210-213 and theisInitialRoutecheck inSplitRouterappear to be recent additions to the navigation system that exist in staging but may not yet be in the production build.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.mukhrr commentedon May 11, 2026
Proposal
What is the root cause of that problem?
The workspace-invite email on Android opens the link inside HybridApp. OldDot consumes the magic link, then hands off to NewDot via the
TRANSITION_BETWEEN_APPSroute withexitTo=r/<reportID>. That route is rendered byLogInWithShortLivedAuthTokenPage, and the handoff to the workspace chat happens here:src/pages/LogInWithShortLivedAuthTokenPage.tsx#L64-L70The intent of
goBack()here is to pop the/transitionscreen, but it runs while the navigator tree is still mid-switch from the Public stack (whereTRANSITION_BETWEEN_APPSlives) to the Protected stack — so the pop is a no-op on the resulting Protected stack.Navigation.navigate(exitTo)then pushes the workspace report on top, leaving the still-mountedLogInWithShortLivedAuthTokenPagein the back history.That page renders only
<FullScreenLoadingIndicator />whileaccount?.isLoadingis true (LogInWithShortLivedAuthTokenPage.tsx#L75-L83), and its only navigation effect re-runs solely whenroutechanges (L24-L73). When the user taps the back arrow on the workspace chat, react-navigation pops back to this still-mounted transition screen;routehasn't changed, the effect doesn't re-fire, and the user is stranded on the white full-screen loader — exactly the "endless loading / blank page" reported. Killing and relaunching the app skips this entry, which matches the "close the app and relaunch" workaround.This shows up on Android only because that's where the HybridApp transition flow runs for this email link in v9.3.69-3 (iOS doesn't currently go through
LogInWithShortLivedAuthTokenPagefor this entry point, and standalone NewDot usesValidateLoginPagewhich routes through a different handler).What changes do you think we should make in order to solve the problem?
I'd replace the brittle
goBack() + navigate()with a singlenavigate(exitTo, {forceReplace: true}), so the workspace chat takes the place of the transition screen in the stack instead of being pushed on top of it. The same pattern is already used a few lines above for the SAML branch (L53), so this just brings theexitTopath in line with it.if (exitTo) { Navigation.isNavigationReady().then(() => { - // We must call goBack() to remove the /transition route from history - Navigation.goBack(); - Navigation.navigate(exitTo as Route); + // We must replace to remove /transition route from history + Navigation.navigate(exitTo as Route, {forceReplace: true}); }); }The same anti-pattern also exists for the support-auth branch at
L35-L39(goBack()thennavigate(ROUTES.HOME)); I'd apply the sameforceReplacefix there for consistency, even though it's outside this specific repro.What alternative solutions did you explore? (Optional)
StackActions.popexplicitly targetingTRANSITION_BETWEEN_APPSbefore navigating. Works, but it pokes navigator internals and only handles this one screen, whileforceReplaceis the existing generic primitive for "swap the current entry" — and is already used at L53 for SAML.useFocusEffectinstead ofuseEffect). This would un-stick the loader, but on every back tap the user would briefly see the loader and then be re-navigated to the workspace chat — they'd never actually reach Home, which is the expected behavior in the report.handleExitToNavigationinsrc/libs/actions/Session/index.ts(samegoBack(); navigate()shape). Worth doing as a follow-up to harden the standalone/iOSValidateLoginPagepath, but it isn't required for the Android repro in this issue.Abdukhamid000 commentedon May 11, 2026
Proposal
What is the root cause of that problem?
When the user opens the invitation email and taps "Open it in Expensify," the link contains a magic-code URL (
v/{accountID}/{validateCode}?exitTo=r/{reportID}). BecauseVALIDATE_LOGINis listed as a public screen,getAdaptedStateFromPathreturns only[VALIDATE_LOGIN]— no home screen is injected underneath it.After the user signs in,
handleExitToNavigationruns:https://github.com/Expensify/App/blob/main/src/libs/actions/Session/index.ts#L1410-L1418
It calls
Navigation.goBack()(which silently does nothing —VALIDATE_LOGINis the root route, socanGoBack()is false) and thenNavigation.navigate(exitTo)to open the workspace chat.Inside
linkTo, the following block intercepts that navigation:https://github.com/Expensify/App/blob/main/src/libs/Navigation/helpers/linkTo/index.ts#L208-L213
Because
VALIDATE_LOGINis the current top route (notTAB_NAVIGATOR), and the destination isTAB_NAVIGATOR, the action type is forced toPUSH. This stacks the report screen on top of the validate-login screen, producing:When the user taps the back arrow from the workspace chat, the
TAB_NAVIGATORis popped andVALIDATE_LOGINis revealed — showing itsFullScreenLoadingIndicatorwith no forward navigation, leaving the user stuck on a blank loading screen.What changes do you think we should make in order to solve the problem?
The PUSH override at lines 208–213 in
linkTo/index.tswas added to preserve tab context when an RHP overlay sits above aTAB_NAVIGATOR. It is too broad and incorrectly applies toVALIDATE_LOGIN, which should never remain in the back stack after the user signs in.I think we should change the condition so it only forces
PUSHwhen aRIGHT_MODAL_NAVIGATOR(or another overlay type that belongs in the back stack) is already above aTAB_NAVIGATOR, and usesREPLACEwhen navigating away fromVALIDATE_LOGIN. This ensuresVALIDATE_LOGINis swapped out rather than buried underneath the new screen.The same guard should be applied for
TRANSITION_BETWEEN_APPSto prevent a symmetrical blank-screen issue if the user navigates back through that screen.What alternative solutions did you explore?
I considered fixing this in
handleExitToNavigationby callingnavigationRef.resetRoot(getAdaptedStateFromPath(exitTo))instead ofgoBack()+navigate(). That would directly reset the stack to the correct home + report state, bypassing the PUSH logic entirely. The downside is that it couples the Session action layer to navigation internals, and it only fixes the validate-login entry point — any other transient screen that ends up as the sole root route would still cause the same regression. Fixing it inlinkToaddresses the root cause once for all callers.melvin-bot commentedon May 11, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @daledah (
External)KJ21-ENG commentedon May 11, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
neerajbachani commentedon May 11, 2026
Proposal
What is the root cause of that problem?
The app can skip loading the deep-linked workspace chat at a critical moment, then never retry.
When a user opens the invite link while logged out, the app starts a deep-link open flow and routes to a report screen. In
ReportFetchHandler, there is a guard that intentionally returns early during onboarding whileisLoadingAppis still true (added to avoid a different onboarding timing bug).In this specific flow, that early return can happen once, but the effect that calls
fetchReport()is not guaranteed to run again when loading state becomes ready. That leaves report loading state unresolved (isLoadingInitialReportActions/ related loading flags), so the user sees endless loading / blank content.Back navigation makes this feel worse: in some report/not-found paths, back uses
Navigation.goBack()with no fallback route. If the stack has no valid previous route, back can no-op, so the user remains stuck on the blank/loading surface.What changes do you think we should make in order to solve the problem?
ReportFetchHandler.isLoadingApp+ onboarding conditions, runopenReport()once when prerequisites become ready.openReport()calls.canGoBack()is false.r/:reportIDwhile logged out/onboarding.What alternative solutions did you explore? (Optional)
Only patch back behavior: improves recovery UX but does not fix the underlying endless-loading state.
Route all failures to Concierge/last accessed report: hides the bug and can send users to the wrong place after a valid workspace invite link.
[-]Email - Tapping back arrow, endless loading with blank page is displayed instead Home page[/-][+][$250] Email - Tapping back arrow, endless loading with blank page is displayed instead Home page[/+]melvin-bot commentedon May 11, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022053692491034956430
github-actions commentedon May 11, 2026
48 remaining items
melvin-bot commentedon Jun 26, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
quinthar commentedon Jun 29, 2026
Approved $250 to @daledah
melvin-bot commentedon Jul 2, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jul 3, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jul 3, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jul 6, 2026
@mallenexpensify Still overdue 6 days?! Let's take care of this!
QichenZhu commentedon Sep 30, 2026
The associated PR that fixed this issue for the signed-out case introduced an unexpected side effect for thesigned-in case. We fixed the it with PR #101335.