I just started using eM Client and I’m experiencing the same problem. As a software engineer myself, here’s how I understand the problem: something goes wrong with the sync process at some point, which forces a complete re-sync. I have over 16,000 calendar items over 12 years. The probability that something happens to the connection as it tries to re-download the entire database gets exponentially higher the larger it is. It also takes up a ton of data — frankly, it is horrible on mobile connections.
Digging deeper into the logs and the ActiveSync Command protocol, something strange is happening.
A periodic sync starts with a FolderSync. I’m not sure why eM Client does not maintain a SyncKey for FolderSync and always starts with 0.
13:54:18.586|03B| FolderSync
14:04:17.344|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:17.344|03B| <FolderSync xmlns="FolderHierarchy:">
14:04:17.344|03B| <SyncKey>0</SyncKey>
14:04:17.344|03B| </FolderSync>
14:04:17.344|03B|
14:04:17.344|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:17.748|03B| <folderhierarchy:FolderSync xmlns:folderhierarchy="FolderHierarchy:">
14:04:17.748|03B| <folderhierarchy:Status>1</folderhierarchy:Status>
14:04:17.748|03B| <folderhierarchy:SyncKey>1</folderhierarchy:SyncKey>
14:04:17.748|03B| <folderhierarchy:Changes>
[...]
14:04:17.774|03B| </folderhierarchy:Changes>
14:04:17.774|03B| </folderhierarchy:FolderSync>
It then immediately does a GetItemEstimate on CollectionId 5 = Calendar. This is fine, but then it does a Sync after. This is strange because according to the spec, the Sync response will tell whether there are new items, therefore the GetItemEstimate should only come after the Sync says there are new things. (Note: There is no response to the Sync in the logs because when there is nothing to sync, the server responses with no content.)
It then does the same for CollectionId 10 = Contacts and CollectionId 62 = Tasks.
14:04:17.774|03B| GetItemEstimate
14:04:17.775|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:17.775|03B| <GetItemEstimate xmlns="GetItemEstimate:">
14:04:17.775|03B| <Collections>
14:04:17.775|03B| <Collection>
14:04:17.775|03B| <SyncKey xmlns="AirSync:">1305192833</SyncKey>
14:04:17.775|03B| <CollectionId>5</CollectionId>
14:04:17.775|03B| </Collection>
14:04:17.775|03B| </Collections>
14:04:17.775|03B| </GetItemEstimate>
14:04:17.775|03B|
14:04:17.775|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:17.900|03B| <getitemestimate:GetItemEstimate xmlns:getitemestimate="GetItemEstimate:">
14:04:17.900|03B| <getitemestimate:Response>
14:04:17.900|03B| <getitemestimate:Status>1</getitemestimate:Status>
14:04:17.900|03B| <getitemestimate:Collection>
14:04:17.900|03B| <getitemestimate:CollectionId>5</getitemestimate:CollectionId>
14:04:17.900|03B| <getitemestimate:Estimate>0</getitemestimate:Estimate>
14:04:17.900|03B| </getitemestimate:Collection>
14:04:17.900|03B| </getitemestimate:Response>
14:04:17.900|03B| </getitemestimate:GetItemEstimate>
14:04:17.900|03B|
14:04:17.900|03B| Sync
14:04:17.900|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:17.900|03B| <Sync xmlns="AirSync:">
14:04:17.900|03B| <Collections>
14:04:17.900|03B| <Collection>
14:04:17.900|03B| <SyncKey>1305192833</SyncKey>
14:04:17.900|03B| <CollectionId>5</CollectionId>
14:04:17.900|03B| <GetChanges />
14:04:17.900|03B| <WindowSize>50</WindowSize>
14:04:17.900|03B| <Options>
14:04:17.900|03B| <BodyPreference xmlns="AirSyncBase:">
14:04:17.900|03B| <Type>2</Type>
14:04:17.900|03B| </BodyPreference>
14:04:17.900|03B| <Conflict>0</Conflict>
14:04:17.900|03B| </Options>
14:04:17.900|03B| </Collection>
14:04:17.900|03B| </Collections>
14:04:17.900|03B| </Sync>
14:04:17.900|03B|
14:04:17.901|03B| GetItemEstimate
14:04:18.064|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:18.065|03B| <GetItemEstimate xmlns="GetItemEstimate:">
14:04:18.065|03B| <Collections>
14:04:18.065|03B| <Collection>
14:04:18.065|03B| <SyncKey xmlns="AirSync:">395211212</SyncKey>
14:04:18.065|03B| <CollectionId>10</CollectionId>
14:04:18.065|03B| </Collection>
14:04:18.065|03B| </Collections>
14:04:18.065|03B| </GetItemEstimate>
14:04:18.065|03B|
14:04:18.065|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:18.184|03B| <getitemestimate:GetItemEstimate xmlns:getitemestimate="GetItemEstimate:">
14:04:18.184|03B| <getitemestimate:Response>
14:04:18.184|03B| <getitemestimate:Status>1</getitemestimate:Status>
14:04:18.184|03B| <getitemestimate:Collection>
14:04:18.184|03B| <getitemestimate:CollectionId>10</getitemestimate:CollectionId>
14:04:18.184|03B| <getitemestimate:Estimate>0</getitemestimate:Estimate>
14:04:18.184|03B| </getitemestimate:Collection>
14:04:18.184|03B| </getitemestimate:Response>
14:04:18.184|03B| </getitemestimate:GetItemEstimate>
14:04:18.184|03B|
14:04:18.184|03B| Sync
14:04:18.184|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:18.184|03B| <Sync xmlns="AirSync:">
14:04:18.185|03B| <Collections>
14:04:18.185|03B| <Collection>
14:04:18.185|03B| <SyncKey>395211212</SyncKey>
14:04:18.185|03B| <CollectionId>10</CollectionId>
14:04:18.185|03B| <GetChanges />
14:04:18.185|03B| <WindowSize>50</WindowSize>
14:04:18.185|03B| <Options>
14:04:18.185|03B| <BodyPreference xmlns="AirSyncBase:">
14:04:18.185|03B| <Type>2</Type>
14:04:18.185|03B| </BodyPreference>
14:04:18.185|03B| <Conflict>0</Conflict>
14:04:18.185|03B| </Options>
14:04:18.185|03B| </Collection>
14:04:18.185|03B| </Collections>
14:04:18.185|03B| </Sync>
14:04:18.185|03B|
14:04:18.185|03B| GetItemEstimate
14:04:18.353|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:18.353|03B| <GetItemEstimate xmlns="GetItemEstimate:">
14:04:18.353|03B| <Collections>
14:04:18.353|03B| <Collection>
14:04:18.353|03B| <SyncKey xmlns="AirSync:">2521180</SyncKey>
14:04:18.353|03B| <CollectionId>62</CollectionId>
14:04:18.353|03B| </Collection>
14:04:18.353|03B| </Collections>
14:04:18.353|03B| </GetItemEstimate>
14:04:18.353|03B|
14:04:18.353|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:18.470|03B| <getitemestimate:GetItemEstimate xmlns:getitemestimate="GetItemEstimate:">
14:04:18.470|03B| <getitemestimate:Response>
14:04:18.470|03B| <getitemestimate:Status>1</getitemestimate:Status>
14:04:18.470|03B| <getitemestimate:Collection>
14:04:18.470|03B| <getitemestimate:CollectionId>62</getitemestimate:CollectionId>
14:04:18.470|03B| <getitemestimate:Estimate>0</getitemestimate:Estimate>
14:04:18.470|03B| </getitemestimate:Collection>
14:04:18.470|03B| </getitemestimate:Response>
14:04:18.470|03B| </getitemestimate:GetItemEstimate>
14:04:18.470|03B|
14:04:18.470|03B| Sync
14:04:18.470|03B| <?xml version="1.0" encoding="utf-8"?>
14:04:18.470|03B| <Sync xmlns="AirSync:">
14:04:18.470|03B| <Collections>
14:04:18.470|03B| <Collection>
14:04:18.470|03B| <SyncKey>2521180</SyncKey>
14:04:18.470|03B| <CollectionId>62</CollectionId>
14:04:18.471|03B| <GetChanges />
14:04:18.471|03B| <WindowSize>50</WindowSize>
14:04:18.471|03B| <Options>
14:04:18.471|03B| <BodyPreference xmlns="AirSyncBase:">
14:04:18.471|03B| <Type>2</Type>
14:04:18.471|03B| </BodyPreference>
14:04:18.471|03B| <Conflict>0</Conflict>
14:04:18.471|03B| </Options>
14:04:18.471|03B| </Collection>
14:04:18.471|03B| </Collections>
14:04:18.471|03B| </Sync>
This is all expected. 10 minutes later it does a sync again:
14:04:18.471|03B| FolderSync
14:14:17.358|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:17.359|03B| <FolderSync xmlns="FolderHierarchy:">
14:14:17.359|03B| <SyncKey>0</SyncKey>
14:14:17.359|03B| </FolderSync>
[...]
The calendar sync works fine:
14:14:18.199|03B| GetItemEstimate
14:14:18.201|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.202|03B| <GetItemEstimate xmlns="GetItemEstimate:">
14:14:18.202|03B| <Collections>
14:14:18.202|03B| <Collection>
14:14:18.202|03B| <SyncKey xmlns="AirSync:">1305192833</SyncKey>
14:14:18.202|03B| <CollectionId>5</CollectionId>
14:14:18.202|03B| </Collection>
14:14:18.202|03B| </Collections>
14:14:18.202|03B| </GetItemEstimate>
14:14:18.203|03B|
14:14:18.203|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.316|03B| <getitemestimate:GetItemEstimate xmlns:getitemestimate="GetItemEstimate:">
14:14:18.316|03B| <getitemestimate:Response>
14:14:18.316|03B| <getitemestimate:Status>1</getitemestimate:Status>
14:14:18.316|03B| <getitemestimate:Collection>
14:14:18.316|03B| <getitemestimate:CollectionId>5</getitemestimate:CollectionId>
14:14:18.316|03B| <getitemestimate:Estimate>0</getitemestimate:Estimate>
14:14:18.316|03B| </getitemestimate:Collection>
14:14:18.316|03B| </getitemestimate:Response>
14:14:18.316|03B| </getitemestimate:GetItemEstimate>
14:14:18.317|03B|
14:14:18.317|03B| Sync
14:14:18.317|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.317|03B| <Sync xmlns="AirSync:">
14:14:18.317|03B| <Collections>
14:14:18.317|03B| <Collection>
14:14:18.317|03B| <SyncKey>1305192833</SyncKey>
14:14:18.317|03B| <CollectionId>5</CollectionId>
14:14:18.317|03B| <GetChanges />
14:14:18.317|03B| <WindowSize>50</WindowSize>
14:14:18.317|03B| <Options>
14:14:18.317|03B| <BodyPreference xmlns="AirSyncBase:">
14:14:18.317|03B| <Type>2</Type>
14:14:18.317|03B| </BodyPreference>
14:14:18.317|03B| <Conflict>0</Conflict>
14:14:18.317|03B| </Options>
14:14:18.317|03B| </Collection>
14:14:18.317|03B| </Collections>
14:14:18.317|03B| </Sync>
But for some reason, Contacts no longer works. It gets a Status of 4 (invalid SyncKey) for GetItemEstimate and a Status of 3 (invalid SyncKey) for Sync:
14:14:18.317|03B| GetItemEstimate
14:14:18.484|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.484|03B| <GetItemEstimate xmlns="GetItemEstimate:">
14:14:18.484|03B| <Collections>
14:14:18.484|03B| <Collection>
14:14:18.484|03B| <SyncKey xmlns="AirSync:">395211212</SyncKey>
14:14:18.484|03B| <CollectionId>10</CollectionId>
14:14:18.484|03B| </Collection>
14:14:18.485|03B| </Collections>
14:14:18.485|03B| </GetItemEstimate>
14:14:18.485|03B|
14:14:18.485|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.607|03B| <getitemestimate:GetItemEstimate xmlns:getitemestimate="GetItemEstimate:">
14:14:18.607|03B| <getitemestimate:Response>
14:14:18.607|03B| <getitemestimate:Status>4</getitemestimate:Status>
14:14:18.607|03B| <getitemestimate:Collection>
14:14:18.607|03B| <getitemestimate:CollectionId>10</getitemestimate:CollectionId>
14:14:18.607|03B| </getitemestimate:Collection>
14:14:18.607|03B| </getitemestimate:Response>
14:14:18.607|03B| </getitemestimate:GetItemEstimate>
14:14:18.607|03B|
14:14:18.607|03B| Sync
14:14:18.608|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.608|03B| <Sync xmlns="AirSync:">
14:14:18.608|03B| <Collections>
14:14:18.608|03B| <Collection>
14:14:18.608|03B| <SyncKey>395211212</SyncKey>
14:14:18.608|03B| <CollectionId>10</CollectionId>
14:14:18.608|03B| <GetChanges />
14:14:18.608|03B| <WindowSize>50</WindowSize>
14:14:18.608|03B| <Options>
14:14:18.608|03B| <BodyPreference xmlns="AirSyncBase:">
14:14:18.608|03B| <Type>2</Type>
14:14:18.608|03B| </BodyPreference>
14:14:18.608|03B| <Conflict>0</Conflict>
14:14:18.608|03B| </Options>
14:14:18.608|03B| </Collection>
14:14:18.608|03B| </Collections>
14:14:18.608|03B| </Sync>
14:14:18.608|03B|
14:14:18.608|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.775|03B| <airsync:Sync xmlns:airsync="AirSync:">
14:14:18.775|03B| <airsync:Collections>
14:14:18.775|03B| <airsync:Collection>
14:14:18.775|03B| <airsync:SyncKey>395211212</airsync:SyncKey>
14:14:18.775|03B| <airsync:CollectionId>10</airsync:CollectionId>
14:14:18.775|03B| <airsync:Status>3</airsync:Status>
14:14:18.775|03B| </airsync:Collection>
14:14:18.775|03B| </airsync:Collections>
14:14:18.775|03B| </airsync:Sync>
It immediately tries to resync all Contacts again, with a SyncKey of 0 to restart the sync:
14:14:18.775|03B| Sync
14:14:18.775|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:18.775|03B| <Sync xmlns="AirSync:">
14:14:18.775|03B| <Collections>
14:14:18.775|03B| <Collection>
14:14:18.776|03B| <SyncKey>0</SyncKey>
14:14:18.776|03B| <CollectionId>10</CollectionId>
14:14:18.776|03B| <Options>
14:14:18.776|03B| <BodyPreference xmlns="AirSyncBase:">
14:14:18.776|03B| <Type>2</Type>
14:14:18.776|03B| </BodyPreference>
14:14:18.776|03B| <Conflict>0</Conflict>
14:14:18.776|03B| </Options>
14:14:18.776|03B| </Collection>
14:14:18.776|03B| </Collections>
14:14:18.776|03B| </Sync>
14:14:18.776|03B|
14:14:18.776|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:19.005|03B| <airsync:Sync xmlns:airsync="AirSync:">
14:14:19.005|03B| <airsync:Collections>
14:14:19.005|03B| <airsync:Collection>
14:14:19.005|03B| <airsync:SyncKey>1634521428</airsync:SyncKey>
14:14:19.005|03B| <airsync:CollectionId>10</airsync:CollectionId>
14:14:19.005|03B| <airsync:Status>1</airsync:Status>
14:14:19.005|03B| </airsync:Collection>
14:14:19.005|03B| </airsync:Collections>
14:14:19.005|03B| </airsync:Sync>
14:14:19.005|03B|
14:14:19.005|03B| Sync
14:14:19.008|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:19.008|03B| <Sync xmlns="AirSync:">
14:14:19.008|03B| <Collections>
14:14:19.008|03B| <Collection>
14:14:19.008|03B| <SyncKey>1634521428</SyncKey>
14:14:19.008|03B| <CollectionId>10</CollectionId>
14:14:19.008|03B| <GetChanges />
14:14:19.008|03B| <WindowSize>50</WindowSize>
14:14:19.008|03B| <Options>
14:14:19.008|03B| <BodyPreference xmlns="AirSyncBase:">
14:14:19.008|03B| <Type>2</Type>
14:14:19.008|03B| </BodyPreference>
14:14:19.008|03B| <Conflict>0</Conflict>
14:14:19.008|03B| </Options>
14:14:19.008|03B| </Collection>
14:14:19.008|03B| </Collections>
14:14:19.008|03B| </Sync>
14:14:19.008|03B|
14:14:19.008|03B| <?xml version="1.0" encoding="utf-8"?>
14:14:19.751|03B| <airsync:Sync xmlns:airsync="AirSync:">
14:14:19.751|03B| <airsync:Collections>
14:14:19.751|03B| <airsync:Collection>
14:14:19.751|03B| <airsync:SyncKey>1071299936</airsync:SyncKey>
14:14:19.751|03B| <airsync:CollectionId>10</airsync:CollectionId>
14:14:19.751|03B| <airsync:Status>1</airsync:Status>
14:14:19.751|03B| <airsync:MoreAvailable />
[...]
It continues syncing and completes it, then syncs Tasks too. 10 minutes later, it does the same but this time the calendar sync fails in the same way:
14:24:18.140|03B| GetItemEstimate
14:24:18.141|03B| <?xml version="1.0" encoding="utf-8"?>
14:24:18.141|03B| <GetItemEstimate xmlns="GetItemEstimate:">
14:24:18.141|03B| <Collections>
14:24:18.141|03B| <Collection>
14:24:18.141|03B| <SyncKey xmlns="AirSync:">1305192833</SyncKey>
14:24:18.142|03B| <CollectionId>5</CollectionId>
14:24:18.142|03B| </Collection>
14:24:18.142|03B| </Collections>
14:24:18.142|03B| </GetItemEstimate>
14:24:18.142|03B|
14:24:18.142|03B| <?xml version="1.0" encoding="utf-8"?>
14:24:18.288|03B| <getitemestimate:GetItemEstimate xmlns:getitemestimate="GetItemEstimate:">
14:24:18.288|03B| <getitemestimate:Response>
14:24:18.288|03B| <getitemestimate:Status>4</getitemestimate:Status>
14:24:18.288|03B| <getitemestimate:Collection>
14:24:18.288|03B| <getitemestimate:CollectionId>5</getitemestimate:CollectionId>
14:24:18.288|03B| </getitemestimate:Collection>
14:24:18.288|03B| </getitemestimate:Response>
14:24:18.288|03B| </getitemestimate:GetItemEstimate>
14:24:18.288|03B|
14:24:18.289|03B| Sync
14:24:18.289|03B| <?xml version="1.0" encoding="utf-8"?>
14:24:18.289|03B| <Sync xmlns="AirSync:">
14:24:18.289|03B| <Collections>
14:24:18.289|03B| <Collection>
14:24:18.289|03B| <SyncKey>1305192833</SyncKey>
14:24:18.289|03B| <CollectionId>5</CollectionId>
14:24:18.289|03B| <GetChanges />
14:24:18.289|03B| <WindowSize>50</WindowSize>
14:24:18.289|03B| <Options>
14:24:18.289|03B| <BodyPreference xmlns="AirSyncBase:">
14:24:18.289|03B| <Type>2</Type>
14:24:18.289|03B| </BodyPreference>
14:24:18.289|03B| <Conflict>0</Conflict>
14:24:18.289|03B| </Options>
14:24:18.289|03B| </Collection>
14:24:18.289|03B| </Collections>
14:24:18.289|03B| </Sync>
14:24:18.289|03B|
14:24:18.289|03B| <?xml version="1.0" encoding="utf-8"?>
14:24:18.743|03B| <airsync:Sync xmlns:airsync="AirSync:">
14:24:18.743|03B| <airsync:Collections>
14:24:18.743|03B| <airsync:Collection>
14:24:18.743|03B| <airsync:SyncKey>1305192833</airsync:SyncKey>
14:24:18.743|03B| <airsync:CollectionId>5</airsync:CollectionId>
14:24:18.743|03B| <airsync:Status>3</airsync:Status>
14:24:18.743|03B| </airsync:Collection>
14:24:18.743|03B| </airsync:Collections>
14:24:18.743|03B| </airsync:Sync>
It retries the Sync but this time it gets a Status 132, which is undocumented. My guess is it might have hit some kind of rate limit.
14:24:18.743|03B| Sync
14:24:18.743|03B| <?xml version="1.0" encoding="utf-8"?>
14:24:18.743|03B| <Sync xmlns="AirSync:">
14:24:18.743|03B| <Collections>
14:24:18.743|03B| <Collection>
14:24:18.743|03B| <SyncKey>0</SyncKey>
14:24:18.743|03B| <CollectionId>5</CollectionId>
14:24:18.743|03B| <Options>
14:24:18.743|03B| <BodyPreference xmlns="AirSyncBase:">
14:24:18.743|03B| <Type>2</Type>
14:24:18.743|03B| </BodyPreference>
14:24:18.743|03B| <Conflict>0</Conflict>
14:24:18.743|03B| </Options>
14:24:18.743|03B| </Collection>
14:24:18.743|03B| </Collections>
14:24:18.744|03B| </Sync>
14:24:18.744|03B|
14:24:18.744|03B| <?xml version="1.0" encoding="utf-8"?>
14:24:22.173|03B| <airsync:Sync xmlns:airsync="AirSync:">
14:24:22.173|03B| <airsync:Status>132</airsync:Status>
14:24:22.173|03B| </airsync:Sync>
It retries several times, getting mostly the 132’s and sometimes no response, but ultimately throws the exception:
14:24:35.880|03B| Web exception: Exception of type 'MailClient.Protocols.Common.HttpResponseException' was thrown.
14:24:36.052|03B|
14:24:36.052|03B| Exception: MailClient.Storage.Application.OperationException: Synchronizing folder 'Personal/Calendar' failed due to the following error: Exception of type 'MailClient.Protocols.Common.HttpResponseException' was thrown.
14:24:36.052|03B| ---> MailClient.Protocols.Common.HttpResponseException: Exception of type 'MailClient.Protocols.Common.HttpResponseException' was thrown.
14:24:36.053|03B| at MailClient.Protocols.Common.WebClientExtensions.EnsureOK(HttpResponseMessage response)
14:24:36.053|03B| at MailClient.Protocols.AirSync.Protocol.ActiveSyncCommandRequest.GetResponse(CancellationToken cancellationToken)
14:24:36.053|03B| at MailClient.Protocols.AirSync.Protocol.LoggingCommandRequest.GetResponse(CancellationToken cancellationToken)
14:24:36.053|03B| at MailClient.Protocols.AirSync.AirSyncItemSynchronizer`2.GetSyncKey(Folder folder, IItemContext context, CancellationToken cancellationToken)
14:24:36.053|03B| at MailClient.Protocols.AirSync.AirSyncItemSynchronizer`2.Synchronize(IItemSynchronizeContext`1 synchronizeContext, Folder folder, CancellationToken cancellationToken)
14:24:36.053|03B| at MailClient.Protocols.Common.ItemSynchronizer`2.<>c__DisplayClass37_2.<EnqueueSynchronize>b__6(WorkerStatus status, CancellationToken ct)
14:24:36.053|03B| at MailClient.Protocols.AirSync.AirSyncGenericCommand.Execute(WorkerStatus status)
14:24:36.053|03B| --- End of inner exception stack trace ---
14:24:36.053|03B| at MailClient.Protocols.AirSync.AirSyncGenericCommand.Execute(WorkerStatus status)
14:24:36.053|03B| at MailClient.Commands.Command.Process(WorkerStatus status)
14:24:36.053|03B| AccountBase.GoOfflineAsync : State changed to OFFLINE due BrokenConnection
14:24:36.053|01B| AccountBase.ChangeOnlineState : State changed to OFFLINE due BrokenConnection
There is something flaky about the state of the SyncKeys, but it also seems that the implementation of FolderSync, GetItemEstimate, and Sync is a little strange.
One thing I noted from the example second response in the docs is that the GetChanges element should be <GetChanges>1</GetChanges>, and not <GetChanges />, which might imply a null value.
Another thing I noted was the protocol for handling “nothing to sync” is quite different from how eM Client is handling it. It should be sending an empty Sync request as defined here. While the spec doesn’t restrict sending an XML body, it certainly does not mention using GetItemEstimate while there is an empty response.
Lastly, I wonder whether this has anything to do with multiple devices with eM Client running. SyncKeys shouldn’t conflict as each device will maintain its key, but who knows.