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
[$250] Navigation- Web page stuck on logo when navigating to IOU while logout #85763
Please re-state the problem that we are trying to solve in this issue.
When a logged-out user navigates to an IOU/expense report deep link (e.g., https://staging.new.expensify.com/r/12345), the web page gets stuck on the Expensify logo (splash screen) instead of redirecting to the sign-in page.
What is the root cause of that problem?
The splash screen is gated behind the IS_CHECKING_PUBLIC_ROOM Onyx key, which defaults to true and must be set to false before the app renders NavigationRoot (and thus the sign-in page). For deep link report URLs from unauthenticated users, the app makes an OpenReport API call to check if it's a public room, with IS_CHECKING_PUBLIC_ROOM=false in the finallyData.
The problem is a race condition between Onyx.clear() and the finallyData application:
The server returns 407 (NOT_AUTHENTICATED) for the OpenReport request
The Reauthentication middleware attempts to reauthenticate, but fails because there are no credentials (the user is logged out). During this failure, redirectToSignIn() is called inside Authenticate() (src/libs/Authentication.ts:75), which triggers Onyx.clear()
Onyx.clear() wipes IS_CHECKING_PUBLIC_ROOM (it's not in keysToPreserve in src/libs/actions/SignInRedirect.ts:51-58), resetting it to its default value of true
Meanwhile, the finallyData from the OpenReport response sets IS_CHECKING_PUBLIC_ROOM=false, but this is applied via queueOnyxUpdates (deferred) and can be overwritten by the concurrent Onyx.clear()
Onyx.clear() also clears the session, which causes the DeepLinkHandler effect to re-run (it depends on sessionMetadata?.status — src/DeepLinkHandler.tsx:75), calling openReportFromDeepLink() again and restarting the cycle
A contributing factor is that the early exit for missing credentials in src/libs/Authentication.ts:133-140 is commented out (disabled for debugging #fireroom-2026-01-28-user-signout), so the code always attempts the full Authenticate call even when autoGeneratedLogin/autoGeneratedPassword are undefined, which then hits requireParameters → throws → redirectToSignIn().
Key code locations:
src/Expensify.tsx:68 — IS_CHECKING_PUBLIC_ROOM defaults to true with initWithStoredValues: false, gates NavigationRoot rendering at line 305
src/libs/actions/Link.ts:245-264 — openReportFromDeepLink calls openReport() for unauthenticated users with reportID; doneCheckingPublicRoom() is NOT called directly (only if offline)
src/libs/actions/Report/index.ts:1675-1682 — IS_CHECKING_PUBLIC_ROOM=false is in finallyData of the OpenReport WRITE command
src/libs/Authentication.ts:62-76 — Authenticate calls redirectToSignIn when requireParameters throws due to missing credentials
src/libs/Authentication.ts:133-140 — Early exit for missing credentials is commented out
What changes do you think we should make in order to solve the problem?
Add skipReauthentication: true to the OpenReport parameters when isFromDeepLink is true, in src/libs/actions/Report/index.ts (around line 1537-1539, alongside the existing shouldRetry = false):
if (isFromDeepLink) {
parameters.shouldRetry = false;
parameters.skipReauthentication = true;
}
This prevents the Reauthentication middleware from attempting to reauthenticate (and thus triggering redirectToSignIn → Onyx.clear()). Instead, the 407 response flows through to SaveResponseInOnyx, which correctly applies failureData and finallyData, setting IS_CHECKING_PUBLIC_ROOM=false. The splash screen then hides and the sign-in page renders.
This is safe because the deep link OpenReport call is specifically checking whether the report is a public room — if the user isn't authenticated and it's not a public room, the correct behavior is to show the sign-in page, not to attempt reauthentication.
What alternative solutions did you explore? (Optional)
Add IS_CHECKING_PUBLIC_ROOM to keysToPreserve in clearStorageAndRedirect() — This would prevent Onyx.clear() from resetting the key, but doesn't address the DeepLinkHandler re-run loop caused by session clearing.
Call doneCheckingPublicRoom() immediately after openReport() for unauthenticated users — This would break the public room experience, where unauthenticated users should be able to view public rooms without signing in.
Re-enable the commented-out early exit in Authentication.ts:133-140 — This should also be done as a separate cleanup, but alone it doesn't fully fix the issue since redirectToSignIn is still called in the requireParameters catch block.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Navigation- Web page stuck on logo when navigating to IOU while logout[/-][+][$250] Navigation- Web page stuck on logo when navigating to IOU while logout[/+]on Mar 19, 2026
Please re-state the problem that we are trying to solve in this issue.
When a logged-out user navigates to an IOU report deep link (e.g., https://staging.new.expensify.com/r/12345), the web page gets permanently stuck on the Expensify logo splash screen instead of showing the sign-in page.
What is the root cause of that problem?
The splash screen is gated on the IS_CHECKING_PUBLIC_ROOM Onyx key, which defaults to true and must be set to false before NavigationRoot renders. In Expensify, isCheckingPublicRoom defaults to true with initWithStoredValues: false, and at line 305, NavigationRoot only renders once hasAttemptedToOpenPublicRoom becomes true — which requires isCheckingPublicRoom to flip to false.
When the deep link is processed, openReportFromDeepLink() in Link calls openReport() for unauthenticated users with a report ID. The openReport() function in Report correctly places IS_CHECKING_PUBLIC_ROOM = false in finallyData, which by contract should execute regardless of whether the API call succeeds or fails.
However, the actual bug is in SequentialQueue. When the unauthenticated OpenReport request fails after exhausting retries, the .catch() handler only applies failureData — finallyData is completely dropped:
.catch(()=>{Onyx.update(requestToProcess.failureData??[]);// ❌ finallyData is never applied here!});
This violates the finallyData contract. Notably, the shouldFailAllRequests branch at line 204-211 correctly includes both failureData and finallyData, proving this is an oversight rather than intentional behavior. The result is IS_CHECKING_PUBLIC_ROOM stays true forever, the splash screen never hides, and the user is stuck.
What changes do you think we should make in order to solve the problem?
Apply finallyData alongside failureData in the max-retry failure path of SequentialQueue, matching the existing correct pattern at line 206:
What alternative solutions did you explore? (Optional)
The existing proposal suggests adding skipReauthentication: true to the OpenReport call when isFromDeepLink is true. While this would prevent the reauthentication loop, it works around the symptom rather than fixing the root cause. The fundamental issue is that finallyData — which is supposed to always run (like a finally block) — is silently dropped in the max-retry failure path. This same bug could affect any future API call that relies on finallyData for cleanup in a failure scenario. Fixing it at the SequentialQueue level is a two-line change that restores the correct finallyData contract and aligns with the pattern already used in the shouldFailAllRequests branch at line 206.
📣 @VanshDevChoudhary! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Please re-state the problem that we are trying to solve in this issue.
When a logged-out user navigates to an IOU deep link, the web page gets stuck on the Expensify logo splash screen. The sign-in page never appears because IS_CHECKING_PUBLIC_ROOM stays true forever, preventing NavigationRoot from rendering (Expensify.tsx:305).
What is the root cause of that problem?
The Reauthentication middleware unnecessarily attempts re-authentication for deep link OpenReport requests from unauthenticated users.
When isFromDeepLink is true, openReport() sets shouldRetry = false (Report/index.ts:1532-1534) but does NOT set skipReauthentication. When the server returns 407, the middleware check at Reauthentication.ts:78-79 — (!shouldRetry && !apiRequestType) || skipReauthentication — evaluates to false because apiRequestType is set (it's a WRITE command). So reauthentication proceeds.
From there the cascade is: reauthenticate() → Authenticate() with undefined credentials → requireParameters() throws → redirectToSignIn() → Onyx.clear() → IS_CHECKING_PUBLIC_ROOM reset to true (it's not in keysToPreserve in SignInRedirect.ts:51-58). The reauthentication resolves with false, the middleware returns undefined back to SequentialQueue, and SequentialQueue's .then() handler fires (not .catch()). Since the response is undefined, SaveResponseInOnyx never runs, so finallyData — which contains IS_CHECKING_PUBLIC_ROOM = false — is never applied. The splash screen stays forever.
Onyx.clear() also wipes the session, which triggers DeepLinkHandler's useEffect (line 75, depends on sessionMetadata?.status) to re-run openReportFromDeepLink(), creating an infinite loop.
This regression traces back to PR #64280 (June 2025), which changed the Reauthentication middleware to return false on failure instead of retrying infinitely. That fixed a re-auth loop but introduced this silent failure path. A contributing factor is the commented-out early exit in Authentication.ts:134-140 (disabled for debugging #fireroom-2026-01-28-user-signout), though re-enabling it alone wouldn't fix this — redirectToSignIn() is still called in the catch block at line 64-76.
What changes do you think we should make in order to solve the problem?
Add skipReauthentication: true alongside the existing shouldRetry = false in Report/index.ts:1532-1534:
And add skipReauthentication?: boolean to OpenReportParams.ts.
With this, the middleware skips re-auth entirely, the 407 flows through to SaveResponseInOnyx which applies failureData and finallyData, IS_CHECKING_PUBLIC_ROOM becomes false, and the sign-in page renders. This follows the same pattern used by LogOut (LogOutParams.ts:7) and SignInWithShortLivedAuthToken (Session/index.ts:783) for the same reason — credentials are unavailable or irrelevant.
Edge cases: public room deep links are unaffected (they return 200, not 407). Authenticated users with expired tokens don't hit this path because doneCheckingPublicRoom() is called directly (Link.ts:263). Offline users are handled separately at Link.ts:258-259.
What alternative solutions did you explore? (Optional)
Adding IS_CHECKING_PUBLIC_ROOM to keysToPreserve in SignInRedirect.ts would prevent the reset, but doesn't stop the unnecessary reauthentication attempt, doesn't fix the dropped finallyData (the response is undefined from the middleware, not from SequentialQueue's .catch()), and doesn't prevent the DeepLinkHandler re-run loop.
The other proposal on this issue targets SequentialQueue's max-retry .catch() handler for not applying finallyData. That IS a valid infrastructure gap, but the max-retry .catch() is never reached here. The Reauthentication middleware resolves gracefully with false → returns undefined → SequentialQueue's .then() fires, not .catch(). Their fix wouldn't solve this bug.
I've investigated this issue and found an underlying infrastructure bug in SequentialQueue. I have a fix ready. Could you please assign this to me? Thanks!
This issue has not been updated in over 15 days. @dukenv0307 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
MelvinBot commentedon Mar 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a logged-out user navigates to an IOU/expense report deep link (e.g.,
https://staging.new.expensify.com/r/12345), the web page gets stuck on the Expensify logo (splash screen) instead of redirecting to the sign-in page.What is the root cause of that problem?
The splash screen is gated behind the
IS_CHECKING_PUBLIC_ROOMOnyx key, which defaults totrueand must be set tofalsebefore the app rendersNavigationRoot(and thus the sign-in page). For deep link report URLs from unauthenticated users, the app makes anOpenReportAPI call to check if it's a public room, withIS_CHECKING_PUBLIC_ROOM=falsein thefinallyData.The problem is a race condition between
Onyx.clear()and thefinallyDataapplication:OpenReportrequestReauthenticationmiddleware attempts to reauthenticate, but fails because there are no credentials (the user is logged out). During this failure,redirectToSignIn()is called insideAuthenticate()(src/libs/Authentication.ts:75), which triggersOnyx.clear()Onyx.clear()wipesIS_CHECKING_PUBLIC_ROOM(it's not inkeysToPreserveinsrc/libs/actions/SignInRedirect.ts:51-58), resetting it to its default value oftruefinallyDatafrom theOpenReportresponse setsIS_CHECKING_PUBLIC_ROOM=false, but this is applied viaqueueOnyxUpdates(deferred) and can be overwritten by the concurrentOnyx.clear()Onyx.clear()also clears the session, which causes theDeepLinkHandlereffect to re-run (it depends onsessionMetadata?.status—src/DeepLinkHandler.tsx:75), callingopenReportFromDeepLink()again and restarting the cycleA contributing factor is that the early exit for missing credentials in
src/libs/Authentication.ts:133-140is commented out (disabled for debugging#fireroom-2026-01-28-user-signout), so the code always attempts the fullAuthenticatecall even whenautoGeneratedLogin/autoGeneratedPasswordare undefined, which then hitsrequireParameters→ throws →redirectToSignIn().Key code locations:
src/Expensify.tsx:68—IS_CHECKING_PUBLIC_ROOMdefaults totruewithinitWithStoredValues: false, gatesNavigationRootrendering at line 305src/libs/actions/Link.ts:245-264—openReportFromDeepLinkcallsopenReport()for unauthenticated users with reportID;doneCheckingPublicRoom()is NOT called directly (only if offline)src/libs/actions/Report/index.ts:1675-1682—IS_CHECKING_PUBLIC_ROOM=falseis infinallyDataof the OpenReport WRITE commandsrc/libs/Authentication.ts:62-76—AuthenticatecallsredirectToSignInwhenrequireParametersthrows due to missing credentialssrc/libs/Authentication.ts:133-140— Early exit for missing credentials is commented outWhat changes do you think we should make in order to solve the problem?
Add
skipReauthentication: trueto theOpenReportparameters whenisFromDeepLinkistrue, insrc/libs/actions/Report/index.ts(around line 1537-1539, alongside the existingshouldRetry = false):This prevents the
Reauthenticationmiddleware from attempting to reauthenticate (and thus triggeringredirectToSignIn→Onyx.clear()). Instead, the 407 response flows through toSaveResponseInOnyx, which correctly appliesfailureDataandfinallyData, settingIS_CHECKING_PUBLIC_ROOM=false. The splash screen then hides and the sign-in page renders.This is safe because the deep link
OpenReportcall is specifically checking whether the report is a public room — if the user isn't authenticated and it's not a public room, the correct behavior is to show the sign-in page, not to attempt reauthentication.What alternative solutions did you explore? (Optional)
IS_CHECKING_PUBLIC_ROOMtokeysToPreserveinclearStorageAndRedirect()— This would preventOnyx.clear()from resetting the key, but doesn't address the DeepLinkHandler re-run loop caused by session clearing.doneCheckingPublicRoom()immediately afteropenReport()for unauthenticated users — This would break the public room experience, where unauthenticated users should be able to view public rooms without signing in.Authentication.ts:133-140— This should also be done as a separate cleanup, but alone it doesn't fully fix the issue sinceredirectToSignInis still called in therequireParameterscatch block.Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Mar 19, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (
External)[-]Navigation- Web page stuck on logo when navigating to IOU while logout[/-][+][$250] Navigation- Web page stuck on logo when navigating to IOU while logout[/+]melvin-bot commentedon Mar 19, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022034597830456948753
twilight2294 commentedon Mar 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a logged-out user navigates to an IOU report deep link (e.g.,
https://staging.new.expensify.com/r/12345), the web page gets permanently stuck on the Expensify logo splash screen instead of showing the sign-in page.What is the root cause of that problem?
The splash screen is gated on the
IS_CHECKING_PUBLIC_ROOMOnyx key, which defaults totrueand must be set tofalsebeforeNavigationRootrenders. In Expensify,isCheckingPublicRoomdefaults totruewithinitWithStoredValues: false, and at line 305,NavigationRootonly renders oncehasAttemptedToOpenPublicRoombecomes true — which requiresisCheckingPublicRoomto flip tofalse.When the deep link is processed,
openReportFromDeepLink()in Link callsopenReport()for unauthenticated users with a report ID. TheopenReport()function in Report correctly placesIS_CHECKING_PUBLIC_ROOM = falseinfinallyData, which by contract should execute regardless of whether the API call succeeds or fails.However, the actual bug is in SequentialQueue. When the unauthenticated
OpenReportrequest fails after exhausting retries, the.catch()handler only appliesfailureData—finallyDatais completely dropped:This violates the
finallyDatacontract. Notably, theshouldFailAllRequestsbranch at line 204-211 correctly includes bothfailureDataandfinallyData, proving this is an oversight rather than intentional behavior. The result isIS_CHECKING_PUBLIC_ROOMstaystrueforever, the splash screen never hides, and the user is stuck.What changes do you think we should make in order to solve the problem?
Apply
finallyDataalongsidefailureDatain the max-retry failure path of SequentialQueue, matching the existing correct pattern at line 206:The same fix should be applied at line 227 (the
RESEND_VALIDATE_CODEthrottle case) for consistency:What alternative solutions did you explore? (Optional)
The existing proposal suggests adding
skipReauthentication: trueto theOpenReportcall whenisFromDeepLinkis true. While this would prevent the reauthentication loop, it works around the symptom rather than fixing the root cause. The fundamental issue is thatfinallyData— which is supposed to always run (like afinallyblock) — is silently dropped in the max-retry failure path. This same bug could affect any future API call that relies onfinallyDatafor cleanup in a failure scenario. Fixing it at theSequentialQueuelevel is a two-line change that restores the correctfinallyDatacontract and aligns with the pattern already used in theshouldFailAllRequestsbranch at line 206.melvin-bot commentedon Mar 19, 2026
📣 @VanshDevChoudhary! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
shivang-goliyan commentedon Mar 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a logged-out user navigates to an IOU deep link, the web page gets stuck on the Expensify logo splash screen. The sign-in page never appears because
IS_CHECKING_PUBLIC_ROOMstaystrueforever, preventingNavigationRootfrom rendering (Expensify.tsx:305).What is the root cause of that problem?
The Reauthentication middleware unnecessarily attempts re-authentication for deep link
OpenReportrequests from unauthenticated users.When
isFromDeepLinkis true,openReport()setsshouldRetry = false(Report/index.ts:1532-1534) but does NOT setskipReauthentication. When the server returns 407, the middleware check at Reauthentication.ts:78-79 —(!shouldRetry && !apiRequestType) || skipReauthentication— evaluates tofalsebecauseapiRequestTypeis set (it's a WRITE command). So reauthentication proceeds.From there the cascade is:
reauthenticate()→Authenticate()with undefined credentials →requireParameters()throws →redirectToSignIn()→Onyx.clear()→IS_CHECKING_PUBLIC_ROOMreset totrue(it's not inkeysToPreservein SignInRedirect.ts:51-58). The reauthentication resolves withfalse, the middleware returnsundefinedback to SequentialQueue, and SequentialQueue's.then()handler fires (not.catch()). Since the response isundefined,SaveResponseInOnyxnever runs, sofinallyData— which containsIS_CHECKING_PUBLIC_ROOM = false— is never applied. The splash screen stays forever.Onyx.clear()also wipes the session, which triggers DeepLinkHandler's useEffect (line 75, depends onsessionMetadata?.status) to re-runopenReportFromDeepLink(), creating an infinite loop.This regression traces back to PR #64280 (June 2025), which changed the Reauthentication middleware to return
falseon failure instead of retrying infinitely. That fixed a re-auth loop but introduced this silent failure path. A contributing factor is the commented-out early exit in Authentication.ts:134-140 (disabled for debugging #fireroom-2026-01-28-user-signout), though re-enabling it alone wouldn't fix this —redirectToSignIn()is still called in the catch block at line 64-76.What changes do you think we should make in order to solve the problem?
Add
skipReauthentication: truealongside the existingshouldRetry = falsein Report/index.ts:1532-1534:And add
skipReauthentication?: booleantoOpenReportParams.ts.With this, the middleware skips re-auth entirely, the 407 flows through to
SaveResponseInOnyxwhich appliesfailureDataandfinallyData,IS_CHECKING_PUBLIC_ROOMbecomesfalse, and the sign-in page renders. This follows the same pattern used byLogOut(LogOutParams.ts:7) andSignInWithShortLivedAuthToken(Session/index.ts:783) for the same reason — credentials are unavailable or irrelevant.Edge cases: public room deep links are unaffected (they return 200, not 407). Authenticated users with expired tokens don't hit this path because
doneCheckingPublicRoom()is called directly (Link.ts:263). Offline users are handled separately at Link.ts:258-259.What alternative solutions did you explore? (Optional)
Adding
IS_CHECKING_PUBLIC_ROOMtokeysToPreservein SignInRedirect.ts would prevent the reset, but doesn't stop the unnecessary reauthentication attempt, doesn't fix the droppedfinallyData(the response isundefinedfrom the middleware, not from SequentialQueue's.catch()), and doesn't prevent the DeepLinkHandler re-run loop.The other proposal on this issue targets SequentialQueue's max-retry
.catch()handler for not applyingfinallyData. That IS a valid infrastructure gap, but the max-retry.catch()is never reached here. The Reauthentication middleware resolves gracefully withfalse→ returnsundefined→ SequentialQueue's.then()fires, not.catch(). Their fix wouldn't solve this bug.Fix deep link navigation stuck on logo when logged out
dukenv0307 commentedon Mar 19, 2026
@twilight2294 I can't reproduce this issue on staging, can you please verify again?
10 remaining items
melvin-bot commentedon Mar 26, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
sayanget commentedon Mar 26, 2026
I've investigated this issue and found an underlying infrastructure bug in SequentialQueue. I have a fix ready. Could you please assign this to me? Thanks!
melvin-bot commentedon Apr 20, 2026
This issue has not been updated in over 15 days. @dukenv0307 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
melvin-bot commentedon Jun 16, 2026
@dukenv0307, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.