Mailspring keeps disconnecting from gmail account


Mailspring keeps disconnecting from Gmail account forcing me to always reconnect. Why is it happening? Is it a bug?


Syncing problem

Email Provider



  • OS and Version: <!-- Windows 10
    • Installation Method: <!-- mailspring website
  • Mailspring Version: <!--

Same issue here, but only with one of my gmail accounts. Consistently disconnecting one account after over a year of rock solid performance.

Same issue for me, thus what brought me here, except I’m using Fedora Linux (KDE Plasma) and I can’t figure why this is happening. I don’t know that it’s disrupting my work. If anyone has a solution please share it.

Thanks and God bless,

Hey guys, was browsing these Gmail sync problem topics because of the same problem. I switched to other email clients because of it, eventhough I’m paying for mailspring’s online services. But nothing works as nice for me like Mailspring. Thunderbird is too slow, Geary doesn’t give a unified inbox, Evolution just, not my thing. I even set up my gmails to “waterfall” into each other so I could see them all from 1 inbox on the web, but that wasn’t what works well for me, managing all the aliases like that. And the what about my Roundcube servers? So, the way I got it working for me is explained below: (P.S. thank for reading my blog, like and subscribe.)

  1. wipe all the mailspring data (sudo apt purge mailspring, and also make sure it gets the ~/.config/Mailspring directory)
  2. secure your gmails with 2-factor (authenticator, SMS, phone prompt etc.) if you haven’t already (you can’t make an app password unless you have 2-factor enabled)
  3. make an app password for mailspring
  4. set up the accounts as imap
  5. yes, Mailspring, for the 10th time, I really really want to setup gmail as an imap!
  6. check your folders in Mailspring settings. Several of my accounts show (None) for the Archive folder, and others show ‘Archive’ so not sure, but things are in fact working as I expect.

If it’s any added benefit, it seems faster now that when I used the “proper” Oauth login.

Creating the app passwords and 2FA was a bit of a hassle, but overall it’s less time than it took me to configure Thunderbird and the waaaaaaaaaaaaaiiiiiit for it to process emails.


I had a similar problem, but out of the 3 gmail accounts I use, only 2 give that problem. I noticed that 2 factor authentication was on in the account without problems, and tried that.

It doesn’t seem to have worked, so I’ll try this when I get the message again.

This worked. Thank you. Unfortunately, IMAP does not display Gmail’s inbox labels.

Well, I tried making the imap and deleting the whole app and it seems to keeep being an isue, as I just received the same problem again in all the accounts (In the ones I had with imap, the one I left without imap, and even in the one with office 365, which suppossedly didn’t have that problem). Strangely, the first account I connected still does not give me any kind of error, weird…

well, It seems it’s reconnecting time every so often…

Now IMAP is having the same issue that OAuth did previously.

1 Like

Hi, same problem here. I attach the error message for completeness.
I will also try to remove and reinstall everything during the weekend.

Mailspring Version: 1.10.8-8ea2a61f
Platform: linux
Account State: sync_error
Account Provider: gmail
IMAP Server:
SMTP Server:
**...warning messages about private emails...**
9970 [2023-03-28 09:30:16.077] [background] [info] syncFolderUIDRange for [Gmail]/Tutti i messaggi, UIDs: 194419 - 196072, Heavy: false
9970 [2023-03-28 09:30:16.276] [foreground] [info] [local-42ee1479-3d93] Running EventRSVPTask performRemote:
9970 [2023-03-28 09:30:16.277] [foreground] [critical] 
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null

10020 [2023-03-28 09:30:16.844] [main] [info] Identity created at 1644062718 - using ID Schema 1
10020 [2023-03-28 09:30:16.845] [main] [info] ------------- Starting Sync ( ---------------
10020 [2023-03-28 09:30:16.852] [metadata] [info] Metadata delta stream starting...
10020 [2023-03-28 09:30:18.849] [background] [info] Fetching XOAuth2 access token (gmail) for 308ff103
10020 [2023-03-28 09:30:18.953] [background] [info] Marking all folders as `busy`
10020 [2023-03-28 09:30:18.954] [background] [info] Syncing folder list...
10020 [2023-03-28 09:30:20.623] [background] [info] Syncing folder list...
10020 [2023-03-28 09:30:21.001] [background] [info] syncFolderUIDRange for [Gmail]/Tutti i messaggi, UIDs: 196067 - 196072, Heavy: true
10020 [2023-03-28 09:30:21.368] [background] [info] - [Gmail]/Tutti i messaggi: remote=4, local=4, remoteUID=mH7CJgpnLchqUC6uNEorzrD8JoKGBDWqZjQJ3aw2
**...warning messages about private emails...**
10020 [2023-03-28 09:30:22.015] [background] [info] syncFolderUIDRange for [Gmail]/Tutti i messaggi, UIDs: 194419 - 196072, Heavy: false
10020 [2023-03-28 09:30:22.183] [foreground] [info] [local-42ee1479-3d93] Running EventRSVPTask performRemote:
10020 [2023-03-28 09:30:22.183] [foreground] [critical] 
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null

I already tried that and it didn’t work for me, tell us what you did if it works!!

Hi, I actually solved using the “Rebuild Cache…” button after doing the “Re-authenticate…”.
Everything is working now for me.

Yeah, this happens every now and then after a failure in mail send…

I suppose it wouldn’t be too hard to handle though.

Happened to me every now and then too, becoming way too frequent this year (at least 1 a month or 1 every 2 weeks), now I can’t even use mailspring anymore starting from this afternoon. It just won’t sync anymore with any of my 3 gmail accounts, resyncing doesn’t do anything, reinstalling doesn’t do anything, It would be able to send the test emails but that’s as far as it can go, no email is ever loaded no matter how many time I try syncing.

Also, it doesn’t happen on any other email client so far and I’ve tried quite a few this afternoon so the issue is with google and mailspring, please, find a fix for this, I really like this app but I can’t realistically go without email not even for a day and if I switch, it’s unlikely I would ever return back…

1 Like

This issue now happens anytime I close and reopen the Mailspring app. With three Gmail accounts, it’s pretty much unusable.

The lack of developer engagement on this topic is not confidence inspiring.

I use Mailbird for my work and main personal accounts and Mailspring for my other personal accounts. This is because both have Gmail shortcuts.

Any suggestions for another Windows mail client that offers Gmail shortcuts?

3 weeks later and there is no sign of anything in response to this, and scanning the forums, there seems to be no activities from the dev at all so I think the project is dead.

It have been overall a good experience when things were working, farawell Mailspring!