[MM-37379] Add "Clear Data" options in the menu to allow users to force Electron to blow away session data. #3185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
A common problem that seems to happen when users upgrade their Desktop App is that when the new app loads, they can't access their server and it appears to be stuck at a white screen. The only solution we've found to this is to have the user manually reset their app by removing their config and app data folder.
We haven't been able to exactly reproduce this issue, but the feeling is that it's likely to do with some session or cache data being corrupted during the upgrade process. However, since we can't reproduce it, I'm not able to exactly pinpoint where the issue is and to fix it exactly.
So instead, this PR adds two menu options: Clear Data for Current Server and Clear All Data. These options will force the
session
to clear its data for either a single server, or clear for all, which shouldn't hopefully be an easier, in-app way that does not force the user to reconfigure their application/servers and should still help alleviate this problem.It's possible this might not end up doing anything - as we know Clear Cache and Reload doesn't work, but this is the next step to forcing the app to blow out session data that is likely the culprit here.
Ticket Link
https://mattermost.atlassian.net/browse/MM-37379
Screenshots