Flathub installation doesn't work with secrets correctly

Description

After reboot of Ubuntu 24.04, Mailspring always reports a problem reading password from the keychain on the start. All google email accounts require to
“Reconnect” and the Mailspring ID is logged out.

To Reproduce…

Steps to reproduce the behavior:

  1. Have Mailspring with several google accounts setup and working properly
  2. Reboot the machine
  3. Start Mailspring
  4. Find that all accounts including Mailspring ID require reconnection / login.

The problem also reproduces if I kill all the Mailspring processes without rebooting.

It looks like the problem is specific to Flathub installation and was originally reported here. If installed through Ubuntu Snap Store, the problem doesn’t manifest.

Expected Behavior

Screenshots

Setup

  • OS and Version: Ubuntu 24.04
  • Installation Method: Flathub
  • Mailspring Version: 1.13.3-9a7e1a78

Additional Context

I am sorry, but Flatpack is not officially supported. You may find some hints in this post or in the replies to it though: Password Management Error - #2 by system