Unfortunately, it appears that Mailspring’s password storage is currently broken on flatpak Mailspring. The suggested fix, according to the Mailspring Community: Password Management Error discussion, is to roll back to a previous version. I have tested version 1.11.0 and can confirm that it works.
Below is the fix mentioned in their forum (If you’re not comfortable using the terminal, you can use a GUI tool Warehouse on Flathub instead.):
To fix this, I did the following:
- list all Flatpak versions of the Mailspring app available:
flatpak remote-info --log flathub com.getmailspring.Mailspring
- Pick the version you want to downgrade to, in my case the following commit (v. 1.10.7):
flatpak update --commit=1efcb0434736d5248718166ed235b551bc6b513d14163b61950abf8213a5a894 com.getmailspring.Mailspring
- Clean up the old Flatpak files (make sure Mailspring is closed!)
cd ~/.var/app/
rm -rf com.getmailspring.Mailspring/
- Start Mailspring and the wizard should now come up. Connect your accounts.
Warning:
I found that connecting my Gmail accounts takes ages after I login. You have to wait at least 5 minutes after authorizing Mailspring before it actually adds your accounts. Just leave your browser window open until the Mailspring window closes and your account is added.
Also, I found that I had to add my Gmail accounts twice. After adding them, I immediately got an error that it couldn’t connect. If I then reconnect and authorize again, the accounts work.
Maybe this is something specific to version 1.10.7.
EDIT:
Forgot to add, if you want to prevent Flatpak from updating the package, you can do so by doing this:
- List all the Flatpak apps
flatpak list
- Copy the name of the Flatpak ID, in this case
com.getmailspring.Mailspring
- If you’re on PopOS like me, Flatpak is set up in user mode. Masking the package needs to be done like this:
flatpak mask --user com.getmailspring.Mailspring
Other distro’s sometimes don’t have to use --user, but instead just the App ID.
- You can list all masked packages with:
(sudo) flatpak mask
Depending on your distro, you might have to use sudo
and --user
to successfully mask the Flatpak package. I found in the past that the Pop!_Shop
, which is a GUI frontend for the APT
and Flatpak
package managers, would sometimes continue to try and update masked packages. That is why I mention using --user
and sudo
here to prevent more unnecessary head scratching and troubleshooting.
- The final step, test if flatpak wants to update the package by running:
flatpak update
Mailspring, alongside all other masked apps, should no longer show up in this list and are now excluded from being updated.