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] Clear cache & refresh goes to Humm It's not here page #95079
Version Number: Reproducible in staging?: Needs Reproduction (Unable to reproduce) Reproducible in production?: Needs Reproduction If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@sakluger Slack conversation (hyperlinked to channel name): #Expensify bugs
Action Performed:
Navigate to Accounts > Troubleshoot > Clear cache and restart
Click Reset and refresh on the modal
Expected Result:
Page refreshed and loads without any issue
Actual Result:
Hmm its not here page displayed
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Clearing the cache wipes the report collection from Onyx, but the report the user was viewing stays mounted in the central pane underneath the Settings > Troubleshoot RHP. That central pane's not-found guard then sees "report gone + app not loading" and renders the "Hmm... it's not here" page.
Two things unique to this flow cause it:
Troubleshoot doesn't navigate home after resetting.TroubleshootPage.tsx:87 calls clearOnyxAndResetApp() with no argument, so shouldNavigateToHomepage is falsy and the navigate-to-HOME branch is skipped. The stale report route stays mounted. (Contrast the other caller, ImportedStateIndicator.tsx:27, which calls clearOnyxAndResetApp(true) and navigates away — it never hits this bug.)
IS_LOADING_APP is preserved as false during the wipe. It's in KEYS_TO_PRESERVE, so clearOnyxAndSeedFullReconnect keeps its pre-clear value of false. openApp() only flips it back to true in a later.then() (after the web-only clearWorkboxRecoveryCaches() step). In that window, the not-found guard evaluates with report data gone AND the app looking "not loading".
The guard, ReportNotFoundGuard.tsx:50,68: isLoading is false (because isLoadingApp === false), reportExists is false (report wiped), and hasSeenLoadingForCurrentReportID was already true from the original load → shouldShowNotFoundPage = true.
This is why it's web-only and intermittent: clearWorkboxRecoveryCaches() (a web service-worker step) widens the timing window before openApp() seeds IS_LOADING_APP=true.
What changes do you think we should make in order to solve the problem?
Either one closes the window:
Simplest: have Troubleshoot call clearOnyxAndResetApp(true) so it navigates to HOME after the reset, matching ImportedStateIndicator and replacing the now-invalid report route. (TroubleshootPage.tsx:87)
More robust: seed IS_LOADING_APP = true into the clear inside clearOnyxAndResetApp (via extraSeeds) so the not-found guard sees the app as loading across the entire clear → openApp window, regardless of which route is mounted. (App.ts:881)
The second option also protects other central-pane guards (e.g. workspace AccessOrNotFoundWrapper after policies are wiped), so it's the safer fix.
Investigation details & confidence
Data flow: viewing a report → open Settings > Troubleshoot (RHP over the report) → confirm "Reset and refresh" → clearOnyxAndResetApp() with no arg → Navigation.clearPreloadedRoutes() + Onyx clear wipes report collection but preserves IS_LOADING_APP=false → ReportNotFoundGuard re-renders with reportExists=false, isLoading=false, hasSeenLoadingForCurrentReportID=true → FullPageNotFoundView shouldShow renders "Hmm... it's not here" (string notFound.notHere in en.ts) → openApp() later sets IS_LOADING_APP=true, but the not-found page has already committed and, since the route was never changed, the app can be left on it.
Confidence: High on the mechanism (code ordering proves the window exists). Medium on how often it reproduces — the window width is timing/render-commit dependent, which matches the "Needs Reproduction / unable to reproduce" status. Production confirmation would come from the [ReportScreen] Displaying NotFound Page log line (ReportNotFoundGuard.tsx:73) correlated with an OpenApp on web.
Alternative considered: if the visible central pane at reset time isn't a report (e.g. a workspace settings page), the same symptom can come from AccessOrNotFoundWrapper after policies are wiped — same root cause (stale route + preserved loading flag), which is why the extraSeeds fix is preferable.
Next Steps for Contributor+ team: To accept:@MelvinBot implement this to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Please re-state the problem that we are trying to solve in this issue.
On Web (Chrome/Safari on macOS, Chrome on Windows), navigating to Accounts > Troubleshoot > Clear cache and restart and clicking "Reset and refresh" lands the user on the "Hmm, it's not here" (NotFound) page instead of refreshing the current page and loading normally.
What is the root cause of that problem?
In src/pages/settings/Troubleshoot/TroubleshootPage.tsx:87, showResetAndRefreshModal invokes clearOnyxAndResetApp() with no arguments. In src/libs/actions/App.ts:881-905, clearOnyxAndResetApp(shouldNavigateToHomepage?) only navigates to ROUTES.HOME when shouldNavigateToHomepage is truthy (line 903). Because the caller omits the flag, after Navigation.clearPreloadedRoutes() (line 887) fires and Onyx is wiped, the user is left on the deep /settings/troubleshoot route with cleared state and no navigation home, so the router falls through to the NotFound ("Hmm, it's not here") page.
What changes do you think we should make in order to solve the problem?
src/pages/settings/Troubleshoot/TroubleshootPage.tsx:87 — pass true for shouldNavigateToHomepage: clearOnyxAndResetApp(true); so the user is routed to ROUTES.HOME after the Onyx reset completes.
Alternatively (or additionally), change the default in src/libs/actions/App.ts:881 so shouldNavigateToHomepage defaults to true (all callers that trigger a full reset should return to home after the state wipe).
Verify other callers of clearOnyxAndResetApp (e.g., src/libs/actions/App.ts:188) still behave correctly with the chosen default; adjust their argument if needed.
What alternative solutions did you explore? (Optional)
🚨 Edited by proposal-police: This proposal was edited at 2026-07-01 19:25:07 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Running Settings → Troubleshoot → Clear cache and restart → Reset and refresh drops the user on the "Hmm... it's not here" (not found) page instead of quietly refreshing the app.
What is the root cause of that problem?
The two call sites that trigger a cache reset diverge — one navigates the user to a safe route afterwards, the other does not.
The reset handler on the Troubleshoot page calls clearOnyxAndResetApp() with no argument:
clearOnyxAndResetApp only navigates home when its optional shouldNavigateToHomepage flag is truthy. Called with no arg, that branch is skipped, so navigation stays exactly where it was while Onyx is wiped and re-fetched:
// Network key is preserved, so when exiting imported state, we should:
// 1. Stop forcing offline mode so the app can reconnect
// 2. Clear the IS_USING_IMPORTED_STATE flag
// 3. Restore the original user session
if(isStateImported){
setShouldForceOffline(false);
Onyx.set(ONYXKEYS.IS_USING_IMPORTED_STATE,false);
Log.info('[ImportedState] Exiting imported state mode, restoring original session');
}
if(shouldNavigateToHomepage){
Navigation.navigate(ROUTES.HOME);
}
The reset clears every Onyx collection and then kicks off openApp to reload it. During that clear→reload window the route the user is sitting on (and the report/central‑pane route it sits over) has no data. IS_LOADING_APP is intentionally preserved across the clear (it is in KEYS_TO_PRESERVE), so it stays false — i.e. "not loading" — even though the data is momentarily gone:
// Preserve IS_USING_IMPORTED_STATE so that when the app restarts (especially in HybridApp mode),
// we know if we're in imported state mode and should skip API calls that would cause infinite loading
ONYXKEYS.IS_USING_IMPORTED_STATE,
With "loading" reading false and the report/collection empty, the not‑found gate flips true and renders FullPageNotFoundView, whose default title is the exact notFound.notHere = "Hmm... it's not here" string from the report:
The working sibling — the "using imported state" banner — resets in the same way but passes true, so it lands the user on the resilient HOME route (which has no full‑page not‑found gate) while data reloads:
So the structural cause is that the Troubleshoot reset abandons the user on a route that is temporarily unresolvable, instead of resetting navigation to a safe base like the identical imported‑state flow already does. This is timing‑dependent, which is why it is intermittent / "unable to reproduce".
What changes do you think we should make in order to solve the problem?
Make the Troubleshoot reset match the imported‑state sibling — pass shouldNavigateToHomepage = true so the user is moved to HOME before the reloaded data settles, instead of watching a stale route resolve to not‑found:
Regression safety: the argument is additive and defaulted, so the only other real caller — ImportedStateIndicator (already true) and the RESET_REQUIRED emergency listener — are untouched; a "restart" landing on Home is the expected behavior of a full reset.
Why the obvious fix does not work: the tempting alternative is to make the not‑found gate wait on IS_LOADING_APP (treat the reset as "still loading"). That fails because IS_LOADING_APP is deliberately kept in KEYS_TO_PRESERVE — it was put there by Revert IS_LOADING_APP RAM-only migration to fix LHN infinite loading on offline refresh — so it stays false across the clear on purpose. Loosening the gate on that flag re‑introduces the offline‑refresh LHN infinite‑loading it was added to fix. Moving navigation to a safe route sidesteps the empty‑data window entirely without touching that flag.
What alternative solutions did you explore? (Optional)
Reset IS_LOADING_APP to true during the clear so every not‑found gate suppresses until openApp finishes. Rejected: it fights the intentional preserve above and risks the offline LHN infinite‑loading regression.
Keep the user on /settings/troubleshoot but block the underlying route with a loading state until openApp resolves. More surface area and still leaves navigation pointed at a route whose data was wiped; the sibling‑parity navigate‑home fix is the minimal, precedent‑backed change.
clearOnyxAndResetApp() wipes Onyx (keeping only the entries in KEYS_TO_PRESERVE) and then re-fetches everything with OpenApp. Two things about that preserve list matter here:
// Preserve IS_USING_IMPORTED_STATE so that when the app restarts (especially in HybridApp mode),
// we know if we're in imported state mode and should skip API calls that would cause infinite loading
ONYXKEYS.IS_USING_IMPORTED_STATE,
];
ONYXKEYS.IS_LOADING_APP is preserved, but ONYXKEYS.HAS_LOADED_APP is not. So immediately after the clear, the report/policy collections are empty, HAS_LOADED_APP is undefined, and IS_LOADING_APP still holds its stale pre-clear value of false. IS_LOADING_APP only flips back to true once OpenApp's optimistic data is applied:
On web this is a "restart" — the reset path clears the service worker/cache storage (web-only; the helper early-returns on native) and reloads the tab:
// Normally platform-specific behaviour is achieved with .native.ts / .ts file pairs.
// A .native.ts stub was tried here but the Jest test environment (jsdom, testEnvironment
// in jest.config.js) resolves both web and native imports to the same .ts file, so the
// stub was ignored and the test called real Cache Storage / ServiceWorker APIs that don't
// exist in jsdom, breaking the clearOnyxAndResetApp test. An explicit Platform.OS guard
// keeps the code in a single file while being safe in all three environments:
// web (browser), native (iOS/Android), and the Jest jsdom test runner.
if(Platform.OS!=='web'){
return;
}
That reload is why the page "goes" somewhere instead of staying on Troubleshoot: RHP/modal routes aren't restored across a hard reload, so the app comes back on the central-pane route (the previously open report or Search), not on the Troubleshoot RHP. That central page renders against a freshly-emptied Onyx while OpenApp is still in flight, and because IS_LOADING_APP is stuck at false there's no "still loading" signal — the page's not-found guard resolves to "not found" and shows FullPageNotFoundView ("Hmm… it's not here"). Once OpenApp returns and repopulates the collections it corrects itself, which is exactly why this is intermittent and hard to reproduce — it's a visible window, not a permanent state.
(I couldn't read the exact clearOnyxAndResetApp body in the provided slice of App.ts, but the preserve list, the clearWorkboxRecoveryCaches import in that file, and OpenApp's loading-flag timing pin the window down.)
What changes do you think we should make in order to solve the problem?
Data layer — keep the app in a "loading" state across the reset so restored full-screen pages render a skeleton instead of the not-found page during the empty-Onyx window.
The simplest fix is to set ONYXKEYS.IS_LOADING_APP to true synchronously before clearOnyxAndResetApp() runs in showResetAndRefreshModal (IS_LOADING_APP is already in KEYS_TO_PRESERVE, so it survives the clear). OpenApp's finallyData already resets it to false when the fetch completes, so no other cleanup is needed. That closes the gap where a destination page sees isLoadingApp === false with empty collections.
The edge case this touches is only the transient post-clear render — offline behavior and optimistic rollback are unaffected because we're just holding the loading flag until OpenApp resolves (and offline reset already can't complete OpenApp, so the loading state is the honest state anyway).
What alternative solutions did you explore? (Optional)
Add ONYXKEYS.HAS_LOADED_APP to KEYS_TO_PRESERVE so it isn't wiped. Rejected: preserving HAS_LOADED_APP === true across a full data wipe is worse — it tells the rest of the app the (now-empty) data is fully loaded, which would make the not-found flash permanent on any page that keys off hasLoadedApp rather than transient. The loading-flag approach is the correct direction.
Also considered gating FullPageNotFoundView inside each restored central page on isLoadingApp. Rejected as the primary fix: that's the same missing-loading-signal problem spread across many call sites, and it only works if IS_LOADING_APP is actually true during the window — which it isn't today. Fixing the flag at the reset source is one change instead of N.
Please re-state the problem that we are trying to solve in this issue.
When a user navigates to Settings > Troubleshoot and clicks "Reset and refresh" in the confirmation modal, the app clears the Onyx cache and reloads app data, but instead of returning to a working page, the user is shown the "Hmm...it's not here" (Not Found) page.
What is the root cause of that problem?
TroubleshootPage's reset handler calls clearOnyxAndResetApp() with no argument, so the user is left on whatever route/report was active before the reset (e.g. a report behind the Settings RHP) instead of being sent to the app's home route.
clearOnyxAndResetApp only navigates to ROUTES.HOME when its shouldNavigateToHomepage parameter is truthy. Since the Troubleshoot page never passes it, this branch is skipped, so the previously active route/report stays mounted while all of its underlying Onyx data (reports, report actions, etc.) has just been wiped and is being re-fetched from scratch via openApp().
// Network key is preserved, so when exiting imported state, we should:
// 1. Stop forcing offline mode so the app can reconnect
// 2. Clear the IS_USING_IMPORTED_STATE flag
// 3. Restore the original user session
if(isStateImported){
setShouldForceOffline(false);
Onyx.set(ONYXKEYS.IS_USING_IMPORTED_STATE,false);
Log.info('[ImportedState] Exiting imported state mode, restoring original session');
}
if(shouldNavigateToHomepage){
Navigation.navigate(ROUTES.HOME);
}
Because the screen the user was on before the reset keeps rendering against the now-cleared/rebuilding cache (e.g. ReportNotFoundGuard sees a missing report for the still-mounted reportID), the guard resolves to "not found" and the "Hmm...it's not here" page is displayed. Notably, the only other caller of this same function, ImportedStateIndicator, already passes true to avoid exactly this problem:
This confirms the Troubleshoot page's call site is simply missing the same shouldNavigateToHomepage argument, causing it to skip the safe redirect to home before/while the cache is rebuilt.
What changes do you think we should make in order to solve the problem?
Pass true for shouldNavigateToHomepage when resetting from the Troubleshoot page, matching the existing safe usage in ImportedStateIndicator, so the user lands on ROUTES.HOME instead of remaining on a route whose backing data was just cleared.
The Troubleshoot page confirms "Reset and refresh" and then calls clearOnyxAndResetApp() without the existing homepage navigation flag. That means the destructive reset clears local app state and starts reopening app data while the user remains on the /settings/troubleshoot route that initiated the reset.
clearOnyxAndResetApp already supports this case: after clearing Onyx, it navigates to ROUTES.HOME only when shouldNavigateToHomepage is true, then continues with the preserved session/account and openApp flow.
Because the troubleshoot flow never opts into that escape hatch, the reset can leave the app trying to continue from the volatile settings route while its supporting state has just been cleared, which is why the user can end up on the generic not-found page instead of a stable app screen.
What changes do you think we should make in order to solve the problem?
Pass true when TroubleshootPage calls clearOnyxAndResetApp, matching the existing imported-state exit path. This makes "Reset and refresh" leave the troubleshoot route and restart from Home after clearing local state, instead of trying to keep rendering the page that initiated the reset.
Add or update component coverage for TroubleshootPage so confirming the reset modal calls clearOnyxAndResetApp(true).
Manually verify on web that Accounts > Troubleshoot > Clear cache and restart > Reset and refresh clears/reloads the app and lands on Home, not the "Hmm, it's not here" page.
What alternative solutions did you explore? (Optional)
We could add SCREENS.SETTINGS.TROUBLESHOOT to CONST.EXCLUDE_FROM_LAST_VISITED_PATH, but that only affects future last-visited-path persistence. The reset action itself should intentionally leave the route that is being cleared from under the app state.
changed the title [-]Clear cache & refresh goes to Humm It's not here page[/-][+][$250] Clear cache & refresh goes to Humm It's not here page[/+]on Jul 1, 2026
📣 @Dip-G-Git! 📣
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>
⚠️@Dip-G-Git Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
📣 @toruiwasa! 📣
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>
⚠️@toruiwasa Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Not a submission, and I'm not putting a fix of my own forward. This thread has been stuck for twelve days on the two things below, so I'm just leaving them here.
@shubham1206agra asked for repro steps with a video on 07-02 and nobody has posted one. Here it is. The second thing is that I believe the root cause everyone here has landed on, mine included when I first looked, is the wrong one.
Why nobody has been able to reproduce it
The missing precondition is nvp_tryNewDot.nudgeMigration.timestamp. The account has to be a nudge-migration account (here). The reporter is Expensify staff and has one. A plain contributor account does not, which is why @emkhalid could follow the OP's steps exactly and see nothing wrong. The steps aren't wrong, they're incomplete.
Verified on staging and on a local build:
First confirm the account is not nudge-migrated. This is the state everyone has been testing in, and it does not reproduce. Settings > Troubleshoot > Clear cache and restart > Reset and refresh restarts normally, no /not-found.
Go to Settings > Troubleshoot, so the URL is /settings/troubleshoot.
Clear cache and restart, then Reset and refresh.
🐛 The URL becomes /not-found and stays there.
Expensify can skip step 2 and just use the OP's steps on any nudge-migration account.
The video runs the same reset twice. First on a plain account, where nudgeMigration is undefined and the app restarts normally with no /not-found, which is what everyone else has been seeing. Then with nudgeMigration set, where the identical reset lands on /not-found and the router logs the failure below.
95079_repro.mp4
It is not ReportNotFoundGuard
Two things rule that guard out.
The screenshot is a different not-found page. It shows the URL .../not-found, the subtitle "Oops, this page cannot be found", and a "Go back to home page" link. That is NotFoundPage, the '*' catch-all screen, with its default props. ReportNotFoundGuard renders subtitleKey="notFound.noAccess" with shouldShowLink={false}, and it never changes the URL (here).
And it can't fire in that window anyway. The line under the isLoadingApp read that everyone is quoting is isLoadingReportData, which is in neither KEYS_TO_PRESERVE nor initialKeyStates. Right after Onyx.clear() it is undefined, so it falls back to its default of true, isLoading is true, and shouldShowNotFoundPage is false (here). During the reset that guard is loading, not not-found.
What actually happens is a navigation, not a render. The URL changes, and MigratedUserWelcomeModalGuard is what changes it. That guard builds its route from whatever screen you happen to be standing on (here), and SETTINGS.TROUBLESHOOT is not in that route's entryScreens (here). So /settings/troubleshoot/migrated-user-welcome matches no pattern, falls through to '*', and resolves to SCREENS.NOT_FOUND. The router says so itself, in the console, every single time:
[warn] [getStateFromPath.ts][DynamicRoute] None of the 1 dynamic suffix candidate(s) passed entryScreens validation for path: /settings/troubleshoot/migrated-user-welcome
@samranahm's video is corroboration for this, I think without them realising. At 0:09 the URL bar reads /home/migrated-user-welcome and the "Welcome to New Expensify!" modal is open. Same guard, navigating from Home instead of Troubleshoot. Home is in entryScreens, so from there it resolves. From Troubleshoot it doesn't, and you get /not-found.
The guard fires at all because the reset hands it a half-cleared store.IS_LOADING_APP is in KEYS_TO_PRESERVE, so the false from before the wipe survives it. The guard then reads isLoadingApp: false (untrue, Onyx was just emptied), dismissedProductTraining: undefined (untrue, the user dismissed it and that lives on the server), and hasBeenAddedToNudgeMigration: true (a module variable the wipe cannot touch). All six of its conditions (here) pass against a user who does not exist: nudge-migrated, app loaded, welcome modal never dismissed.
Three things I measured, since they contradict what's assumed here
I didn't reason about these, I built them and watched them. Nothing below is my own idea, it's just data on ideas already on this thread.
clearOnyxAndResetApp(true) on its own does not stop the bad navigation. Most of the analysis here assumes it does. It doesn't. The router still logs the same entryScreens failure and still resolves the route to NOT_FOUND. What the flag actually does is fire a second Navigation.navigate(ROUTES.HOME) afterwards, deep in the .then() chain (here), which lands last and hides the symptom. It races the defect rather than removing it.
Seeding IS_LOADING_APP: true into the clear works on its own, with clearOnyxAndResetApp() left exactly as it is on main, so it does not need to be gated on shouldNavigateToHomepage:
build
after reset
entryScreens warning
welcome modal
main
/settings/troubleshoot → /not-found, stays
logged
-
seed only, no flag change
stays on /settings/troubleshoot
none
none
Seeding it does not cause an infinite loading state, which @ahmdshrif raised as a concern. isLoadingApp goes true at ~1.9s and back to false at ~5.1s once openApp resolves. Brief spinner, then the LHN renders normally.
Separately, and probably its own issue rather than this one: createDynamicRoute(path, Navigation.getActiveRoute()) will produce a NOT_FOUND from any screen that isn't in that route's entryScreens. This bug is one instance of it, and #95892 looks like another.
@toruiwasa Thanks for the detailed analysis, but the not-found page you are able to repro is not the same as this was happening due to the nudge migration variable temporarily assigned via Onyx manipulation which is wrong.
Activity
MelvinBot commentedon Jul 1, 2026
Proposal
What is the root cause of that problem?
Clearing the cache wipes the
reportcollection from Onyx, but the report the user was viewing stays mounted in the central pane underneath the Settings > Troubleshoot RHP. That central pane's not-found guard then sees "report gone + app not loading" and renders the "Hmm... it's not here" page.Two things unique to this flow cause it:
Troubleshoot doesn't navigate home after resetting.
TroubleshootPage.tsx:87callsclearOnyxAndResetApp()with no argument, soshouldNavigateToHomepageis falsy and the navigate-to-HOME branch is skipped. The stale report route stays mounted. (Contrast the other caller,ImportedStateIndicator.tsx:27, which callsclearOnyxAndResetApp(true)and navigates away — it never hits this bug.)IS_LOADING_APPis preserved asfalseduring the wipe. It's inKEYS_TO_PRESERVE, soclearOnyxAndSeedFullReconnectkeeps its pre-clear value offalse.openApp()only flips it back totruein a later.then()(after the web-onlyclearWorkboxRecoveryCaches()step). In that window, the not-found guard evaluates with report data gone AND the app looking "not loading".The guard,
ReportNotFoundGuard.tsx:50,68:isLoadingis false (becauseisLoadingApp === false),reportExistsis false (report wiped), andhasSeenLoadingForCurrentReportIDwas alreadytruefrom the original load →shouldShowNotFoundPage = true.This is why it's web-only and intermittent:
clearWorkboxRecoveryCaches()(a web service-worker step) widens the timing window beforeopenApp()seedsIS_LOADING_APP=true.What changes do you think we should make in order to solve the problem?
Either one closes the window:
clearOnyxAndResetApp(true)so it navigates to HOME after the reset, matchingImportedStateIndicatorand replacing the now-invalid report route. (TroubleshootPage.tsx:87)IS_LOADING_APP = trueinto the clear insideclearOnyxAndResetApp(viaextraSeeds) so the not-found guard sees the app as loading across the entire clear →openAppwindow, regardless of which route is mounted. (App.ts:881)The second option also protects other central-pane guards (e.g. workspace
AccessOrNotFoundWrapperafter policies are wiped), so it's the safer fix.Investigation details & confidence
Data flow: viewing a report → open Settings > Troubleshoot (RHP over the report) → confirm "Reset and refresh" →
clearOnyxAndResetApp()with no arg →Navigation.clearPreloadedRoutes()+ Onyx clear wipesreportcollection but preservesIS_LOADING_APP=false→ReportNotFoundGuardre-renders withreportExists=false,isLoading=false,hasSeenLoadingForCurrentReportID=true→FullPageNotFoundView shouldShowrenders "Hmm... it's not here" (stringnotFound.notHereinen.ts) →openApp()later setsIS_LOADING_APP=true, but the not-found page has already committed and, since the route was never changed, the app can be left on it.Confidence: High on the mechanism (code ordering proves the window exists). Medium on how often it reproduces — the window width is timing/render-commit dependent, which matches the "Needs Reproduction / unable to reproduce" status. Production confirmation would come from the
[ReportScreen] Displaying NotFound Pagelog line (ReportNotFoundGuard.tsx:73) correlated with an OpenApp on web.Alternative considered: if the visible central pane at reset time isn't a report (e.g. a workspace settings page), the same symptom can come from
AccessOrNotFoundWrapperafter policies are wiped — same root cause (stale route + preserved loading flag), which is why theextraSeedsfix is preferable.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement thisto create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
aswin-s commentedon Jul 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Web (Chrome/Safari on macOS, Chrome on Windows), navigating to Accounts > Troubleshoot > Clear cache and restart and clicking "Reset and refresh" lands the user on the "Hmm, it's not here" (NotFound) page instead of refreshing the current page and loading normally.
What is the root cause of that problem?
In
src/pages/settings/Troubleshoot/TroubleshootPage.tsx:87,showResetAndRefreshModalinvokesclearOnyxAndResetApp()with no arguments. Insrc/libs/actions/App.ts:881-905,clearOnyxAndResetApp(shouldNavigateToHomepage?)only navigates toROUTES.HOMEwhenshouldNavigateToHomepageis truthy (line 903). Because the caller omits the flag, afterNavigation.clearPreloadedRoutes()(line 887) fires and Onyx is wiped, the user is left on the deep/settings/troubleshootroute with cleared state and no navigation home, so the router falls through to the NotFound ("Hmm, it's not here") page.What changes do you think we should make in order to solve the problem?
src/pages/settings/Troubleshoot/TroubleshootPage.tsx:87— passtrueforshouldNavigateToHomepage:clearOnyxAndResetApp(true);so the user is routed toROUTES.HOMEafter the Onyx reset completes.src/libs/actions/App.ts:881soshouldNavigateToHomepagedefaults totrue(all callers that trigger a full reset should return to home after the state wipe).clearOnyxAndResetApp(e.g.,src/libs/actions/App.ts:188) still behave correctly with the chosen default; adjust their argument if needed.What alternative solutions did you explore? (Optional)
ahmdshrif commentedon Jul 1, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-01 19:25:07 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Running Settings → Troubleshoot → Clear cache and restart → Reset and refresh drops the user on the "Hmm... it's not here" (not found) page instead of quietly refreshing the app.
What is the root cause of that problem?
The two call sites that trigger a cache reset diverge — one navigates the user to a safe route afterwards, the other does not.
The reset handler on the Troubleshoot page calls
clearOnyxAndResetApp()with no argument:App/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
Lines 85 to 87 in e4b4a90
clearOnyxAndResetApponly navigates home when its optionalshouldNavigateToHomepageflag is truthy. Called with no arg, that branch is skipped, so navigation stays exactly where it was while Onyx is wiped and re-fetched:App/src/libs/actions/App.ts
Lines 881 to 905 in e4b4a90
The reset clears every Onyx collection and then kicks off
openAppto reload it. During that clear→reload window the route the user is sitting on (and the report/central‑pane route it sits over) has no data.IS_LOADING_APPis intentionally preserved across the clear (it is inKEYS_TO_PRESERVE), so it staysfalse— i.e. "not loading" — even though the data is momentarily gone:App/src/libs/actions/App.ts
Lines 147 to 172 in e4b4a90
With "loading" reading false and the report/collection empty, the not‑found gate flips true and renders
FullPageNotFoundView, whose default title is the exactnotFound.notHere= "Hmm... it's not here" string from the report:App/src/pages/inbox/ReportNotFoundGuard.tsx
Lines 50 to 68 in e4b4a90
App/src/components/BlockingViews/FullPageNotFoundView.tsx
Lines 65 to 70 in e4b4a90
The working sibling — the "using imported state" banner — resets in the same way but passes
true, so it lands the user on the resilient HOME route (which has no full‑page not‑found gate) while data reloads:App/src/components/ImportedStateIndicator.tsx
Line 27 in e4b4a90
So the structural cause is that the Troubleshoot reset abandons the user on a route that is temporarily unresolvable, instead of resetting navigation to a safe base like the identical imported‑state flow already does. This is timing‑dependent, which is why it is intermittent / "unable to reproduce".
What changes do you think we should make in order to solve the problem?
Make the Troubleshoot reset match the imported‑state sibling — pass
shouldNavigateToHomepage = trueso the user is moved to HOME before the reloaded data settles, instead of watching a stale route resolve to not‑found:Regression safety: the argument is additive and defaulted, so the only other real caller —
ImportedStateIndicator(alreadytrue) and theRESET_REQUIREDemergency listener — are untouched; a "restart" landing on Home is the expected behavior of a full reset.Why the obvious fix does not work: the tempting alternative is to make the not‑found gate wait on
IS_LOADING_APP(treat the reset as "still loading"). That fails becauseIS_LOADING_APPis deliberately kept inKEYS_TO_PRESERVE— it was put there byRevert IS_LOADING_APP RAM-only migration to fix LHN infinite loading on offline refresh— so it staysfalseacross the clear on purpose. Loosening the gate on that flag re‑introduces the offline‑refresh LHN infinite‑loading it was added to fix. Moving navigation to a safe route sidesteps the empty‑data window entirely without touching that flag.What alternative solutions did you explore? (Optional)
IS_LOADING_APPtotrueduring the clear so every not‑found gate suppresses untilopenAppfinishes. Rejected: it fights the intentional preserve above and risks the offline LHN infinite‑loading regression./settings/troubleshootbut block the underlying route with a loading state untilopenAppresolves. More surface area and still leaves navigation pointed at a route whose data was wiped; the sibling‑parity navigate‑home fix is the minimal, precedent‑backed change.oqildev commentedon Jul 1, 2026
Proposal
What is the root cause of that problem?
The "Reset and refresh" button runs this, in order, from the Troubleshoot page:
App/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
Lines 74 to 88 in e4b4a90
clearOnyxAndResetApp()wipes Onyx (keeping only the entries inKEYS_TO_PRESERVE) and then re-fetches everything withOpenApp. Two things about that preserve list matter here:App/src/libs/actions/App.ts
Lines 147 to 173 in e4b4a90
ONYXKEYS.IS_LOADING_APPis preserved, butONYXKEYS.HAS_LOADED_APPis not. So immediately after the clear, the report/policy collections are empty,HAS_LOADED_APPisundefined, andIS_LOADING_APPstill holds its stale pre-clear value offalse.IS_LOADING_APPonly flips back totrueonceOpenApp's optimistic data is applied:App/src/libs/actions/App.ts
Lines 364 to 376 in e4b4a90
On web this is a "restart" — the reset path clears the service worker/cache storage (web-only; the helper early-returns on native) and reloads the tab:
App/src/libs/clearWorkboxRecoveryCaches/index.ts
Lines 10 to 20 in e4b4a90
That reload is why the page "goes" somewhere instead of staying on Troubleshoot: RHP/modal routes aren't restored across a hard reload, so the app comes back on the central-pane route (the previously open report or Search), not on the Troubleshoot RHP. That central page renders against a freshly-emptied Onyx while
OpenAppis still in flight, and becauseIS_LOADING_APPis stuck atfalsethere's no "still loading" signal — the page's not-found guard resolves to "not found" and showsFullPageNotFoundView("Hmm… it's not here"). OnceOpenAppreturns and repopulates the collections it corrects itself, which is exactly why this is intermittent and hard to reproduce — it's a visible window, not a permanent state.(I couldn't read the exact
clearOnyxAndResetAppbody in the provided slice ofApp.ts, but the preserve list, theclearWorkboxRecoveryCachesimport in that file, andOpenApp's loading-flag timing pin the window down.)What changes do you think we should make in order to solve the problem?
Data layer — keep the app in a "loading" state across the reset so restored full-screen pages render a skeleton instead of the not-found page during the empty-Onyx window.
The simplest fix is to set
ONYXKEYS.IS_LOADING_APPtotruesynchronously beforeclearOnyxAndResetApp()runs inshowResetAndRefreshModal(IS_LOADING_APPis already inKEYS_TO_PRESERVE, so it survives the clear).OpenApp'sfinallyDataalready resets it tofalsewhen the fetch completes, so no other cleanup is needed. That closes the gap where a destination page seesisLoadingApp === falsewith empty collections.The edge case this touches is only the transient post-clear render — offline behavior and optimistic rollback are unaffected because we're just holding the loading flag until
OpenAppresolves (and offline reset already can't completeOpenApp, so the loading state is the honest state anyway).What alternative solutions did you explore? (Optional)
Add
ONYXKEYS.HAS_LOADED_APPtoKEYS_TO_PRESERVEso it isn't wiped. Rejected: preservingHAS_LOADED_APP === trueacross a full data wipe is worse — it tells the rest of the app the (now-empty) data is fully loaded, which would make the not-found flash permanent on any page that keys offhasLoadedApprather than transient. The loading-flag approach is the correct direction.Also considered gating
FullPageNotFoundViewinside each restored central page onisLoadingApp. Rejected as the primary fix: that's the same missing-loading-signal problem spread across many call sites, and it only works ifIS_LOADING_APPis actuallytrueduring the window — which it isn't today. Fixing the flag at the reset source is one change instead of N.abbasifaizan70 commentedon Jul 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user navigates to Settings > Troubleshoot and clicks "Reset and refresh" in the confirmation modal, the app clears the Onyx cache and reloads app data, but instead of returning to a working page, the user is shown the "Hmm...it's not here" (Not Found) page.
What is the root cause of that problem?
TroubleshootPage's reset handler callsclearOnyxAndResetApp()with no argument, so the user is left on whatever route/report was active before the reset (e.g. a report behind the Settings RHP) instead of being sent to the app's home route.App/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
Lines 74 to 88 in 252374e
clearOnyxAndResetApponly navigates toROUTES.HOMEwhen itsshouldNavigateToHomepageparameter is truthy. Since the Troubleshoot page never passes it, this branch is skipped, so the previously active route/report stays mounted while all of its underlying Onyx data (reports, report actions, etc.) has just been wiped and is being re-fetched from scratch viaopenApp().App/src/libs/actions/App.ts
Lines 881 to 905 in 252374e
Because the screen the user was on before the reset keeps rendering against the now-cleared/rebuilding cache (e.g.
ReportNotFoundGuardsees a missing report for the still-mountedreportID), the guard resolves to "not found" and the "Hmm...it's not here" page is displayed. Notably, the only other caller of this same function,ImportedStateIndicator, already passestrueto avoid exactly this problem:App/src/components/ImportedStateIndicator.tsx
Line 27 in 252374e
This confirms the Troubleshoot page's call site is simply missing the same
shouldNavigateToHomepageargument, causing it to skip the safe redirect to home before/while the cache is rebuilt.What changes do you think we should make in order to solve the problem?
Pass
trueforshouldNavigateToHomepagewhen resetting from the Troubleshoot page, matching the existing safe usage inImportedStateIndicator, so the user lands onROUTES.HOMEinstead of remaining on a route whose backing data was just cleared.App/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
Line 87 in 252374e
kitvasyl commentedon Jul 1, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
KJ21-ENG commentedon Jul 1, 2026
Proposal
What is the root cause of that problem?
The Troubleshoot page confirms "Reset and refresh" and then calls
clearOnyxAndResetApp()without the existing homepage navigation flag. That means the destructive reset clears local app state and starts reopening app data while the user remains on the/settings/troubleshootroute that initiated the reset.App/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
Lines 74 to 88 in e4b4a90
clearOnyxAndResetAppalready supports this case: after clearing Onyx, it navigates toROUTES.HOMEonly whenshouldNavigateToHomepageis true, then continues with the preserved session/account andopenAppflow.App/src/libs/actions/App.ts
Lines 881 to 923 in e4b4a90
Because the troubleshoot flow never opts into that escape hatch, the reset can leave the app trying to continue from the volatile settings route while its supporting state has just been cleared, which is why the user can end up on the generic not-found page instead of a stable app screen.
What changes do you think we should make in order to solve the problem?
Pass
truewhenTroubleshootPagecallsclearOnyxAndResetApp, matching the existing imported-state exit path. This makes "Reset and refresh" leave the troubleshoot route and restart from Home after clearing local state, instead of trying to keep rendering the page that initiated the reset.App/src/components/ImportedStateIndicator.tsx
Lines 19 to 28 in e4b4a90
Test coverage:
TroubleshootPageso confirming the reset modal callsclearOnyxAndResetApp(true).What alternative solutions did you explore? (Optional)
We could add
SCREENS.SETTINGS.TROUBLESHOOTtoCONST.EXCLUDE_FROM_LAST_VISITED_PATH, but that only affects future last-visited-path persistence. The reset action itself should intentionally leave the route that is being cleared from under the app state.melvin-bot commentedon Jul 1, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (
External)[-]Clear cache & refresh goes to Humm It's not here page[/-][+][$250] Clear cache & refresh goes to Humm It's not here page[/+]29 remaining items
melvin-bot commentedon Jul 10, 2026
📣 @Dip-G-Git! 📣
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:
github-actions commentedon Jul 10, 2026
melvin-bot commentedon Jul 13, 2026
@shubham1206agra 10 days overdue. Is anyone even seeing these? Hello?
toruiwasa commentedon Jul 14, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
melvin-bot commentedon Jul 14, 2026
📣 @toruiwasa! 📣
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:
github-actions commentedon Jul 14, 2026
toruiwasa commentedon Jul 14, 2026
Not a submission, and I'm not putting a fix of my own forward. This thread has been stuck for twelve days on the two things below, so I'm just leaving them here.
@shubham1206agra asked for repro steps with a video on 07-02 and nobody has posted one. Here it is. The second thing is that I believe the root cause everyone here has landed on, mine included when I first looked, is the wrong one.
Why nobody has been able to reproduce it
The missing precondition is
nvp_tryNewDot.nudgeMigration.timestamp. The account has to be a nudge-migration account (here). The reporter is Expensify staff and has one. A plain contributor account does not, which is why @emkhalid could follow the OP's steps exactly and see nothing wrong. The steps aren't wrong, they're incomplete.Verified on staging and on a local build:
Settings > Troubleshoot > Clear cache and restart > Reset and refreshrestarts normally, no/not-found.Settings > Troubleshoot, so the URL is/settings/troubleshoot.Clear cache and restart, thenReset and refresh./not-foundand stays there.Expensify can skip step 2 and just use the OP's steps on any nudge-migration account.
The video runs the same reset twice. First on a plain account, where
nudgeMigrationisundefinedand the app restarts normally with no/not-found, which is what everyone else has been seeing. Then withnudgeMigrationset, where the identical reset lands on/not-foundand the router logs the failure below.95079_repro.mp4
It is not
ReportNotFoundGuardTwo things rule that guard out.
The screenshot is a different not-found page. It shows the URL
.../not-found, the subtitle "Oops, this page cannot be found", and a "Go back to home page" link. That isNotFoundPage, the'*'catch-all screen, with its default props.ReportNotFoundGuardrenderssubtitleKey="notFound.noAccess"withshouldShowLink={false}, and it never changes the URL (here).And it can't fire in that window anyway. The line under the
isLoadingAppread that everyone is quoting isisLoadingReportData, which is in neitherKEYS_TO_PRESERVEnorinitialKeyStates. Right afterOnyx.clear()it isundefined, so it falls back to its default oftrue,isLoadingistrue, andshouldShowNotFoundPageisfalse(here). During the reset that guard is loading, not not-found.What actually happens is a navigation, not a render. The URL changes, and
MigratedUserWelcomeModalGuardis what changes it. That guard builds its route from whatever screen you happen to be standing on (here), andSETTINGS.TROUBLESHOOTis not in that route'sentryScreens(here). So/settings/troubleshoot/migrated-user-welcomematches no pattern, falls through to'*', and resolves toSCREENS.NOT_FOUND. The router says so itself, in the console, every single time:@samranahm's video is corroboration for this, I think without them realising. At 0:09 the URL bar reads
/home/migrated-user-welcomeand the "Welcome to New Expensify!" modal is open. Same guard, navigating from Home instead of Troubleshoot. Home is inentryScreens, so from there it resolves. From Troubleshoot it doesn't, and you get/not-found.The guard fires at all because the reset hands it a half-cleared store.
IS_LOADING_APPis inKEYS_TO_PRESERVE, so thefalsefrom before the wipe survives it. The guard then readsisLoadingApp: false(untrue, Onyx was just emptied),dismissedProductTraining: undefined(untrue, the user dismissed it and that lives on the server), andhasBeenAddedToNudgeMigration: true(a module variable the wipe cannot touch). All six of its conditions (here) pass against a user who does not exist: nudge-migrated, app loaded, welcome modal never dismissed.Three things I measured, since they contradict what's assumed here
I didn't reason about these, I built them and watched them. Nothing below is my own idea, it's just data on ideas already on this thread.
clearOnyxAndResetApp(true)on its own does not stop the bad navigation. Most of the analysis here assumes it does. It doesn't. The router still logs the sameentryScreensfailure and still resolves the route toNOT_FOUND. What the flag actually does is fire a secondNavigation.navigate(ROUTES.HOME)afterwards, deep in the.then()chain (here), which lands last and hides the symptom. It races the defect rather than removing it.Seeding
IS_LOADING_APP: trueinto the clear works on its own, withclearOnyxAndResetApp()left exactly as it is onmain, so it does not need to be gated onshouldNavigateToHomepage:entryScreenswarningmain/settings/troubleshoot→/not-found, stays/settings/troubleshootSeeding it does not cause an infinite loading state, which @ahmdshrif raised as a concern.
isLoadingAppgoestrueat ~1.9s and back tofalseat ~5.1s onceopenAppresolves. Brief spinner, then the LHN renders normally.Separately, and probably its own issue rather than this one:
createDynamicRoute(path, Navigation.getActiveRoute())will produce aNOT_FOUNDfrom any screen that isn't in that route'sentryScreens. This bug is one instance of it, and #95892 looks like another.shubham1206agra commentedon Jul 15, 2026
@toruiwasa Thanks for the detailed analysis, but the not-found page you are able to repro is not the same as this was happening due to the nudge migration variable temporarily assigned via Onyx manipulation which is wrong.
toruiwasa commentedon Jul 15, 2026
Thanks @shubham1206agra! I appreciate the clarification. I must have misunderstood
NicolasBonet commentedon Jul 15, 2026
Not reproducible anymore: https://expensify.slack.com/archives/C049HHMV9SM/p1782924275300419
chrispader commentedon Sep 10, 2026
I can still clearly reproduce this locally. I've created an issue and a PR with a holistic fix for this!