You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.InvalidCastException: Unable to cast object of type 'System.Int32[]' to type
'System.Collections.Generic.IList1[MailKit.UniqueId]'. at MailKit.Net.Imap.ImapFolder.Search(SearchQuery query, CancellationToken cancellationToken)
Exception occurs when attempting to search AOL IMAP Server (imaps://imap.aol.com:99) folders.
The text was updated successfully, but these errors were encountered:
Thanks! Fixed in git master. I don't have time to make a release for the next week or so, but I'll try to make one as soon as I can after that. Hopefully I'll find some time on the 23rd or 24th.
Ugh, so it looks like AOL's IMAP implementation is broken.
The ESEARCH response starts with an optional search correlator. If
it is missing, then the response was not caused by a particular IMAP
command, whereas if it is present, it contains the tag of the command
that caused the response to be returned.
The search correlator is followed by an optional UID indicator. If
this indicator is present, all data in the ESEARCH response refers to
UIDs, otherwise all returned data refers to message numbers.
It's missing the UID indicator and so what my code was doing was converting the IList into int[] in the ESearch handler. The exception is because the Search() method was casting the search results to an IList since it expected that type since it did a UID SEARCH command.
So... AOL's response is broken because either:
the ESEARCH response should have had the UID indicator (bad)
or
the ESEARCH response returned indexes to a UID SEARCH command (really bad)
If you test out my patch, you'll have to let me know if the values returned match up with UIDs or not.
Exception occurs when attempting to search AOL IMAP Server (imaps://imap.aol.com:99) folders.
The text was updated successfully, but these errors were encountered: