[GH-ISSUE #99] System.Runtime.InteropServices.COMException (0x80020009) #996

Closed
opened 2026-03-13 23:44:54 +03:00 by kerem · 13 comments
Owner

Originally created by @maybeec on GitHub (Jan 11, 2016).
Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/99

Hi, I recently observed the following exception:

<?xml version="1.0" encoding="utf-16"?>
<SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ProfileName>CalDAV private</ProfileName>
  <ProfileId>31b1199f-ef4b-42f8-b097-d0c77e9e6555</ProfileId>
  <StartTime>2016-01-11T17:09:32.8021272Z</StartTime>
  <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed>
  <ADelta>Unchanged: 18 , Added: 0 , Deleted 0 ,  Changed 0</ADelta>
  <BDelta>Unchanged: 17 , Added: 0 , Deleted 0 ,  Changed 1</BDelta>
  <LoadErrors />
  <EntitySynchronizationReports>
    <EntitySynchronizationReport>
      <MappingErrors />
      <AId>00000000D3D6D0F60E35EE439CC9661E8955F4350700D5F51D5EB4726A429ECB10319FE9CEEE0026C0819CB20000D5F51D5EB4726A429ECB10319FE9CEEE0026C08268140000</AId>
      <BId>XXXX</BId>
      <ExceptionThatLeadToAbortion>System.Runtime.InteropServices.COMException (0x80020009): Sie müssen in die Felder "An", "Cc" oder "Bcc" mindestens einen Namen oder eine Kontaktgruppe eingeben.
   at Microsoft.Office.Interop.Outlook.Recipients.Add(String Name)
   at CalDavSynchronizer.Implementation.Events.EventEntityMapper.MapAttendeesAndOrganizer2To1(IEvent source, AppointmentItem target)
   at CalDavSynchronizer.Implementation.Events.EventEntityMapper.Map2To1(IEvent source, IReadOnlyCollection`1 recurrenceExceptionsOrNull, AppointmentItemWrapper targetWrapper, Boolean isRecurrenceException)
   at CalDavSynchronizer.Implementation.Events.EventEntityMapper.Map2To1(IICalendar sourceCalendar, AppointmentItemWrapper target, IEntityMappingLogger logger)
   at GenSync.Synchronization.States.UpdateBToA`6.&lt;&gt;c__DisplayClass2.&lt;PerformSyncActionNoThrow&gt;b__0(TAtypeEntity a)
   at CalDavSynchronizer.Implementation.Events.OutlookEventRepository.Update(String entityId, DateTime entityVersion, AppointmentItemWrapper entityToUpdate, Func`2 entityModifier)
   at GenSync.Synchronization.States.UpdateBToA`6.&lt;PerformSyncActionNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion>
    </EntitySynchronizationReport>
  </EntitySynchronizationReports>
  <Duration>00:00:01.7371737</Duration>
</SynchronizationReport>

I read the message Sie müssen in die Felder "An", "Cc" oder "Bcc" mindestens einen Namen oder eine Kontaktgruppe eingeben., but I cannot interprete it sufficiently. Can I see which calendar entry causes this error?

Originally created by @maybeec on GitHub (Jan 11, 2016). Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/99 Hi, I recently observed the following exception: ``` xml <?xml version="1.0" encoding="utf-16"?> <SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ProfileName>CalDAV private</ProfileName> <ProfileId>31b1199f-ef4b-42f8-b097-d0c77e9e6555</ProfileId> <StartTime>2016-01-11T17:09:32.8021272Z</StartTime> <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed> <ADelta>Unchanged: 18 , Added: 0 , Deleted 0 , Changed 0</ADelta> <BDelta>Unchanged: 17 , Added: 0 , Deleted 0 , Changed 1</BDelta> <LoadErrors /> <EntitySynchronizationReports> <EntitySynchronizationReport> <MappingErrors /> <AId>00000000D3D6D0F60E35EE439CC9661E8955F4350700D5F51D5EB4726A429ECB10319FE9CEEE0026C0819CB20000D5F51D5EB4726A429ECB10319FE9CEEE0026C08268140000</AId> <BId>XXXX</BId> <ExceptionThatLeadToAbortion>System.Runtime.InteropServices.COMException (0x80020009): Sie müssen in die Felder "An", "Cc" oder "Bcc" mindestens einen Namen oder eine Kontaktgruppe eingeben. at Microsoft.Office.Interop.Outlook.Recipients.Add(String Name) at CalDavSynchronizer.Implementation.Events.EventEntityMapper.MapAttendeesAndOrganizer2To1(IEvent source, AppointmentItem target) at CalDavSynchronizer.Implementation.Events.EventEntityMapper.Map2To1(IEvent source, IReadOnlyCollection`1 recurrenceExceptionsOrNull, AppointmentItemWrapper targetWrapper, Boolean isRecurrenceException) at CalDavSynchronizer.Implementation.Events.EventEntityMapper.Map2To1(IICalendar sourceCalendar, AppointmentItemWrapper target, IEntityMappingLogger logger) at GenSync.Synchronization.States.UpdateBToA`6.&lt;&gt;c__DisplayClass2.&lt;PerformSyncActionNoThrow&gt;b__0(TAtypeEntity a) at CalDavSynchronizer.Implementation.Events.OutlookEventRepository.Update(String entityId, DateTime entityVersion, AppointmentItemWrapper entityToUpdate, Func`2 entityModifier) at GenSync.Synchronization.States.UpdateBToA`6.&lt;PerformSyncActionNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion> </EntitySynchronizationReport> </EntitySynchronizationReports> <Duration>00:00:01.7371737</Duration> </SynchronizationReport> ``` I read the message `Sie müssen in die Felder "An", "Cc" oder "Bcc" mindestens einen Namen oder eine Kontaktgruppe eingeben.`, but I cannot interprete it sufficiently. Can I see which calendar entry causes this error?
kerem closed this issue 2026-03-13 23:45:00 +03:00
Author
Owner

@aluxnimm commented on GitHub (Jan 11, 2016):

Some invalid recipient or organizer data.
You are using owncloud right?
You should be able to download the ics with the server url combined with the path in XXXX in your error report. Please post the ics file.

<!-- gh-comment-id:170654363 --> @aluxnimm commented on GitHub (Jan 11, 2016): Some invalid recipient or organizer data. You are using owncloud right? You should be able to download the ics with the server url combined with the path in <BId>XXXX</BId> in your error report. Please post the ics file.
Author
Owner

@maybeec commented on GitHub (Jan 11, 2016):

Yes, you are right, I am using the Owncloud 8.2.2.
Here the ics file. I just replaced alpha numeric characters with X and 9. As a hint. The summary also contains german umlauts.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Roundcube//Roundcube libcalendaring 1.1.4//Sabre//Sabre VObject 2
 .1.0//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:cbaca783-276a-47bc-b788-c898c91ee29d
DTSTAMP;VALUE=DATE-TIME:20160111T133550Z
CREATED;VALUE=DATE-TIME:20160105T175852Z
LAST-MODIFIED;VALUE=DATE-TIME:20160111T133549Z
DTSTART;VALUE=DATE-TIME;TZID=Europe/Berlin:20160111T130000
DTEND;VALUE=DATE-TIME;TZID=Europe/Berlin:20160111T140000
SUMMARY:XXXXXXXXXX XXXXXXXXXX XXXXX XXXXXXXXXX!!
LOCATION:XXXXXXXX 99, XXXXXXXXXXXXXXXX
DESCRIPTION:XXX/XXX/XXX-XXX\n9999 99 99 999
TRANSP:OPAQUE
STATUS:TENTATIVE
CLASS:PRIVATE
ATTENDEE;CN=XXXXXXX\, XXXXX;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT:mailto
 :XXXX.XXXX@XXXX.XXXX
ORGANIZER;CN=:mailto:OwnCloud%20Kalender
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-PT30M
END:VALARM
END:VEVENT
END:VCALENDAR
<!-- gh-comment-id:170657470 --> @maybeec commented on GitHub (Jan 11, 2016): Yes, you are right, I am using the Owncloud 8.2.2. Here the ics file. I just replaced alpha numeric characters with X and 9. As a hint. The summary also contains german umlauts. ``` BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Roundcube//Roundcube libcalendaring 1.1.4//Sabre//Sabre VObject 2 .1.0//EN CALSCALE:GREGORIAN BEGIN:VEVENT UID:cbaca783-276a-47bc-b788-c898c91ee29d DTSTAMP;VALUE=DATE-TIME:20160111T133550Z CREATED;VALUE=DATE-TIME:20160105T175852Z LAST-MODIFIED;VALUE=DATE-TIME:20160111T133549Z DTSTART;VALUE=DATE-TIME;TZID=Europe/Berlin:20160111T130000 DTEND;VALUE=DATE-TIME;TZID=Europe/Berlin:20160111T140000 SUMMARY:XXXXXXXXXX XXXXXXXXXX XXXXX XXXXXXXXXX!! LOCATION:XXXXXXXX 99, XXXXXXXXXXXXXXXX DESCRIPTION:XXX/XXX/XXX-XXX\n9999 99 99 999 TRANSP:OPAQUE STATUS:TENTATIVE CLASS:PRIVATE ATTENDEE;CN=XXXXXXX\, XXXXX;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT:mailto :XXXX.XXXX@XXXX.XXXX ORGANIZER;CN=:mailto:OwnCloud%20Kalender BEGIN:VALARM ACTION:DISPLAY TRIGGER:-PT30M END:VALARM END:VEVENT END:VCALENDAR ```
Author
Owner

@aluxnimm commented on GitHub (Jan 11, 2016):

Summary doesn't matter.
ORGANIZER;CN=:mailto:OwnCloud%20Kalender ??? that is no valid email and no cn or you changed that part too?

<!-- gh-comment-id:170660115 --> @aluxnimm commented on GitHub (Jan 11, 2016): Summary doesn't matter. ORGANIZER;CN=:mailto:OwnCloud%20Kalender ??? that is no valid email and no cn or you changed that part too?
Author
Owner

@maybeec commented on GitHub (Jan 11, 2016):

No, I did not changed it.
I already observed this issue. It is somehow changed by any other sync client on a mobile phone or touchpad for example. If this is the pointer, I have to investigate which tool causes this change.
You are sure, that Outlook CalDAV Synchronizer is not the cause for this? Than I can investigate into a different direction. Maybe even Owncloud causes this issue.

<!-- gh-comment-id:170661540 --> @maybeec commented on GitHub (Jan 11, 2016): No, I did not changed it. I already observed this issue. It is somehow changed by any other sync client on a mobile phone or touchpad for example. If this is the pointer, I have to investigate which tool causes this change. You are sure, that Outlook CalDAV Synchronizer is not the cause for this? Than I can investigate into a different direction. Maybe even Owncloud causes this issue.
Author
Owner

@maybeec commented on GitHub (Jan 11, 2016):

Or is the PRODID the identifier of the last client changing the appointment? That would make finding the errorneous software more easier 🎯

<!-- gh-comment-id:170661797 --> @maybeec commented on GitHub (Jan 11, 2016): Or is the PRODID the identifier of the last client changing the appointment? That would make finding the errorneous software more easier :dart:
Author
Owner

@aluxnimm commented on GitHub (Jan 11, 2016):

Yes roundcube :)
Well but we shouldn't cause a COM Exception either but ignore the wrong organizer, will test it and fix the issue from our side.

