"Syncing your mailbox" takes forever (gmail & self hosted imap)

Description

“Syncing your mailbox” appears after archiving message on GMail. This message also never get archived.

To Reproduce…

Steps to reproduce the behavior:

  1. Add GMail account
  2. Archive message
  3. Done

Expected Behavior

Archiving to happen within few seconds, few minutes, at least.

Screenshots

Screenshot from 2021-11-21 13-29-23|230x125

Setup

  • OS and Version: Linux Mint 20.2 (Ubuntu 20.04)
    • Installation Method: Snap Store
  • Mailspring Version: 1.9.2-6e14dad1

Additional Context

That’s quite a long lasting issue (~1 month); I waited and hoped it will be fixed somehow, but it’s not.
Other mail clients (on my mac & ios) works just fine with this gmail account.

Any additional information shall be required - please, let me know!

Have you tried using the deb version of Mailspring instead of the snap? I’ve had problems with the snap, and the deb seems a lot more reliable.

image

Please check the error and let me know what to do.

What’s your problem and your setup? (Just posting an image of a possibly-temporary issue on someone else’s thread isn’t going to help us help you.)

I have 3 gmail account and 1 office 365 account. I dont know which account is creating problem. Could you guide me with the same please.

First steps: when does this message appear? How long does it persist if you click “Try now”? What is your setup (operating system, Mailspring version, installation method)?

You should be able to see more details if you click the sync message - it’s a bit hard to give more-detailed instructions because I can’t see that myself at the moment!

When i click try now, the tab disappears for a while (say a minute or so) and pops back.

Operating System - Windows 11
Mailspring version -

image

image

Installation method - Downloaded installation file from mailspring website.

Finally I was able to get the error details:

Mailspring Version: 1.9.2-6e14dad1
Platform: win32
Account State: invalid
Account Provider: office365
IMAP Server: outlook.office365.com
SMTP Server: smtp.office365.com


5244 [2021-11-22 20:16:11.294] [main] [info] Identity created at 1616934814 - using ID Schema 1
5244 [2021-11-22 20:16:11.294] [main] [info] ------------- Starting Sync (jinesh.b@pierianservices.com) ---------------
5244 [2021-11-22 20:16:11.298] [metadata] [info] Metadata delta stream starting…
5244 [2021-11-22 20:16:15.308] [background] [info] Fetching XOAuth2 access token (office365) for 911e0b20
5244 [2021-11-22 20:16:16.619] [background] [critical]


*** Mailspring Sync
*** An exception occurred during program execution:
*** {“debuginfo”:"Sign in to your account RETURNED {“error”:“invalid_grant”,“error_description”:“AADSTS700084: The refresh token was issued to a single page app (SPA), and therefore has a fixed, limited lifetime of 1.00:00:00, which cannot be extended. It is now expired and a new sign in request must be sent by the SPA to the sign in page. The token was issued on 2021-11-21T13:44:39.2931042+00:00.\r\nTrace ID: e92f085e-02b4-4fbc-b148-383821014f00\r\nCorrelation ID: 8da6254f-a915-4165-9858-a1f024bdf243\r\nTimestamp: 2021-11-22 14:46:16Z”,“error_codes”:[700084],“timestamp”:“2021-11-22 14:46:16Z”,“trace_id”:“e92f085e-02b4-4fbc-b148-383821014f00”,“correlation_id”:“8da6254f-a915-4165-9858-a1f024bdf243”,“error_uri”:“https://login.microsoftonline.com/error?code=700084"}",“key”:"Invalid Response Code: 400”,“retryable”:false,“what”:“Unknown exception”}


13716 [2021-11-22 20:16:17.181] [main] [info] Identity created at 1616934814 - using ID Schema 1
13716 [2021-11-22 20:16:17.182] [main] [info] ------------- Starting Sync (jinesh.b@pierianservices.com) ---------------
13716 [2021-11-22 20:16:17.187] [metadata] [info] Metadata delta stream starting…
13716 [2021-11-22 20:16:21.206] [background] [info] Fetching XOAuth2 access token (office365) for 911e0b20
13716 [2021-11-22 20:16:22.725] [background] [critical]


