Password Management Error

Cant revert to revision 523. It isn’t available anymore.
:pensive:

Please check out version 1.13.1 which should resolve all the issues that you encounter: Release 1.13.1 · Foundry376/Mailspring · GitHub

You can find more information about how this was resolved here: Password Management Error after the latest Upgrade - #29 by bengotow

1 Like

The issue persists on both Snap and deb as of today.
Even performed sudo snap connect mailspring:password-manager-service

Switching to Thunderbird for now. Notify us when fixed.

MX-Linux KDE (Latest updates/version)

Just to confirm, you are on version 1.13.1 already and have reconnected you Mailspring Id and all your accounts?

Not sure if you’re addressing me, anyways, I uninstalled and fresh-installed it from the official website both .deb and Snap which neither of them worked. Am I missing your point here?

1 Like

Updated to Snap v1.13.1 and now everything works!

I did the steps in the link : Password Management Error after the latest Upgrade - #29 by bengotow

:+1:

1 Like

@mrtabaa Yes, can you please check that you are running the latest 1.13.1 version? If not, please use snap refresh to get the update.

Bildschirmfoto vom 2023-11-22 12-56-38

Here still not working, running arch linux, 1.13.1 installed by AUR repository.

What exactly means “still not working”? The AUR version is using the .deb version as a base, so the snap related errors should not appear. Can you please provide an error log that you see? Did you try a fresh install?

yes, it is a fresh install, and cleared my mailspring profile, and still mailspring crash after “skip mailspring ID”
2023-11-22-143115_ss

[ia@sun ~] % mailspring                                             [0][14:23:55]
[182148:1122/142401.455486:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[182148:1122/142401.455544:ERROR:select_file_dialog_linux_portal.cc(274)] Failed to read portal version property
Running database migrations
App load time: 284ms

Running Setup
{"error":null}
Manual update check (updates.getmailspring.com/check/linux/x64/1.13.1-59cb1b1d/anonymous/stable) returned 204
Error: Could not call remote method 'encryptString'. Check that the method signature is correct. Underlying error: Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.Underlying stack: Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.
    at /usr/share/mailspring/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:465:71
    at IpcMainImpl.<anonymous> (/usr/share/mailspring/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:323:27)
    at IpcMainImpl.emit (node:events:513:28)
    at IpcMainImpl.emit (node:domain:489:12)
    at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:82058)
    at EventEmitter.emit (node:events:513:28)
    at EventEmitter.emit (node:domain:489:12)

    at /usr/share/mailspring/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:468:25
    at IpcMainImpl.<anonymous> (/usr/share/mailspring/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:323:27)
    at IpcMainImpl.emit (node:events:513:28)
    at IpcMainImpl.emit (node:domain:489:12)
    at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:82058)
    at EventEmitter.emit (node:events:513:28)
    at EventEmitter.emit (node:domain:489:12) {
  cause: {
    stack: 'Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.\n' +
      '    at /usr/share/mailspring/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:465:71\n' +
      '    at IpcMainImpl.<anonymous> (/usr/share/mailspring/resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:323:27)\n' +
      '    at IpcMainImpl.emit (node:events:513:28)\n' +
      '    at IpcMainImpl.emit (node:domain:489:12)\n' +
      '    at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:82058)\n' +
      '    at EventEmitter.emit (node:events:513:28)\n' +
      '    at EventEmitter.emit (node:domain:489:12)',
    message: 'Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.'
  }
} { pluginIds: [] }
(node:182148) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `mailspring --trace-deprecation ...` to show where the warning was created)

[ia@sun ~] % mailspring --trace-warnings                            [0][14:37:39]
[188420:1122/143741.425991:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[188420:1122/143741.426088:ERROR:select_file_dialog_linux_portal.cc(274)] Failed to read portal version property
Running database migrations
App load time: 278ms

{"error":null}
Manual update check (updates.getmailspring.com/check/linux/x64/1.13.1-59cb1b1d/anonymous/stable) returned 204
Error: Could not call remote method 'encryptString'. Check that the method signature is correct. Underlying error: Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.Underlying stack: Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.
    at /usr/lib/mailspring/app.asar/node_modules/@electron/remote/dist/src/main/server.js:465:71
    at IpcMainImpl.<anonymous> (/usr/lib/mailspring/app.asar/node_modules/@electron/remote/dist/src/main/server.js:323:27)
    at IpcMainImpl.emit (node:events:513:28)
    at IpcMainImpl.emit (node:domain:489:12)
    at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:82104)
    at EventEmitter.emit (node:events:513:28)
    at EventEmitter.emit (node:domain:489:12)

    at /usr/lib/mailspring/app.asar/node_modules/@electron/remote/dist/src/main/server.js:468:25
    at IpcMainImpl.<anonymous> (/usr/lib/mailspring/app.asar/node_modules/@electron/remote/dist/src/main/server.js:323:27)
    at IpcMainImpl.emit (node:events:513:28)
    at IpcMainImpl.emit (node:domain:489:12)
    at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:82104)
    at EventEmitter.emit (node:events:513:28)
    at EventEmitter.emit (node:domain:489:12) {
  cause: {
    stack: 'Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.\n' +
      '    at /usr/lib/mailspring/app.asar/node_modules/@electron/remote/dist/src/main/server.js:465:71\n' +
      '    at IpcMainImpl.<anonymous> (/usr/lib/mailspring/app.asar/node_modules/@electron/remote/dist/src/main/server.js:323:27)\n' +
      '    at IpcMainImpl.emit (node:events:513:28)\n' +
      '    at IpcMainImpl.emit (node:domain:489:12)\n' +
      '    at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:82104)\n' +
      '    at EventEmitter.emit (node:events:513:28)\n' +
      '    at EventEmitter.emit (node:domain:489:12)',
    message: 'Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.'
  }
} { pluginIds: [] }
(node:188420) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `electron --trace-deprecation ...` to show where the warning was created)

