From 4136e0722d2f25aa29152f6e2f7cb805da899e2b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 2 Oct 2019 09:34:30 -0600 Subject: [PATCH 1/2] Add a bit of debugging for clear cache & reload button --- src/components/views/settings/tabs/user/HelpUserSettingsTab.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/settings/tabs/user/HelpUserSettingsTab.js b/src/components/views/settings/tabs/user/HelpUserSettingsTab.js index a50b26fed6..683cf90222 100644 --- a/src/components/views/settings/tabs/user/HelpUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/HelpUserSettingsTab.js @@ -71,6 +71,9 @@ export default class HelpUserSettingsTab extends React.Component { _onClearCacheAndReload = (e) => { if (!PlatformPeg.get()) return; + // Dev note: please keep this log line, it's useful when troubleshooting a MatrixClient suddenly + // stopping in the middle of the logs. + console.log("Clear cache & reload clicked"); MatrixClientPeg.get().stopClient(); MatrixClientPeg.get().store.deleteAllData().done(() => { PlatformPeg.get().reload(); From d97ff8a692c4b61f794ac90e72c5aec9a93f1f53 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 2 Oct 2019 09:45:53 -0600 Subject: [PATCH 2/2] Add debugging for soft logout too --- src/Lifecycle.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index c03a958840..a2cfc9a1ba 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -544,6 +544,9 @@ export function softLogout() { // been soft logged out, despite having credentials and data for a MatrixClient). localStorage.setItem("mx_soft_logout", "true"); + // Dev note: please keep this log line around. It can be useful for track down + // random clients stopping in the middle of the logs. + console.log("Soft logout initiated"); _isLoggingOut = true; // to avoid repeated flags stopMatrixClient(/*unsetClient=*/false); dis.dispatch({action: 'on_client_not_viable'}); // generic version of on_logged_out