Accounts get disconnected after closing Mailspring

Hey folks! Thanks for reporting this and attaching the logs, it looks like there may be a few separate things going on here -

  • The “database is locked” issues seem to be specific to the new releases. We shipped 1.9.1 which added SQLite’s HAVE_USLEEP flag to reduce lock contention, but it looks like we might still have an issue there. @Phylu any chance you’re running from source and need to re-run npm install to get the rebuilt version of SQLite? Will see if I can reproduce today.

  • @kikoulol4485 , it looks like Mailspring is actually failing to log in to our backend services - any chance you deleted your Mailspring ID but are still logged in under Preferences > Subscription in the app? If you want to opt out of the Mailspring ID, you’ll need to click “Log Out” on that tab. If you didn’t mean to do any of the above, logging out and logging back in on Preferences > Subscription should fix it!

  • @Ruan-Kuypers - it looks like Mailspring is actually failing to log in to that account you pictured in the logs - we’re getting an authentication error from your IMAP service. I don’t think we’ve seen that before - it seems like Mailspring must be unable to write to your Windows Credential Vault or it’s being reset repeatedly. Can you try opening Credential Manager from the task bar search field and then looking for “Mailspring/Mailspring Keys” under Generic Credentials? If it’s not there that will help narrow down the problem!

Thanks for the heads-up !
I didn’t deleted my mailspring account. I’ve switch to snap package, and then the issue disappeared. So you must be right, mailspring ID related.

@bengotow - Hey! Yes, I have “Mailspring/Mailspring Keys” under my Generic Credentials. What now?

Screenshot_1

The “database is locked” issue happened on my installation from the .deb package. But somehow, it disappeared by itself. For a few days, I have no more problems here.

@bengotow Just an update, Yesterday I opened Mailspring and all my accounts loaded without any problems. This morning I opened Mailspring and the errors still occur. :grimacing:

I recently started having this same issue when I added a 4th email account. Every time I reopen Mailspring, it fails to connect and requires me to re-enter my IMAP/SMTP passwords (they seem to not be saved). I am on windows, and I do see “Mailspring/Mailspring Keys” in Windows Credential Manager, but it has not been modified since 2021-02-02 (well before I added my 4th account). I have not deleted my Mailspring ID or anything like that.

Mailspring Version: 1.9.1-30ef802f
Platform: win32
Account State: sync_error
Account Provider: imap
IMAP Server: mail.gandi.net
SMTP Server: mail.gandi.net
--------------------------------------------
3808 [2021-05-06 12:57:19.001] [background] [info] syncFolderChangesViaCondstore - Drafts: modseq 5 to 5, uidnext 2 to 2
3808 [2021-05-06 12:57:19.186] [background] [info] syncFolderChangesViaCondstore - Archive: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:57:19.369] [background] [info] syncFolderChangesViaCondstore - Deleted Messages: modseq 2 to 2, uidnext 2 to 2
3808 [2021-05-06 12:57:19.554] [background] [info] syncFolderChangesViaCondstore - Spam: modseq 7 to 7, uidnext 3 to 3
3808 [2021-05-06 12:57:19.773] [background] [info] syncFolderChangesViaCondstore - Trash: modseq 5 to 5, uidnext 5 to 5
3808 [2021-05-06 12:57:19.965] [background] [info] syncFolderChangesViaCondstore - Trash/HEY: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:57:20.150] [background] [info] syncFolderChangesViaCondstore - Mailspring: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:57:20.339] [background] [info] syncFolderChangesViaCondstore - Mailspring/Snoozed: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:57:20.339] [background] [info] Sync loop deleting unlinked messages with phase 2.
3808 [2021-05-06 12:57:20.339] [background] [info] Sync loop complete.
3808 [2021-05-06 12:59:03.944] [foreground] [info] Idle exited with code 0
3808 [2021-05-06 12:59:04.125] [foreground] [info] syncFolderChangesViaCondstore - INBOX: modseq 24 to 24, uidnext 10 to 10
3808 [2021-05-06 12:59:04.126] [foreground] [info] Idling on folder INBOX
3808 [2021-05-06 12:59:20.340] [background] [info] Syncing folder list...
3808 [2021-05-06 12:59:20.731] [background] [info] syncFolderChangesViaCondstore - INBOX: modseq 24 to 24, uidnext 10 to 10
3808 [2021-05-06 12:59:20.915] [background] [info] syncFolderChangesViaCondstore - Sent: modseq 3 to 3, uidnext 2 to 2
3808 [2021-05-06 12:59:21.097] [background] [info] syncFolderChangesViaCondstore - Drafts: modseq 5 to 5, uidnext 2 to 2
3808 [2021-05-06 12:59:21.282] [background] [info] syncFolderChangesViaCondstore - Archive: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:59:21.476] [background] [info] syncFolderChangesViaCondstore - Deleted Messages: modseq 2 to 2, uidnext 2 to 2
3808 [2021-05-06 12:59:21.662] [background] [info] syncFolderChangesViaCondstore - Spam: modseq 7 to 7, uidnext 3 to 3
3808 [2021-05-06 12:59:21.915] [background] [info] syncFolderChangesViaCondstore - Trash: modseq 5 to 5, uidnext 5 to 5
3808 [2021-05-06 12:59:22.148] [background] [info] syncFolderChangesViaCondstore - Trash/HEY: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:59:22.331] [background] [info] syncFolderChangesViaCondstore - Mailspring: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:59:22.511] [background] [info] syncFolderChangesViaCondstore - Mailspring/Snoozed: modseq 1 to 1, uidnext 1 to 1
3808 [2021-05-06 12:59:22.512] [background] [info] Sync loop deleting unlinked messages with phase 1.
3808 [2021-05-06 12:59:22.512] [background] [info] Sync loop complete.

@Phylu So your accounts are no longer getting disconnected? What did you do to resolve it?

@bengotow I’ve deleted the credentials and completely deleted Mailspring using CC cleaner. I used a fresh installation and the problem still persists. Even tested it using only 3 accounts instead of 4.

@Ruan-Kuypers I didn’t change anything. So unfortunately, I can’t help you here.

If it helps, I have three accounts managed by Mailspring 1.9.1 and two of them consistently get sync errors. As far as I can tell, it isn’t happening upon closing Mailspring, but I don’t exactly know the cause. Reconnecting works fine, but only lasts about a day.

The strange thing is, I’m not receiving errors in the feed. The two accounts are both GMail. Here’s an example of the feed:

Mailspring Version: 1.9.1-30ef802f
Platform: win32
Account State: sync_error
Account Provider: gmail
IMAP Server: imap.gmail.com
SMTP Server: smtp.gmail.com
--------------------------------------------
10100 [2021-05-17 19:31:28.826] [background] [info] -- UID (41210 to 41211)
10100 [2021-05-17 19:31:28.827] [background] [info] - Updating message pA6axoDsDvB4Heb6u46hL399Qbj5eQ15XnYZQUZq7
10100 [2021-05-17 19:31:28.827] [background] [info] -- UID (92993 to 41208)
10100 [2021-05-17 19:31:28.827] [background] [info] -- FolderID (qF5dNtVUZgC1qbQ7CkcFo76pxRqmknNqfDu5qPoDz to gMnPZhe4RbwoWThgyxaCJbm8S2GiSx8dbDnCecxcq)
10100 [2021-05-17 19:31:28.829] [background] [info] - Updating message 8Hdnu3W1rFpYmEzGMBGs8k864G2fLTuGoEZWQy3rX
10100 [2021-05-17 19:31:28.829] [background] [info] -- UID (92983 to 41202)
10100 [2021-05-17 19:31:28.829] [background] [info] -- FolderID (qF5dNtVUZgC1qbQ7CkcFo76pxRqmknNqfDu5qPoDz to gMnPZhe4RbwoWThgyxaCJbm8S2GiSx8dbDnCecxcq)
10100 [2021-05-17 19:31:28.829] [background] [info] -- XGMLabels (["\\Important"] to [])
10100 [2021-05-17 19:31:28.830] [background] [info] - Updating message iYPzuEVE1iE3UkXZyU42KthTTHarapBVw4HTovjL2
10100 [2021-05-17 19:31:28.830] [background] [info] -- UID (92973 to 41196)
10100 [2021-05-17 19:31:28.830] [background] [info] -- FolderID (qF5dNtVUZgC1qbQ7CkcFo76pxRqmknNqfDu5qPoDz to gMnPZhe4RbwoWThgyxaCJbm8S2GiSx8dbDnCecxcq)
10100 [2021-05-17 19:31:28.832] [background] [info] - Updating message hpC9y9VGmCBej8WB1hvMQDGNTckcxRcNey3bH3pd4
10100 [2021-05-17 19:31:28.832] [background] [info] -- UID (92966 to 41192)
10100 [2021-05-17 19:31:28.832] [background] [info] -- FolderID (qF5dNtVUZgC1qbQ7CkcFo76pxRqmknNqfDu5qPoDz to gMnPZhe4RbwoWThgyxaCJbm8S2GiSx8dbDnCecxcq)
10100 [2021-05-17 19:31:28.833] [background] [info] - Updating message KN7sSQx6sJbRqvSz44ZSbH2q6z79KvUdpMnJGeCuZ
10100 [2021-05-17 19:31:28.833] [background] [info] -- UID (92967 to 41191)
10100 [2021-05-17 19:31:28.833] [background] [info] -- FolderID (qF5dNtVUZgC1qbQ7CkcFo76pxRqmknNqfDu5qPoDz to gMnPZhe4RbwoWThgyxaCJbm8S2GiSx8dbDnCecxcq)
10100 [2021-05-17 19:31:28.835] [background] [info] - Updating message N9Az1fB84VHGfvmKbHGAjCkmmfPNK6zo4L9yyVx8p
10100 [2021-05-17 19:31:28.835] [background] [info] -- UID (92960 to 41183)
10100 [2021-05-17 19:31:28.835] [background] [info] -- FolderID (qF5dNtVUZgC1qbQ7CkcFo76pxRqmknNqfDu5qPoDz to gMnPZhe4RbwoWThgyxaCJbm8S2GiSx8dbDnCecxcq)
10100 [2021-05-17 19:31:28.945] [background] [warning] [SLOW] Transaction=saveFolderStatus > 80ms (89ms, 89 waiting to aquire)
10100 [2021-05-17 19:31:29.056] [background] [info] syncFolderUIDRange for [Gmail]/Spam, UIDs: 1 - 0, Heavy: false
10100 [2021-05-17 19:31:29.281] [background] [info] - remote=0, local=0
10100 [2021-05-17 19:31:29.303] [background] [info] Sync loop deleting unlinked messages with phase 2.
10100 [2021-05-17 19:31:29.304] [background] [info] Sync loop complete.
10100 [2021-05-17 19:31:43.229] [metadata] [info] Metadata delta stream closed.
10100 [2021-05-17 19:31:43.230] [metadata] [info] Metadata delta stream starting...

