[Owncloud] Calendar event sync issues

Stephan Hesmer mailings at hesmer.name
Fri Aug 31 19:37:41 UTC 2012


I have been digging a little more and added a http traffic sniffer in between. The content that gets discarded is sent as part of a PUT request from the iOS to the  owncloud server and it gets an error: HTTP/1.1 412 Precondition failed

Here is the complete request/response pair.

Response first:
HTTP/1.1 412 Precondition failed
Date: Fri, 31 Aug 2012 19:17:52 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Keep-Alive: timeout=10, max=30
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8
Content-Length: 369

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre_DAV_Exception_PreconditionFailed</s:exception>
  <s:message>An If-None-Match header was specified, but the ETag matched (or * was specified).</s:message>
  <s:sabredav-version>1.6.2</s:sabredav-version>
  <s:header>If-None-Match</s:header>
</d:error>


Request as well:
PUT /owncloud/remote.php/caldav/calendars/family/default%20calendar/2DFD2DCA-ACE5-44DD-A025-ABE268077278.ics HTTP/1.1
User-Agent: iOS/5.1.1 (9B206) dataaccessd/1.0
Content-Length: 731
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
If-None-Match: *
Content-Type: text/calendar; charset=utf-8
Cookie: PHPSESSID=2dcal5ksm4vd2jto4vqvfh1s02
Connection: keep-alive
Proxy-Connection: keep-alive
Authorization: Basic ZmFtaWx5OmQuTHBoaW4=

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iOS 5.1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
TZNAME:EDT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
TZNAME:EST
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20120831T190906Z
DTEND;TZID=America/New_York:20120831T180000
DTSTAMP:20120831T191752Z
DTSTART;TZID=America/New_York:20120831T170000
LAST-MODIFIED:20120831T191521Z
SEQUENCE:7
SUMMARY:Test
TRANSP:OPAQUE
UID:2DFD2DCA-ACE5-44DD-A025-ABE268077278
END:VEVENT
END:VCALENDAR


Any help is greatly appreciated

Stephan

On Aug 31, 2012, at 1:32 PM, Stephan Hesmer <mailings at hesmer.name> wrote:

> Hello everybody,
> 
> I have been using OwnCloud for the past two months and are very excited about it - I simply love it.
> 
> Unfortunately I stumbled upon a bug which is hard to track down in the code, otherwise I would have reported it earlier. At least by now I am certain that the error is not caused on my side, e.g. hosting.
> 
> How to reproduce:
> 1. Use iOS device with version 5.1.1
> 2. Connect to your owncloud server using CalDAV
> - I have been using my own server on hostmonster.com with https, but I get the same error on owncube.com with a personal account
> 3. Create a new event in the standard calendar app
> 4. Update the starting time 4 times in a row.
> 4.1. It is important to press done so that you start the sync process in the background
> 4.2. So click on the event, press edit, click on the time, select one hour later, press done, press done, now start with edit again.
> 5. After this has been done 4 times in a row wait for the update icon in the top bar to finish. You will notice that the event suddenly jumps to an earlier time and not the latest.
> => Result: your latest update is lost.
> 
> I can reproduce this with every field, I just used the start/end time here to have an as simple usecase as possible.
> 
> Example:
> Create Event on 8/31 at 2pm. Immediately update to 3pm, then immediately to 4pm, then immediately to 5pm, the immediately to 6pm.
> After the sync process finished it usually jumps back to 4pm or 5 pm - correct would be 6pm.
> 
> Notes:
> * I am using OwnCloud 4.0.7
> * I can reproduce this with an empty calender on owncube.com and my ownserver with a calender running on MySQL and SQLlite.
> * I believe this is a runtime condition because the error doesn't happen all the time, but the more events you have in your calender the more likely it is to appear. In the test above with an empty calender you have to do all of those steps without a pause to have the error show up.
> * There is no error in the php error log
> 
> I was trying to look at the code but don't know the flow from the remote.php into the calDAV code, especially since there is the 3rd party code that handles all the syncing.
> I am more than happy to help the community out in debugging this issue but need a bit help along the way to find the right files. Is there any tracing I can turn on? And where would I find that?
> 
> At this point I am very dedicated to this because if I cannot fix this, I have to move back to zimbra where the error did not appear, but I love owncloud too much as that I want to abandon it :)
> 
> Thanks so much and looking forward working with you
> Stephan
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud




More information about the Owncloud mailing list