Gmail does not synchronize anymore

Description

Mailspring stopped synchronizing with Gmail.

To Reproduce…

Steps to reproduce the behavior:

  1. Setup Gmail account
  2. Wait for synchronization

Expected Behavior

Mails should be synchronized again

Screenshots

Setup

  • OS and Version: Ubuntu Linux 22.04
    • Installation Method: snapcraft
  • Mailspring Version: 1.10.8-8ea2a61f

Additional Context

Error logs

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
--------------------------------------------
22445 [2023-06-15 20:20:06.681] [background] [info] Fetching XOAuth2 access token (gmail) for yyyy
22445 [2023-06-15 20:20:06.853] [background] [info] Marking all folders as `busy`
22445 [2023-06-15 20:20:06.854] [background] [info] Syncing folder list...
22445 [2023-06-15 20:20:08.097] [background] [info] Syncing folder list...
22445 [2023-06-15 20:20:08.581] [background] [info] syncFolderUIDRange for [Gmail]/All Mail, UIDs: 25529 - 30529, Heavy: false
22445 [2023-06-15 20:20:10.400] [foreground] [info] [local-4019a868-563e] Running EventRSVPTask performRemote:
22445 [2023-06-15 20:20:10.400] [foreground] [critical] 
***
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null
***

22473 [2023-06-15 20:20:10.528] [main] [info] Identity created at 1508582397 - using ID Schema 0
22473 [2023-06-15 20:20:10.529] [main] [info] ------------- Starting Sync (xxx@gmail.com) ---------------
22473 [2023-06-15 20:20:10.532] [metadata] [info] Metadata delta stream starting...
22473 [2023-06-15 20:20:13.532] [background] [info] Fetching XOAuth2 access token (gmail) for yyyy
22473 [2023-06-15 20:20:13.716] [background] [info] Marking all folders as `busy`
22473 [2023-06-15 20:20:13.716] [background] [info] Syncing folder list...
22473 [2023-06-15 20:20:15.072] [background] [info] Syncing folder list...
22473 [2023-06-15 20:20:15.648] [background] [info] syncFolderUIDRange for [Gmail]/All Mail, UIDs: 25529 - 30529, Heavy: false
22473 [2023-06-15 20:20:17.567] [foreground] [info] [local-4019a868-563e] Running EventRSVPTask performRemote:
22473 [2023-06-15 20:20:17.567] [foreground] [critical] 
***
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null
***

22506 [2023-06-15 20:20:17.685] [main] [info] Identity created at 1508582397 - using ID Schema 0
22506 [2023-06-15 20:20:17.685] [main] [info] ------------- Starting Sync (xxx@gmail.com) ---------------
22506 [2023-06-15 20:20:17.689] [metadata] [info] Metadata delta stream starting...
22506 [2023-06-15 20:20:20.688] [background] [info] Fetching XOAuth2 access token (gmail) for yyyy
22506 [2023-06-15 20:20:20.863] [background] [info] Marking all folders as `busy`
22506 [2023-06-15 20:20:20.863] [background] [info] Syncing folder list...
22506 [2023-06-15 20:20:22.769] [background] [info] Syncing folder list...
22506 [2023-06-15 20:20:23.230] [background] [info] syncFolderUIDRange for [Gmail]/All Mail, UIDs: 25529 - 30529, Heavy: false
22506 [2023-06-15 20:20:24.494] [foreground] [info] [local-4019a868-563e] Running EventRSVPTask performRemote:
22506 [2023-06-15 20:20:24.495] [foreground] [critical] 
***
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null
***

I just started getting this error yesterday. Interesting thing is I have 3 gmail accounts, and 2 of them are syncing fine, but one doesn’t.

I’ve tried reconnecting a few times now, and it keeps doing this. I’m guessing because of the JSON error in this log.

image

Mailspring Version: 1.11.0-6193b33c
Platform: linux
Account State: sync_error
Account Provider: gmail
IMAP Server: imap.gmail.com
SMTP Server: smtp.gmail.com
--------------------------------------------
669549 [2023-11-07 07:55:26.296] [background] [info] Syncing folder list...
669549 [2023-11-07 07:55:27.403] [background] [info] Syncing folder list...
669549 [2023-11-07 07:55:28.183] [background] [info] Sync loop deleting unlinked messages with phase 2.
669549 [2023-11-07 07:55:28.194] [background] [info] Sync loop complete.
669549 [2023-11-07 07:55:28.902] [foreground] [info] [local-340c5302-89cf] Running EventRSVPTask performRemote:
669549 [2023-11-07 07:55:28.902] [foreground] [critical] 
***
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null
***

669581 [2023-11-07 07:55:28.987] [main] [info] Identity created at 1699372528 - using ID Schema 1
669581 [2023-11-07 07:55:28.988] [main] [info] ------------- Starting Sync (jeremywoertink@gmail.com) ---------------
669581 [2023-11-07 07:55:28.990] [metadata] [info] Metadata sync disabled, not logged in.
669581 [2023-11-07 07:55:32.990] [background] [info] Fetching XOAuth2 access token (gmail) for bb8c3c5b
669581 [2023-11-07 07:55:33.105] [background] [info] Marking all folders as `busy`
669581 [2023-11-07 07:55:33.106] [background] [info] Syncing folder list...
669581 [2023-11-07 07:55:34.848] [background] [info] Syncing folder list...
669581 [2023-11-07 07:55:35.663] [background] [info] Sync loop deleting unlinked messages with phase 2.
669581 [2023-11-07 07:55:35.674] [background] [info] Sync loop complete.
669581 [2023-11-07 07:55:36.375] [foreground] [info] [local-340c5302-89cf] Running EventRSVPTask performRemote:
669581 [2023-11-07 07:55:36.375] [foreground] [critical] 
***
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null
***

669646 [2023-11-07 07:55:36.466] [main] [info] Identity created at 1699372536 - using ID Schema 1
669646 [2023-11-07 07:55:36.467] [main] [info] ------------- Starting Sync (jeremywoertink@gmail.com) ---------------
669646 [2023-11-07 07:55:36.469] [metadata] [info] Metadata sync disabled, not logged in.
669646 [2023-11-07 07:55:40.469] [background] [info] Fetching XOAuth2 access token (gmail) for bb8c3c5b
669646 [2023-11-07 07:55:40.579] [background] [info] Marking all folders as `busy`
669646 [2023-11-07 07:55:40.580] [background] [info] Syncing folder list...
669646 [2023-11-07 07:55:42.231] [background] [info] Syncing folder list...
669646 [2023-11-07 07:55:42.998] [background] [info] Sync loop deleting unlinked messages with phase 2.
669646 [2023-11-07 07:55:43.010] [background] [info] Sync loop complete.
669646 [2023-11-07 07:55:43.722] [foreground] [info] [local-340c5302-89cf] Running EventRSVPTask performRemote:
669646 [2023-11-07 07:55:43.722] [foreground] [critical] 
***
*** Mailspring Sync 
*** A JSON exception occurred during program execution: 
*** [json.exception.type_error.302] type must be string, but is null
***
❯ mailspring --version
1.11.0-6193b33c

❯ neofetch
             /////////////                jeremy@pop-os 
         /////////////////////            ------------- 
      ///////*767////////////////         OS: Pop!_OS 22.04 LTS x86_64 
    //////7676767676*//////////////       Host: Thelio Mira thelio-mira-r1 
   /////76767//7676767//////////////      Kernel: 6.5.6-76060506-generic 
  /////767676///*76767///////////////     Uptime: 7 days, 1 hour, 34 mins 
 ///////767676///76767.///7676*///////    Packages: 3052 (dpkg), 58 (flatpak), 19 (snap) 
/////////767676//76767///767676////////   Shell: bash 5.1.16 
//////////76767676767////76767/////////   Resolution: 1920x1080, 3840x2160 
///////////76767676//////7676//////////   DE: GNOME 42.5 
////////////,7676,///////767///////////   WM: Mutter 
/////////////*7676///////76////////////   WM Theme: Pop 
///////////////7676////////////////////   Theme: Desert-GTK [GTK2/3] 
 ///////////////7676///767////////////    Icons: pop-os-branding [GTK2/3] 
  //////////////////////'////////////     Terminal: gnome-terminal 
   //////.7676767676767676767,//////      CPU: AMD Ryzen 5 5600X (12) @ 3.700GHz 
    /////767676767676767676767/////       GPU: NVIDIA GeForce RTX 3070 Ti 
      ///////////////////////////         Memory: 14471MiB / 64202MiB 
         /////////////////////
             /////////////