"An item with the same key has already been added." error message during the synchronization process.

Recently when I open eM Client I receive a “An item with the same key has already been added.” error message during the synchronization process. When I used my browser and my tablet email app to check my email, I discovered that I have several email messages that do not appear in eM Client.

I just had the same error message.  I’m not sure why either!

Hello everybody,

We’re sorry for the inconvenience. Could you please enclose a screenshot of the error and open the third tab in the same window as the error titled ‘Log’ and copy its content here? What version of eM Client are you using?

Thank you,
Maurice

I couldn’t find the error noted in the error log anywhere.  It came up under operations–>errors, but wasn’t added to the log for some reason.  The logs appear normal.

The version I have is: 7.0.27943.0

Hello Greg,

We’re sorry but we need more details to see what’s going on. Could you please take a screenshot and copy the whole content of the Log tab the next time this error happens?

Thank you,
Maurice

Yes, I can do that!

Thank you for responding.

Hello Greg,

Thank you. When it happens again, please also try to remember the circumstances so we can try to reproduce the issue if necessary.

Regards,
Maurice

I’m having the same problem here. Repeats regularly and fairly consistently, maybe once every few hours or every bootup - I haven’t had the chance to check. Full stack trace follows, current address omitted for security purposes.

The Exchange calendar in question does not seem to receive ANY entries successfully. All else works, my second account calendar (gmail) works as well.

10:21:08 PM user@domain.com [Exchange Web Services]  Synchronizing folder 'user@domain.com/Calendar/'
10:21:19 PM user@domain.com [Exchange Web Services]  MailClient.Accounts.ConnectionException: An item with the same key has already been added. ---\> System.ArgumentException: An item with the same key has already been added.
10:21:19 PM    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
10:21:19 PM    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.TimeZoneDefinition.TryReadElementFromXml(EwsServiceXmlReader reader)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func`2 readAction)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.TimeZonePropertyDefinition.LoadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet requestedPropertySet, Boolean onlySummaryPropertiesRequested)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.EwsServiceXmlReader.ReadServiceObjectsCollectionFromXml[TServiceObject](XmlNamespace collectionXmlNamespace, String collectionXmlElementName, GetObjectInstanceDelegate`1 getObjectInstanceDelegate, Boolean clearPropertyBag, PropertySet requestedPropertySet, Boolean summaryPropertiesOnly)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.GetItemResponse.ReadElementsFromXml(EwsServiceXmlReader reader)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.ServiceResponse.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.ParseResponse(EwsServiceXmlReader reader)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponseXml(Stream responseStream)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalLoadPropertiesForItems(IEnumerable`1 items, PropertySet propertySet, ServiceErrorHandling errorHandling)
10:21:19 PM    at Microsoft.Exchange.WebServices.Data.ExchangeService.LoadPropertiesForItems(IEnumerable`1 items, PropertySet propertySet)
10:21:19 PM &nbsp; &nbsp;at MailClient.Protocols.Exchange.ExchangeItemSynchronizer`2.<changestoitems>d__18.MoveNext()<br>10:21:19 PM    at System.Linq.Enumerable.<selectmanyyield>d__20`3.MoveNext()<br>10:21:19 PM    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)<br>10:21:19 PM    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)<br>10:21:19 PM    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)<br>10:21:19 PM    at MailClient.Protocols.Common.ScheduleItemSynchronizeContext`1.StoreItems(SynchronizationType type, IEnumerable`1 newItems)<br>10:21:19 PM    at MailClient.Protocols.Common.ItemSynchronizeContext`2.Synchronize[T](SynchronizationType synchronizationType, IEnumerable`1 items, Func`2 getUniqueId, Func`3 hasChanged, Func`2 isDeleted, Func`2 convertItems, Action`2 updateItem)<br>10:21:19 PM    at MailClient.Protocols.Exchange.ExchangeItemSynchronizer`2.Synchronize(IItemSynchronizeContext`1 synchronizeContext, Folder folder, CancellationToken cancellationToken)<br>10:21:19 PM    at MailClient.Protocols.Common.ItemSynchronizer`2.&lt;&gt;c __DisplayClass28_0.<enqueuesynchronize>b__ 1(WorkerStatus status, CancellationToken cancellationToken)<br>10:21:19 PM    at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)<br>10:21:19 PM    --- End of inner exception stack trace ---<br>10:21:19 PM    at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)<br>10:21:19 PM    at MailClient.Commands.Command.Process(WorkerStatus status)</enqueuesynchronize></selectmanyyield></changestoitems>

