[GH-ISSUE #44] multiple syncs cause doubling of events #507

Closed
opened 2026-03-01 17:39:25 +03:00 by kerem · 21 comments
Owner

Originally created by @aluxnimm on GitHub (Jun 24, 2015).
Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/44

Originally assigned to: @aluxnimm on GitHub.

Please import the attached ics file into Outlook. Sync the calendar to the server (mode: manually). If you do this three times, the event is doubled.

Original comment by: mawinkler

Original Ticket: outlookcaldavsynchronizer/42

Originally created by @aluxnimm on GitHub (Jun 24, 2015). Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/44 Originally assigned to: @aluxnimm on GitHub. Please import the attached ics file into Outlook. Sync the calendar to the server (mode: manually). If you do this three times, the event is doubled. Original comment by: mawinkler Original Ticket: [outlookcaldavsynchronizer/42](https://sourceforge.net/p/outlookcaldavsynchronizer/42)
kerem 2026-03-01 17:39:25 +03:00
Author
Owner

@aluxnimm commented on GitHub (Jun 25, 2015):

Can't reproduce with my setup. Which server do you use? Please provide your sync log and config.

Original comment by: aluxnimm

<!-- gh-comment-id:126313046 --> @aluxnimm commented on GitHub (Jun 25, 2015): Can't reproduce with my setup. Which server do you use? Please provide your sync log and config. Original comment by: aluxnimm
Author
Owner

@aluxnimm commented on GitHub (Jun 25, 2015):

Thanks for looking into it. I am using GroupOffice (with sabreDAV library). I will provide you with all the necessary informations when I am back in the office again (8. July).

Original comment by: mawinkler

<!-- gh-comment-id:126313047 --> @aluxnimm commented on GitHub (Jun 25, 2015): Thanks for looking into it. I am using GroupOffice (with sabreDAV library). I will provide you with all the necessary informations when I am back in the office again (8. July). Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

The behavior changed with version 0.99.1
When syncing the first time, everything is ok.
When I do the 2nd sync, the exception at 2015-03-11 disappears in Outlook. I can find the following error in the log file:

"Can't find occurence of exception
System.Runtime.InteropServices.COMException (0x80020009): Dieses Element kann nicht gespeichert werden."

Attached you will find a recording of the sync session and the complete log file.

Steps to reproduce:

  1. I import the ics file "recurring-events.ics" into Outlook.
  2. I sync it to GroupOffice manually.
  3. I sync to GroupOffice again -> The exception at 2015-03-11 disappears in Outlook

Original comment by: mawinkler

<!-- gh-comment-id:126313048 --> @aluxnimm commented on GitHub (Jul 13, 2015): The behavior changed with version 0.99.1 When syncing the first time, everything is ok. When I do the 2nd sync, the exception at 2015-03-11 disappears in Outlook. I can find the following error in the log file: "Can't find occurence of exception System.Runtime.InteropServices.COMException (0x80020009): Dieses Element kann nicht gespeichert werden." Attached you will find a recording of the sync session and the complete log file. Steps to reproduce: 1. I import the ics file "recurring-events.ics" into Outlook. 2. I sync it to GroupOffice manually. 3. I sync to GroupOffice again -> The exception at 2015-03-11 disappears in Outlook Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

here is the recording of the http traffic.

Original comment by: mawinkler

<!-- gh-comment-id:126313049 --> @aluxnimm commented on GitHub (Jul 13, 2015): here is the recording of the http traffic. Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

Still can't reproduce with SOGo. In GroupOffice the exception is still there and the event looks correct if you manually export it from there after 2nd sync?

Original comment by: aluxnimm

<!-- gh-comment-id:126313051 --> @aluxnimm commented on GitHub (Jul 13, 2015): Still can't reproduce with SOGo. In GroupOffice the exception is still there and the event looks correct if you manually export it from there after 2nd sync? Original comment by: aluxnimm
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

Yes, in GroupOffice (GO), the calendar is ok, even after the 2nd sync.
I think, Caldavsynchronizer handles the sync to sogo and GO in different ways:

When working with GO, it sends a PUT command, then it gets a 201 reply (without an etag). Finally it requests the calendar again with a GET command.

PUT /caldav/calendars/alf.kurz%40th-deg.de/privat-569/a62ecf6c-2ae6-4b8a-9941-68ecd4298ff9.ics HTTP/1.1

GroupOffice replies:

HTTP/1.1 201 Created
Date: Mon, 13 Jul 2015 10:26:28 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.41-0+deb7u1
Content-Length: 0
Vary: Accept-Encoding
Content-Type: text/html

GET /caldav/calendars/alf.kurz%40th-deg.de/privat-569/a62ecf6c-2ae6-4b8a-9941-68ecd4298ff9.ics HTTP/1.1

Working with sogo, it sends a PUT command too. Sogo replies with 201 and an etag. Then Caldavsynchronizer asks for a REPORT.

PUT /SOGo/dav/sogo1/Calendar/personal/bb967903-916d-4a1e-83d0-4c666df5f399.ics HTTP/1.1

Sogo replies:

HTTP/1.1 201 Created
Date: Mon, 13 Jul 2015 12:07:26 GMT
Sogo-Request-Duration: 0.024238
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
ETag: "gcs00000000"
Vary: Accept-Encoding

REPORT /SOGo/dav/sogo1/Calendar/personal/ HTTP/1.1

Original comment by: mawinkler

<!-- gh-comment-id:126313052 --> @aluxnimm commented on GitHub (Jul 13, 2015): Yes, in GroupOffice (GO), the calendar is ok, even after the 2nd sync. I think, Caldavsynchronizer handles the sync to sogo and GO in different ways: When working with GO, it sends a PUT command, then it gets a 201 reply (without an etag). Finally it requests the calendar again with a GET command. PUT /caldav/calendars/alf.kurz%40th-deg.de/privat-569/a62ecf6c-2ae6-4b8a-9941-68ecd4298ff9.ics HTTP/1.1 GroupOffice replies: HTTP/1.1 201 Created Date: Mon, 13 Jul 2015 10:26:28 GMT Server: Apache/2.2.22 (Debian) X-Powered-By: PHP/5.4.41-0+deb7u1 Content-Length: 0 Vary: Accept-Encoding Content-Type: text/html GET /caldav/calendars/alf.kurz%40th-deg.de/privat-569/a62ecf6c-2ae6-4b8a-9941-68ecd4298ff9.ics HTTP/1.1 Working with sogo, it sends a PUT command too. Sogo replies with 201 and an etag. Then Caldavsynchronizer asks for a REPORT. PUT /SOGo/dav/sogo1/Calendar/personal/bb967903-916d-4a1e-83d0-4c666df5f399.ics HTTP/1.1 Sogo replies: HTTP/1.1 201 Created Date: Mon, 13 Jul 2015 12:07:26 GMT Sogo-Request-Duration: 0.024238 Content-Length: 0 Content-Type: text/plain; charset=UTF-8 ETag: "gcs00000000" Vary: Accept-Encoding REPORT /SOGo/dav/sogo1/Calendar/personal/ HTTP/1.1 Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

I can reproduce the Bug.
With Sogo it can be reproduced in the following way:

  • import the ics file "recurring-events.ics" into Outlook.
  • Run a sync manually.
  • Change the Title in Sogo (for all accurences)
  • Run a sync again => ERROR

The Bug seems to be a result of a strange behavior/wrong usage of the Outlook-Appointment-Exception-COM-Object.

Furthermore I can see in the LogFile is, that one Event was deleted and another one was created (see logline 15).
If the deleted one and the newly created one are logically the same, then there must be somewhere a mismatch of ids, which might indicate another issue.

Please turn on the Debug log, by setting the level of the root logger to 'DEBUG' (in CalDavSynchronizer.dll.config line 26 ), retry it and post the logile.
To find the the config file see the readme.md in the Download Section ( default is 'C:\Program Files (x86)\Gerhard Zehetbauer\CalDavSynchronizer')

br
Gerhard

Original comment by: nertsch

<!-- gh-comment-id:126313053 --> @aluxnimm commented on GitHub (Jul 13, 2015): I can reproduce the Bug. With Sogo it can be reproduced in the following way: - import the ics file "recurring-events.ics" into Outlook. - Run a sync manually. - Change the Title in Sogo (for all accurences) - Run a sync again => ERROR The Bug seems to be a result of a strange behavior/wrong usage of the Outlook-Appointment-Exception-COM-Object. Furthermore I can see in the LogFile is, that one Event was deleted and another one was created (see logline 15). If the deleted one and the newly created one are logically the same, then there must be somewhere a mismatch of ids, which might indicate another issue. Please turn on the Debug log, by setting the level of the root logger to 'DEBUG' (in CalDavSynchronizer.dll.config line 26 ), retry it and post the logile. To find the the config file see the readme.md in the Download Section ( default is 'C:\Program Files (x86)\Gerhard Zehetbauer\CalDavSynchronizer') br Gerhard Original comment by: nertsch
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

Hi Gerhard,

thanks for the info. I turned on the debug level in the config file (CalDavSynchronizer.dll.config):

but I do not get more informations then before. Did I something wrong?

Original comment by: mawinkler

<!-- gh-comment-id:126313054 --> @aluxnimm commented on GitHub (Jul 13, 2015): Hi Gerhard, thanks for the info. I turned on the debug level in the config file (CalDavSynchronizer.dll.config): <root> <!--<level value="DEBUG" />--> <level value="DEBUG" /> <appender-ref ref="MainLogAppender" /> </root> but I do not get more informations then before. Did I something wrong? Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

That seems OK.
Did you restart Outlook ?

Original comment by: nertsch

<!-- gh-comment-id:126313056 --> @aluxnimm commented on GitHub (Jul 13, 2015): That seems OK. Did you restart Outlook ? Original comment by: nertsch
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

Yes, I restarted Outlook.

Original comment by: mawinkler

<!-- gh-comment-id:126313058 --> @aluxnimm commented on GitHub (Jul 13, 2015): Yes, I restarted Outlook. Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

Please post the whole log4net configuration section.

Original comment by: nertsch

<!-- gh-comment-id:126313059 --> @aluxnimm commented on GitHub (Jul 13, 2015): Please post the whole log4net configuration section. Original comment by: nertsch
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

<root>
  <!--<level value="DEBUG" />-->
  <level value="DEBUG" />
  <appender-ref ref="MainLogAppender" />
</root>

<!--<appender name="CalDavAccessAppender" type="log4net.Appender.FileAppender">
  <file value="${LOCALAPPDATA}\CalDavSynchronizer\log_calDavAccess.txt" />
  <appendToFile value="true" />
  <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value=" %-5level %date [%thread] %40.40logger . %-30.30method - %message%newline" />
  </layout>
</appender>

<logger name="CalDavSynchronizer.DataAccess.CalDavDataAccess">
  <level value="DEBUG" />
  <appender-ref ref="CalDavAccessAppender" />
</logger>-->

Original comment by: mawinkler

<!-- gh-comment-id:126313061 --> @aluxnimm commented on GitHub (Jul 13, 2015): <log4net> <appender name="MainLogAppender" type="log4net.Appender.FileAppender"> <file value="${LOCALAPPDATA}\CalDavSynchronizer\log.txt" /> <appendToFile value="true" /> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value=" %-5level %date [%thread] %40.40logger . %-30.30method - %message%newline" /> </layout> </appender> ``` <root> <!--<level value="DEBUG" />--> <level value="DEBUG" /> <appender-ref ref="MainLogAppender" /> </root> <!--<appender name="CalDavAccessAppender" type="log4net.Appender.FileAppender"> <file value="${LOCALAPPDATA}\CalDavSynchronizer\log_calDavAccess.txt" /> <appendToFile value="true" /> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value=" %-5level %date [%thread] %40.40logger . %-30.30method - %message%newline" /> </layout> </appender> <logger name="CalDavSynchronizer.DataAccess.CalDavDataAccess"> <level value="DEBUG" /> <appender-ref ref="CalDavAccessAppender" /> </logger>--> ``` </log4net> Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

I tried the Config Section and it worked.
(In this case you should see loglines which start with 'DEBUG'.)

Are you sure that you edited the right config file and checked the right logfile ?
You can see the Path of the Plugin-dll, that Outlook uses under Options-Addins ( there should be CalDavSynchronizer in the List). The config file from this directory is used.

br
Gerhard

Original comment by: nertsch

<!-- gh-comment-id:126313063 --> @aluxnimm commented on GitHub (Jul 13, 2015): I tried the Config Section and it worked. (In this case you should see loglines which start with 'DEBUG'.) Are you sure that you edited the right config file and checked the right logfile ? You can see the Path of the Plugin-dll, that Outlook uses under Options-Addins ( there should be CalDavSynchronizer in the List). The config file from this directory is used. br Gerhard Original comment by: nertsch
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

sorry for the confusion! It works. There are lines starting with 'DEBUG'. The problem was that I did expect even more verbosity ...

Original comment by: mawinkler

<!-- gh-comment-id:126313065 --> @aluxnimm commented on GitHub (Jul 13, 2015): sorry for the confusion! It works. There are lines starting with 'DEBUG'. The problem was that I did expect even more verbosity ... Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 13, 2015):

Ok, if the logfile shows nothing suspicous, then you can turn DEBUG logging off again.

Original comment by: nertsch

<!-- gh-comment-id:126313067 --> @aluxnimm commented on GitHub (Jul 13, 2015): Ok, if the logfile shows nothing suspicous, then you can turn DEBUG logging off again. Original comment by: nertsch
Author
Owner

@aluxnimm commented on GitHub (Jul 14, 2015):

The problem is the ics import in Outlook itself. If I import the recurring-events.ics in SOGo and sync to Outlook, delete in SOGo and sync from Outlook to SOGo and do the steps Gerhard describes it syncs back to Outlook without the error.
If I manually create a similar event in Outlook it works aswell.
Further debugging shows that the Exceptions Collection in Outlook has the wrong Originaldate after the ics import and therefore we calculate the wrong RecurrenceID.

Original comment by: aluxnimm

<!-- gh-comment-id:126313069 --> @aluxnimm commented on GitHub (Jul 14, 2015): The problem is the ics import in Outlook itself. If I import the recurring-events.ics in SOGo and sync to Outlook, delete in SOGo and sync from Outlook to SOGo and do the steps Gerhard describes it syncs back to Outlook without the error. If I manually create a similar event in Outlook it works aswell. Further debugging shows that the Exceptions Collection in Outlook has the wrong Originaldate after the ics import and therefore we calculate the wrong RecurrenceID. Original comment by: aluxnimm
Author
Owner

@aluxnimm commented on GitHub (Jul 14, 2015):

So please try the latest fixes in 0.99.2 and import the ics via the server first.

Original comment by: aluxnimm

<!-- gh-comment-id:126313070 --> @aluxnimm commented on GitHub (Jul 14, 2015): So please try the latest fixes in 0.99.2 and import the ics via the server first. Original comment by: aluxnimm
Author
Owner

@aluxnimm commented on GitHub (Jul 15, 2015):

You are right. Obviously Outlook calculates a wrong recurrence-id.

before import:
RECURRENCE-ID;TZID=Europe/Berlin:20150310T083000

after import:
RECURRENCE-ID:20150217T073000Z

So I have to blame MS.

Original comment by: mawinkler

<!-- gh-comment-id:126313071 --> @aluxnimm commented on GitHub (Jul 15, 2015): You are right. Obviously Outlook calculates a wrong recurrence-id. before import: RECURRENCE-ID;TZID=Europe/Berlin:20150310T083000 after import: RECURRENCE-ID:20150217T073000Z So I have to blame MS. Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 15, 2015):

If I import the ics via the server first and sync to Outlook afterwards, everything is ok.

Original comment by: mawinkler

<!-- gh-comment-id:126313072 --> @aluxnimm commented on GitHub (Jul 15, 2015): If I import the ics via the server first and sync to Outlook afterwards, everything is ok. Original comment by: mawinkler
Author
Owner

@aluxnimm commented on GitHub (Jul 15, 2015):

  • status: open --> closed
  • assigned_to: Alexander Nimmervoll

Original comment by: aluxnimm

<!-- gh-comment-id:126313073 --> @aluxnimm commented on GitHub (Jul 15, 2015): - **status**: open --> closed - **assigned_to**: Alexander Nimmervoll Original comment by: aluxnimm
Author
Owner

@aluxnimm commented on GitHub (Jul 15, 2015):

Since we can't fix an outlook issue I close it for now.

Original comment by: aluxnimm

<!-- gh-comment-id:126313074 --> @aluxnimm commented on GitHub (Jul 15, 2015): Since we can't fix an outlook issue I close it for now. Original comment by: aluxnimm
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#507
No description provided.