@helionmelion Please try to run mailspring --password-store="gnome-libsecret".
This is a different error message than what was affecting the snap environment. Which desktop environment are you using. I’d assume its an environment that electron does not detect itself properly.

thank you yes indeed I was able to start mailspring with:

mailspring --password-store="gnome-libsecret"

closing and starting again without any parameter, it starts nominally, but will crash when trying to store the password (on electron I think). Im using i3wm and archlinux 6.6.2.

1 Like

You will need to add this to your Desktopfile to make it persistently work. See: Password Management Error - #2 by system

2 Likes

You can also force it with snap run --shell mailspring -c "mailspring --no-sandbox --password-store=gnome-libsecret"

1 Like

I am on Arch Linux and unfortunately, after trying everything from above, i am still getting the password storage error for both the snap and the arch package.

Even though …

mailspring --password-store=“gnome-libsecret” &

… runs the application, the changes to the password storage are not permanent. And changing the mailspring.desktop file did not solve anything, at least for me.

For those who would like to downgrade the package on Arch or derivatives to the working version 1.11 , this command helped me:

pacman -U file:///var/cache/pacman/pkg/mailspring-1.11.0-1-x86_64.pkg.tar.zst

This requires adding

IgnorePkg = mailspring

to the etc/pacman.conf

1 Like

I have the same issue as @rainer2208. Details:

Mailspring 1.13.1 installed via Arch Linux AUR, regardless of whether it is run as mailspring or mailspring --password-store=“gnome-libsecret”, has the same result. It starts up with a popup saying that the keyring could not be read. Upon loading the application, none of my accounts are available and I get the same message again if I try to log in to my Mailspring account. Logs:

[91035:1130/181116.685555:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[91035:1130/181116.685595:ERROR:select_file_dialog_linux_portal.cc(274)] Failed to read portal version property
Running database migrations
App load time: 208ms

{"error":null}
libva error: vaGetDriverNames() failed with unknown libva error
Manual update check (updates.getmailspring.com/check/linux/x64/1.13.1-59cb1b1d/34720345-3659-40ba-8f3a-b0e5d86af309/stable) returned 204

Downgrading to 1.11.0-1 has the application working again for me. The errors about FileChooser are still present but doesn’t really affect anything.

  • Manjaro 23.1.0
  • i3 wm 4.23-1
  • gnome-keyring 1:42.1-3
  • xdg-desktop-portal 1.18.1-1
  • xdg-desktop-portal-gtk 1.15.1-1

XDG desktop is properly configured for GTK to be be fallback including specifically for i3 wm, not sure why the FileChooser errors are present.

For anyone using mailspring with flatpak, the method is very similar you just need to add --password-store=“gnome-libsecret” to your desktop file. To find where your desktop file is, you might want to do something like:

find ~/.local/share/applications/ /usr/share/applications/ /var/lib/flatpak/exports/share/applications/ ~/.local/share/flatpak/exports/share/applications/ -name '*mailspring*.desktop'

and then replace:

Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=start-mailspring --file-forwarding com.getmailspring.Mailspring @@u %U @@

To:

Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=start-mailspring --file-forwarding com.getmailspring.Mailspring --password-store="gnome-libsecret" @@u %U @@

I had to reconnect all my accounts and my mailspring id but after that it work even after restart.

1 Like

I take this back. After restart I had the same issue. “Your mailspring Id could not be loaded from your keychain…” This fix is not working.

1 Like

Here to confirm what @skylite21 mentioned, the supposed fix does not work.
Adding the --password-store="gnome-libsecret" parameter doesn’t do anything for me.

I made sure to also change the Flatpak desktop files under:

USERNAME@pop-os:~$ locate com.getmailspring.Mailspring | grep .desktop

Which gave me the following results:

  • /home/USERNAME/.local/share/flatpak/app/com.getmailspring.Mailspring/x86_64/stable/e4e099bd840a9cacc61cc0bf49ee6df1035e78b091e3941274091ccee06cdd0a/export/share/applications/com.getmailspring.Mailspring.desktop

  • /home/USERNAME/.local/share/flatpak/app/com.getmailspring.Mailspring/x86_64/stable/e4e099bd840a9cacc61cc0bf49ee6df1035e78b091e3941274091ccee06cdd0a/files/share/applications/com.getmailspring.Mailspring.desktop

  • /home/USERNAME/.local/share/flatpak/exports/share/applications/com.getmailspring.Mailspring.desktop

But sadly, it does not seem to fix it. I checked under the “Passwords and Keys” app to make sure that Mailspring actually writes an entry into the keystore, and it does.
All other apps can read and write to/from the keystore so this is an issue specific to Mailspring.

To fix this, I did the following:

  1. list all Flatpak versions of the Mailspring app available:
flatpak remote-info --log flathub com.getmailspring.Mailspring
  1. 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
  1. Clean up the old Flatpak files (make sure Mailspring is closed!)
cd ~/.var/app/
rm -rf com.getmailspring.Mailspring/
  1. 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:

  1. List all the Flatpak apps
flatpak list
  1. Copy the name of the Flatpak ID, in this case
com.getmailspring.Mailspring
  1. 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.

  1. 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.

  1. 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.

I just realized that my problem was caused by the fact that after restart I run mailspring from an autostart script of mine which did not use the --password-store=“gnome-libsecret” flag. When I corrected that autostart script then everything worked again.

1 Like