From 2a3b04a57d8bd651b4d220070f2df81050a37a55 Mon Sep 17 00:00:00 2001 From: "Issa Nimaga (via MelvinBot)" Date: Thu, 12 Mar 2026 10:23:15 +0000 Subject: [PATCH] Fix blank page when clicking Clear cache and restart in Troubleshoot Two changes to prevent the blank page: 1. Pass shouldHandleNavigationBack: false to the confirm modal since the modal immediately clears app state and doesn't need browser back-button handling. This prevents window.history corruption that confuses React Navigation. 2. Pass shouldNavigateToHomepage: true to clearOnyxAndResetApp() so the app navigates to HOME after clearing Onyx state instead of being left on a corrupted navigation state. Co-authored-by: Issa Nimaga --- src/pages/settings/Troubleshoot/TroubleshootPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx index 716cae2259b21..ec4c99871c3fb 100644 --- a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx +++ b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx @@ -71,13 +71,14 @@ function TroubleshootPage() { confirmText: translate('initialSettingsPage.troubleshoot.resetAndRefresh'), cancelText: translate('common.cancel'), shouldShowCancelButton: true, + shouldHandleNavigationBack: false, }); if (result.action !== ModalActions.CONFIRM) { return; } resetOptions(); setShouldResetSearchQuery(true); - clearOnyxAndResetApp(); + clearOnyxAndResetApp(true); }; const exportOnyxState = useCallback(() => { ExportOnyxState.readFromOnyxDatabase().then((value: Record) => {