*** Mailspring Sync
*** An exception occurred during program execution:
*** {“debuginfo”:"Sign in to your account RETURNED {“error”:“invalid_grant”,“error_description”:“AADSTS700084: The refresh token was issued to a single page app (SPA), and therefore has a fixed, limited lifetime of 1.00:00:00, which cannot be extended. It is now expired and a new sign in request must be sent by the SPA to the sign in page. The token was issued on 2021-11-21T13:44:39.2931042+00:00.\r\nTrace ID: 543f121b-a2df-4c4c-a30e-6552eab44600\r\nCorrelation ID: 995844c3-d00a-44ad-bac3-73106a0c27de\r\nTimestamp: 2021-11-22 14:46:22Z”,“error_codes”:[700084],“timestamp”:“2021-11-22 14:46:22Z”,“trace_id”:“543f121b-a2df-4c4c-a30e-6552eab44600”,“correlation_id”:“995844c3-d00a-44ad-bac3-73106a0c27de”,“error_uri”:“https://login.microsoftonline.com/error?code=700084"}",“key”:"Invalid Response Code: 400”,“retryable”:false,“what”:“Unknown exception”}


So, it says the authorisation token has expired. Have you tried re-authenticating the account? (Probably via the “Update connection settings” option in Settings.) Basically, though, it sounds like Office365 is setting an expiry on its token that’s annoyingly short for you. And Mailspring can’t fix that - although it would help if it recognised that the token had expired and offered to refresh it!

Thanks for the prompt responce and apologies for the delay in getting back - for some reason I didn’t get mail notification.

I might have, as it’s my second attempt to use Mailspring. But am I right, that I won’t be getting auto-updates from the deb package? If so, I would like to avoid using it - manual app updates is an extra hassle, I’m trying to avoid.

That’s right - if you install the deb version, you won’t get automatic updates (although you will get notifications). Given that Mailspring is only updated infrequently anyway, the reduced hassle in actually using it will more than outweigh the occasional irritation of applying updates.

I see that the authentication factor used here is OAuthO365. I am not facing any issue with office 365 on mailbird app. Could you look into this and guide something.

This is really frustrating and not sure what to do. Please guide and help me resolve this.

I’m not a developer of this app Jbhagdev (just another user), don’t use Office365 and am not in a position to help like that - all I can do is suggest things that occur to me. I can suggest searching these forums for similar issues other people have had with Office365, and to ask your mail host if there’s a configuration that’s missing in your Mailspring setup.

(Also, note that your problem appears to be entirely unrelated to the one “alexander-potemkin” asked about in the original post. It’s impolite to hijack someone else’s thread - in future, please post your own query so it’s clear what’s going on.)

Noted. Will take care. Thanks for the help.

Thank you. It too me some time to do so and I’m sorry to say, that *.deb version have the same issue.
How could it be that app’s logic would work differently, depending from the package method?

Also I had to reconfigure my mail accounts after I removed snap version and after install *.deb version, which is a pitty.

Yes, unfortunately one of the side-effects of snaps is that they encapsulate everything inside themselves, even your settings. (Which means if you ever uninstall and re-install a snap, you lose everything anyway.)

I think it’s not that the app’s logic is different (as you say, it’s the same code) but the context in which it’s running. There are certainly issues with the snaps (missing text in emails, sync errors, that sort of thing), which is why I suggest people try it. Unfortunately, some sync errors are down to how the server and Mailspring communicate (or don’t). But it’s not a general GMail issue - most of us have no issues, which is why it’s worth checking other options.

Ogh… I thought that snaps are more like MacOS’x .app bundles, it’s sad they decided otherwise…

Ok, I see - thank you for your assistance and prompt responses, I appreciate it!

I am also having this issue still. On Debian using the latest deb. “Syncing your mailbox…”. I have 1 Gmail and 3 Google Apps accounts.

I’m having the same issue. :frowning:
Windows 10.


1 Like

Upvote this post: