emailjs / emailjs-imap-client

Low-level JS IMAP client for all your IMAP needs.
MIT License
553 stars 122 forks source link

Listing mailboxes returns correct-looking logs, but an empty children array #173

Closed TomasHubelbauer closed 6 years ago

TomasHubelbauer commented 6 years ago

I just ran into a situation where my Fastmail mailboxes weren't returned from the API call but the log messages display them perfectly. I have replaced my email address with _ in the logs.

[DEBUG][2018-02-10T10:59:04.737Z][1][_][imap.fastmail.com] Listing mailboxes...
[DEBUG][2018-02-10T10:59:04.737Z][1][_][imap.fastmail.com] C: W4 LIST "" "*"
[DEBUG][2018-02-10T10:59:04.844Z][1][_][imap.fastmail.com] S: * LIST (\HasNoChildren) "/" INBOX
[DEBUG][2018-02-10T10:59:04.845Z][1][_][imap.fastmail.com] S: * LIST (\HasNoChildren \Archive) "/" Archive
[DEBUG][2018-02-10T10:59:04.845Z][1][_][imap.fastmail.com] S: * LIST (\HasNoChildren \Drafts) "/" Drafts
[DEBUG][2018-02-10T10:59:04.845Z][1][_][imap.fastmail.com] S: * LIST (\HasNoChildren \Sent) "/" Sent
[DEBUG][2018-02-10T10:59:04.846Z][1][_][imap.fastmail.com] S: * LIST (\HasNoChildren \Junk) "/" Spam
[DEBUG][2018-02-10T10:59:04.847Z][1][_][imap.fastmail.com] S: * LIST (\HasNoChildren \Trash) "/" Trash
[DEBUG][2018-02-10T10:59:04.847Z][1][_][imap.fastmail.com] S: W4 OK Completed (0.001 secs 14 calls)
[DEBUG][2018-02-10T10:59:04.847Z][1][_][imap.fastmail.com] C: W5 LSUB "" "*"
[DEBUG][2018-02-10T10:59:04.954Z][1][_][imap.fastmail.com] S: * LSUB (\Archive) "/" Archive
[DEBUG][2018-02-10T10:59:04.955Z][1][_][imap.fastmail.com] S: * LSUB (\Drafts) "/" Drafts
[DEBUG][2018-02-10T10:59:04.955Z][1][_][imap.fastmail.com] S: * LSUB (\Sent) "/" Sent
[DEBUG][2018-02-10T10:59:04.956Z][1][_][imap.fastmail.com] S: * LSUB (\Junk) "/" Spam
[DEBUG][2018-02-10T10:59:04.956Z][1][_][imap.fastmail.com] S: * LSUB (\Trash) "/" Trash
[DEBUG][2018-02-10T10:59:04.957Z][1][_][imap.fastmail.com] S: W5 OK Completed (0.000 secs 6 calls)

The return value is { root: true, children: [] }

I will investigate this some more and update this issue accordingly.

TomasHubelbauer commented 6 years ago

I just noticed this is a duplicate of #167. Doesn't seem to be Fastmail-specific.