I believe this is happening when two meetings overlap each other.  It doesn’t seem like eM Client can handle this situation.

Hello everybody,

Thank you for the details. This error pops up when a recurring event is moved in a way that overlaps with another of it’s instances and it is unfortunately caused by a limitation of the Exchange Web Services protocol.

Regards,
Maurice

Does this mean you won’t be trying to address it? Other clients I’ve used can handle this situation. This issue is currently blocking me from going past the trial.

Thanks

A fault of the protocol (no surprise there, M$…) or not, the client MUST wrap the library and catch the exception. The LAST thing I’d want to see is error popups every few minutes. This is plain old shoddy code. Exchange has no problems with this issue, why do you?

[Exchange Web Services]  MailClient.Accounts.ConnectionException: An item with the same key has already been added. —> System.ArgumentException: An item with the same key has already been added.
9:31:49    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
9:31:49    at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) 9:31:49 &nbsp; &nbsp;at Microsoft.Exchange.WebServices.Data.TimeZoneDefinition.TryReadElementFromXml(EwsServiceXmlReader reader) 9:31:49 &nbsp; &nbsp;at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func2 readAction)
9:31:49    at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
9:31:49    at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
9:31:49    at Microsoft.Exchange.WebServices.Data.TimeZonePropertyDefinition.LoadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
9:31:49    at Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet requestedPropertySet, Boolean onlySummaryPropertiesRequested)
9:31:49    at Microsoft.Exchange.WebServices.Data.EwsServiceXmlReader.ReadServiceObjectsCollectionFromXml[TServiceObject](XmlNamespace collectionXmlNamespace, String collectionXmlElementName, GetObjectInstanceDelegate1 getObjectInstanceDelegate, Boolean clearPropertyBag, PropertySet requestedPropertySet, Boolean summaryPropertiesOnly) 9:31:49 &nbsp; &nbsp;at Microsoft.Exchange.WebServices.Data.GetItemResponse.ReadElementsFromXml(EwsServiceXmlReader reader) 9:31:49 &nbsp; &nbsp;at Microsoft.Exchange.WebServices.Data.ServiceResponse.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName) 9:31:49 &nbsp; &nbsp;at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.ParseResponse(EwsServiceXmlReader reader)
9:31:49    at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader)
9:31:49    at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponseXml(Stream responseStream)
9:31:49    at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response)
9:31:49    at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() 9:31:49 &nbsp; &nbsp;at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalLoadPropertiesForItems(IEnumerable1 items, PropertySet propertySet, ServiceErrorHandling errorHandling)
9:31:49    at Microsoft.Exchange.WebServices.Data.ExchangeService.LoadPropertiesForItems(IEnumerable1 items, PropertySet propertySet) 9:31:49 &nbsp; &nbsp;at MailClient.Protocols.Exchange.ExchangeItemSynchronizer2.d__18.MoveNext()
9:31:49 at System.Linq.Enumerable.d__203.MoveNext()<br>9:31:49 at System.Collections.Generic.List1…ctor(IEnumerable1 collection)<br>9:31:49 at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
9:31:49 at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)<br>9:31:49 at MailClient.Protocols.Common.ScheduleItemSynchronizeContext1.StoreItems(SynchronizationType type, IEnumerable1 newItems)<br>9:31:49 at MailClient.Protocols.Common.ItemSynchronizeContext2.Synchronize[T](SynchronizationType synchronizationType, IEnumerable1 items, Func2 getUniqueId, Func3 hasChanged, Func2 isDeleted, Func2 convertItems, Action2 updateItem)
9:31:49 at MailClient.Protocols.Exchange.ExchangeItemSynchronizer2.Synchronize(IItemSynchronizeContext1 synchronizeContext, Folder folder, CancellationToken cancellationToken)
9:31:49 at MailClient.Protocols.Common.ItemSynchronizer`2.<>c DisplayClass32_0.b 1(WorkerStatus status, CancellationToken cancellationToken)
9:31:49 at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)
9:31:49 — End of inner exception stack trace —
9:31:49 at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)
9:31:49 at MailClient.Commands.Command.Process(WorkerStatus status)

Any solution to this yet? At minimum, a way to see which events are being problematic? This is the one thing holding me back from enjoying eM Client in all of its splendor!