Hi,
I’m experiencing an issue with eM Client where a red warning triangle appears next to my accounts (Gmail and Outlook), and synchronization via IMAP seems to fail frequently.
- This started happening after one of the latest app updates. I am currently running the latest version: 10.4.4867 (a1d5549) on Windows 11 (25H2 OS Build 26200.8037).
- The issue occurs with both my Gmail and Outlook accounts.
- I have already used the database repair function.
- This is not isolated to my setup — a relative of mine using eM Client on a different PC is experiencing the same issue.
The problem happens consistently during normal sync. I checked the logs and found the following exception:
11:24:24 [email protected] [IMAP] System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.Int64'.
at MailClient.Protocols.Common.ItemSynchronizeContext`2.StoreItems[TUid,TVid](SynchronizationType synchronizationType, IEnumerable`1 newItems, Dictionary`2 uniqueIdToVersionId, Dictionary`2 uniqueIdToOid)
at MailClient.Protocols.Common.MailItemSynchronizeContext.StoreItems[TUid,TVid](SynchronizationType synchronizationType, IEnumerable`1 newItems, Dictionary`2 uniqueIdToVersionId, Dictionary`2 uniqueIdToOid)
at MailClient.Protocols.Common.ItemSynchronizeContext`2.<>c__DisplayClass23_0`3.<Synchronize>g__FlushItems|1(Int32 threshold)
at MailClient.Protocols.Common.ItemSynchronizeContext`2.Synchronize[T,TUid,TVid](SynchronizationType synchronizationType, IEnumerable`1 items, Func`2 getUniqueId, Func`2 getVersionId, Func`3 hasChanged, Func`2 isDeleted, Func`2 convertItems, Action`2 updateItem)
at MailClient.Protocols.Imap.SyncOperations.BaseSyncOperation.WriteSyncItemsToDb(CancellationToken& cancellationToken)
at MailClient.Protocols.Imap.SyncOperations.BaseSyncOperation.ProcessFetchNotifications(CancellationToken& cancellationToken, Boolean fromInterruption)
at MailClient.Protocols.Imap.SyncOperations.BaseSyncOperation.ProcessPriorityUpdatesAsync(CancellationToken& cancellationToken)
at MailClient.Protocols.Imap.SyncOperations.BaseSyncOperation.<>c__DisplayClass80_0.<<FetchRawMessagesAsync>g__FetchRawMessagesSlowAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at MailClient.Protocols.Imap.SyncOperations.BaseSyncOperation.FetchNewMessagesAsync(SequenceSet uidSet, UInt32 messageCountEstimate, Boolean narrowed, Boolean chunk, Boolean allowLegacyHybridMode, Boolean allowHybridRawSearch, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.SyncOperations.NormalSyncOperation.FillHoles(CancellationToken cancellationToken)
at MailClient.Protocols.Imap.SyncOperations.NormalSyncOperation.SynchronizeFolder(Dictionary`2 infoOldFlags, UInt32 serverMessageCount, UInt32 newMessagesTotal, UInt32 uidNext, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.SyncOperations.NormalSyncOperation.ExecuteInternalAsync(CancellationToken cancellationToken)
at MailClient.Protocols.Imap.SyncOperations.BaseSyncOperation.ExecuteAsync(CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ImapMailSynchronizer.SynchronizeMessagesAsync(IItemSynchronizeContext`1 synchronizeContext, Folder folder, Boolean fast, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ImapMailSynchronizer.SynchronizeMessagesAsync(IItemSynchronizeContext`1 synchronizeContext, Folder folder, Boolean fast, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ImapMailSynchronizer.Synchronize(IItemSynchronizeContext`1 synchronizeContext, Folder folder, CancellationToken cancellationToken)
at MailClient.Protocols.Common.ItemSynchronizer`2.<>c__DisplayClass37_2.<EnqueueSynchronize>b__6(WorkerStatus status, CancellationToken ct)
at MailClient.Protocols.Imap.ImapActionCommand.<>c__DisplayClass11_0.<.ctor>b__0(WorkerStatus ws, CancellationToken ct)
at MailClient.Protocols.Imap.ImapActionCommand.ExecuteInternalSync(WorkerStatus status)
at MailClient.Protocols.Imap.ImapActionCommand.Execute(WorkerStatus status)
at MailClient.Commands.Command.Process(WorkerStatus status)
--- End of stack trace from previous location ---
at MailClient.Protocols.Imap.ImapAccount.SynchronizeIntAsync(Boolean forced)
at MailClient.Protocols.Common.SynchronizableMailAccount.<>c__DisplayClass22_0.<<SynchronizeAsync>b__0>d.MoveNext()
IMAP_SERVER_TYPE = Gmail
RunInPlace = False
GUIStatus_Exception_Reported = True