Can't list emails from Gmail
Bug Summary
The inbox doesn't show any emails and the loading icon keeps spinning when attempting to list emails from a Gmail account.
Your installation
Geary version: 40.0
Geary revision: tags/gnome-40.0-0-ge561775c-dirty
GTK version: 3.24.33
GLib version: 2.72.1
WebKitGTK version: 2.36.1
Desktop environment: GNOME
Distribution name: Arch Linux
Distribution release: Unknown
Installation prefix: /usr
Installation method: pacman
Email provider: Gmail
Steps to reproduce
- Add a Gmail account
- Attempt to list emails
What happened?
It doesn't display any emails in my Gmail INBOX. It only shows the total number of messages and the total number of unread messages. This is identical to the behavior described in #746 (closed).
What did you expect to happen?
I expected to get a list of emails.
Relevant logs and/or screenshots
[deb] 14:31:44.0683 Geary.Imap.Deser: [goa_account_1651608803_0] [imap] [selecting] [0006/imap.gmail.com:993/up] [GEARY_IMAP_DESERIALIZER_STATE_TAG] GearyImapDeserializer: Line: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $MDNSent $NotPhishing $Phishing $label3 Junk LoadRemoteImages NonJunk Old [Gmail]/Sent [Gmail]/Sent_Mail)
*[wrn] 14:31:44.0683 Geary.Imap.Deser: [goa_account_1651608803_0] [imap] [selecting] [0006/imap.gmail.com:993/up] [GEARY_IMAP_DESERIALIZER_STATE_FLAG] GearyImapDeserializer: Received an unexpected closing parens
[deb] 14:31:44.0683 Geary.Imap.Deser: [goa_account_1651608803_0] [imap] [selecting] [0006/imap.gmail.com:993/up] [GEARY_IMAP_DESERIALIZER_STATE_FAILED] GearyImapDeserializer: Syntax error, dropping
[deb] 14:31:44.0709 Geary.Imap.Deser: [goa_account_1651608803_0] [imap] [closed] [0006/imap.gmail.com:993/down] [GEARY_IMAP_DESERIALIZER_STATE_CLOSED] GearyImapDeserializer: Deserializer closed
I believe this is the same problem as reported in #746 (closed) but triggered by a corner case which the original fix doesn't cover. The error "Received an unexpected closing parens" comes from two of the flags starting with a '[', i.e. [Gmail]/Sent
, which makes the parser think it's a response code. According to RFC 3501 '[´ seems to be a valid flag character (unlike ']') so the parser should accept these when parsing flags.