<!-- gh-comment-id:170665138 --> @aluxnimm commented on GitHub (Jan 11, 2016): Yes roundcube :) Well but we shouldn't cause a COM Exception either but ignore the wrong organizer, will test it and fix the issue from our side.
Author
Owner

@maybeec commented on GitHub (Jan 11, 2016):

Ok, thanks.
Nevertheless, I deactivated the roundcube caldav extension to prevent it from destroying further future appointments as well.
The bad about this change is also, that Outlook will not allow to change your appointments anymore :(

<!-- gh-comment-id:170666482 --> @maybeec commented on GitHub (Jan 11, 2016): Ok, thanks. Nevertheless, I deactivated the roundcube caldav extension to prevent it from destroying further future appointments as well. The bad about this change is also, that Outlook will not allow to change your appointments anymore :(
Author
Owner

@aluxnimm commented on GitHub (Jan 11, 2016):

fixed in latest commit, if no valid mailto and no cn is present, organizer is skipped,

<!-- gh-comment-id:170683796 --> @aluxnimm commented on GitHub (Jan 11, 2016): fixed in latest commit, if no valid mailto and no cn is present, organizer is skipped,
Author
Owner

@maybeec commented on GitHub (Jan 11, 2016):

👍 thanks!

<!-- gh-comment-id:170693550 --> @maybeec commented on GitHub (Jan 11, 2016): :+1: thanks!
Author
Owner

@aluxnimm commented on GitHub (Jan 12, 2016):

fixed in 1.14.0

<!-- gh-comment-id:171069889 --> @aluxnimm commented on GitHub (Jan 12, 2016): fixed in 1.14.0
Author
Owner

@maybeec commented on GitHub (Jan 13, 2016):

Thanks, but now I got the following issue :)
Any Idea? I had a look at the server logs, but found nothing of interest.

<?xml version="1.0" encoding="utf-16"?>
<SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ProfileName>CalDAV</ProfileName>
  <ProfileId>4664dc15-b502-4591-9c6c-ce98ca8d7dca</ProfileId>
  <StartTime>2016-01-13T10:14:01.7975925Z</StartTime>
  <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed>
  <LoadErrors />
  <EntitySynchronizationReports />
  <ExceptionThatLeadToAbortion>System.Net.Http.HttpRequestException: Response status code does not indicate success: '500' ('InternalServerError'). Message:
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"&gt;
  &lt;s:sabredav-version&gt;2.1.7&lt;/s:sabredav-version&gt;
  &lt;s:exception&gt;InvalidArgumentException&lt;/s:exception&gt;
  &lt;s:message&gt;INTERVAL in RRULE must be a positive integer!&lt;/s:message&gt;
&lt;/d:error&gt;

   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;EnsureSuccessStatusCode&gt;d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequest&gt;d__a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetEntities&gt;d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GenSync.Synchronization.Synchronizer`6.&lt;SynchronizeNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion>
  <Duration>00:00:02.9932993</Duration>
</SynchronizationReport>
<!-- gh-comment-id:171302792 --> @maybeec commented on GitHub (Jan 13, 2016): Thanks, but now I got the following issue :) Any Idea? I had a look at the server logs, but found nothing of interest. ``` xml <?xml version="1.0" encoding="utf-16"?> <SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ProfileName>CalDAV</ProfileName> <ProfileId>4664dc15-b502-4591-9c6c-ce98ca8d7dca</ProfileId> <StartTime>2016-01-13T10:14:01.7975925Z</StartTime> <InitialEntityMatchingPerformed>false</InitialEntityMatchingPerformed> <LoadErrors /> <EntitySynchronizationReports /> <ExceptionThatLeadToAbortion>System.Net.Http.HttpRequestException: Response status code does not indicate success: '500' ('InternalServerError'). Message: &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"&gt; &lt;s:sabredav-version&gt;2.1.7&lt;/s:sabredav-version&gt; &lt;s:exception&gt;InvalidArgumentException&lt;/s:exception&gt; &lt;s:message&gt;INTERVAL in RRULE must be a positive integer!&lt;/s:message&gt; &lt;/d:error&gt; at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;EnsureSuccessStatusCode&gt;d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequest&gt;d__a.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetEntities&gt;d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GenSync.Synchronization.Synchronizer`6.&lt;SynchronizeNoThrow&gt;d__4.MoveNext()</ExceptionThatLeadToAbortion> <Duration>00:00:02.9932993</Duration> </SynchronizationReport> ```
Author
Owner

@maybeec commented on GitHub (Jan 13, 2016):

Maybe also an owncloud issue, I will investigate on that in some spare time.

<!-- gh-comment-id:171309630 --> @maybeec commented on GitHub (Jan 13, 2016): Maybe also an owncloud issue, I will investigate on that in some spare time.
Author
Owner

@aluxnimm commented on GitHub (Jan 13, 2016):

There must be some event in Owncloud with invalid INTERVAL in a recurrence rule.
I found an issue with the Outlook Obejct Model that sets INTERVAL=0 for appointments with all workday recurrence, and we export it as
RRULE:FREQ=WEEKLY;INTERVAL=0;BYDAY=MO,TU,WE,TH,FR which should be INTERVAL=1 of course. Will fix that.

Maybe related to #58 and the referenced events there

<!-- gh-comment-id:171366730 --> @aluxnimm commented on GitHub (Jan 13, 2016): There must be some event in Owncloud with invalid INTERVAL in a recurrence rule. I found an issue with the Outlook Obejct Model that sets INTERVAL=0 for appointments with all workday recurrence, and we export it as RRULE:FREQ=WEEKLY;INTERVAL=0;BYDAY=MO,TU,WE,TH,FR which should be INTERVAL=1 of course. Will fix that. Maybe related to #58 and the referenced events there
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/outlookcaldavsynchronizer#996
No description provided.