Gmail Calendar failed "Unable to cast object of type 'System.DateTime' to type 'System.String'"

Error log each time I start eM Client:

[email protected]/Calendar' failed due to the following error: Unable to cast object of type 'System.DateTime' to type 'System.String'.

I’ve tried deleting and re-adding the account. I’ve also cleared all permissions on Google then granted them again.

Full log:

18:21:13 [email protected] [Google Calendar] MailClient.Storage.Application.OperationException: Synchronizing folder '[email protected]/Calendar' failed due to the following error: Unable to cast object of type 'System.DateTime' to type 'System.String'.
          ---> System.InvalidCastException: Unable to cast object of type 'System.DateTime' to type 'System.String'.
            at MailClient.Protocols.Gdata.EventConvert.ConvertEvent(Folder folder, Event evnt, TimeZoneInfo defaultTimezone)
            at MailClient.Protocols.Gdata.CalendarItemSynchronizer.EventsToItems(Folder folder, IEnumerable`1 events, String defaultTimezoneName)+MoveNext()
            at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
            at MailClient.Protocols.Common.ItemSynchronizeContext`2.<>c__DisplayClass22_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.Gdata.CalendarItemSynchronizer.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.Gdata.GenericGapiCommand.Execute(WorkerStatus status)
            --- End of inner exception stack trace ---1

Version = 10.3.1524 - latest version of Windows 11, no third party anit-virus / firewalls

3 Likes

I also encountered this issue with my Google Calendar after upgrading. Please help.

I’m getting this too since updating.

I’m getting the same error after updating to 10.3.1524.

the same to me.
i have no solution.
Its wir workspace only. not with privat gmail accounts.

The client is not usable for me with this error.

Hi everyone, we will need Google Calendar log to analyze this issue.

Please go to Menu>Settings>Advanced
Enable Google calendar log for the affected account
Click “Save & Close”
Restart eM Client
Wait for the error to happen again
Go back to Advanced settings and click ‘Send logs’ - this will prepare a new message with the log files attached.
Please add a link to this forum post or description of the error to the message so we can get the context for the logs and send it.

Thank you for your cooperation.

Similar issue on my end but the error msg is

[Google Calendar] Synchronizing folder '###USERNAME###/Calendar' failed due to the following error: Unable to cast object of type 'System.Guid' to type 'System.String'.

Same error msg here. Renders calendar unusable through eM Client. Occurred after update to v10.3.1503. I too deleted and re-added the account, clearing all Google permissions for eM Client and re-granted them. I uninstalled and rolled back to v10.1.4588 and problem gone. Definitely something in the new versions. Reluctant to update until this frustrating error is sorted.

Sorry, i have already deleted the software.

All other clients have no issues with google calendar.

I have already deleted the software and stepped back from buying. I am not a Bug finder.

Sorry Olivia, I cannot send the log file to you because it contains a LOT of my personal information. I am sending the internal exception captured in the log instead.

It seems we were able to address the issue and hotfix will be ready soon (hopefully during today).

1 Like

Hello,
This is becoming urgent…
Did you fix the issue ?

Thanks

Yes, we’ve fixed the issue. The build is now being tested and in 1-2 hours I expect, I’ll be able to provide you a link with the fix.

May I ask, do you use some 3rd party app with Gmail calendar? Because it seems it is caused by syncing some extended property, that is not included in normal standard calendar events (that is the reason why it slipped through our testing.

The fix is ready:

Windows
https://www.emclient.com/dist/v10.3.1567/setup.msi

Mac
https://www.emclient.com/dist/v10.3.1567_Mac/setup.pkg

3 Likes

Thank you, Michal. It’s great to see the developers working on rapid updates!

My employer has pushed ahead with updates on the machines, so my desktop that was on macOS 15.3 is now on macOS 15.4. The eM Client version on this machine is still 10.1.4828. Would you recommend remaining on this version until Apple addresses the bug, or updating to 10.3.1567?

As far as we know now, it seems the crash happens even on 10.1 when 15.4 macOS is installed. It is probably just a coincidence, that the issue is reported mainly from version 10.3, but we are still investigating the issue and looking for some alternative solution. We understand this is a major problem and we can’t rely on Apple that the fix is released soon.

But now we are talking about a different issue than this thread is all about. This sync issue is now fixed for both Windows and Mac.

Ah, OK, so it sounds like it is fine to install 10.3.1567 anyway.

Yes, I appreciate that you’re looking into this quickly and that is must be frustrating for the team when the OS update has introduced a headache. Hopefully Apple will tackle it soon, even as a minor patch if needed.