Mailspring keeps disconnecting from gmail account

Problem

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

Context

Syncing problem

Email Provider

Gmail

Setup

1.10.7.5008

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

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.

5 Likes

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.

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: imap.gmail.com
SMTP Server: smtp.gmail.com
--------------------------------------------
**...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 (MYEMAIL@gmail.com) ---------------
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
***