Any resolution available for above issue or should we give up on mailspring, obviously can’t continue with this issue and authorizing accounts every second day. Pls guide

1 Like

I’ve given up on it, went back to Outlook. It’s a great email client but having to log into all my email accounts every time I close the client is a pain in the but.

Hopefully, someone in the community finds a way to fix it :upside_down_face:

1 Like

I uninstalled and installed ver 1.7.8 and added accounts, then updated mailspring to 1.91 and it works

again same issue, accounts disconnected

cancel subscription, come back to thunderbird. It’s ugly but it works.

I also have this problem but only in my Windows 10 installation. Almost every time I open Mailspring I have to reauthenticate and I only have two accounts. In my Ubuntu 20.04 installation everything works like a charm.

Install ver 17.8 and add all accounts, close the app. it’ll get updated to latest version with all acounts working

It’s months and months of white screens of death, credentials dissapearing, not to mention the years of syncing issues… I just give up, I canceled my subscription and now I’m finding another email client. It’s just impossible to deal with the lack of professionalism of this company.

To the developer(s): if you can’t support your software, even with people paying, just kill it. Stop using people.

2 Likes

I am also experiencing this issue with Gmail conneced accounts… I can make it work for 1 session but after that it refuses to work.

Yeah, i’ve also this bug, i have 4 account connected with SMTP, and 2 work properly, and 2 disconnect every day.

I’m experiencing the same issue with Gmail and Yahoo email account. I have to reconnect Mailspring to Gmail and Yahoo after having closed and reponed Mailspring