0

A SyncEvolution user has reported problems with mirroring a local calendar in Google Calendar: when refreshing Google Calendar via CalDAV (= DELETE all events and recreate with PUT), some PUT commands fail with "404 Not Found".

It looks like this happens for VEVENTs which have an ORGANIZER (i.e., meetings). It works for simpler VEVENTs that have no ORGANIZER. Example of the failure below.

I believe this is a known limitation of Google CalDAV. The question is: what can be done to support this use case, either in the client or the server?

I can't think of any workaround in the client. The 404 error is too unspecific to trigger a workaround, and even if the client could detect the root cause for it, there's no other way of recreating the event than the PUT, which is failing.


PUT /caldav/v2/patrick.ohly.estamos%40googlemail.com/events/4fbbdbd8-c9de-4ce0-810a-01e3a438a35d-pohly-xyz.ics HTTP/1.1
Connection: TE
TE: trailers
Host: apidata.googleusercontent.com
Content-Length: 928
Content-Type: text/calendar; charset=utf-8
User-Agent: SyncEvolution
Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Sending request-line and headers:
Sending request body:
Body block (928 bytes):
[BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Synthesis AG//NONSGML SyncML Engine V3.4.0.47//EN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=1SU
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:HNP
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=2SU
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:HAP
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
STATUS:CONFIRMED
LAST-MODIFIED:20120813T184814Z
DTSTAMP:20120813T184814Z
UID:4fbbdbd8-c9de-4ce0-810a-01e3a438a35d-pohly-xyz
SEQUENCE:0
CLASS:PUBLIC
TRANSP:OPAQUE
SUMMARY:test event
DTSTART;TZID=America/Los_Angeles:20120815T103000
DTEND;TZID=America/Los_Angeles:20120815T113000
ATTENDEE;CN=John Doe;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:
 mailto:john.doe@example.com
ORGANIZER;CN=Joan Doe:mailto:joan.doe@example.com
END:VEVENT
END:VCALENDAR
]
Request sent; retry is 1.
[status-line] < HTTP/1.1 201 Created

...

DELETE /caldav/v2/patrick.ohly.estamos%40googlemail.com/events/4fbbdbd8-c9de-4ce0-810a-01e3a438a35d-pohly-xyz.ics HTTP/1.1
Connection: TE
TE: trailers
Host: apidata.googleusercontent.com
Content-Length: 0
User-Agent: SyncEvolution
Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Sending request-line and headers:
Request sent; retry is 1.
[status-line] < HTTP/1.1 204 No Content

...

PUT /caldav/v2/patrick.ohly.estamos%40googlemail.com/events/4fbbdbd8-c9de-4ce0-810a-01e3a438a35d-pohly-xyz.ics HTTP/1.1
Connection: TE
TE: trailers
Host: apidata.googleusercontent.com
Content-Length: 928
Content-Type: text/calendar; charset=utf-8
User-Agent: SyncEvolution
Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Sending request-line and headers:
Sending request body:
Body block (928 bytes):
[BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Synthesis AG//NONSGML SyncML Engine V3.4.0.47//EN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=1SU
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:HNP
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=2SU
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:HAP
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
STATUS:CONFIRMED
LAST-MODIFIED:20120813T184814Z
DTSTAMP:20120813T184814Z
UID:4fbbdbd8-c9de-4ce0-810a-01e3a438a35d-pohly-xyz
SEQUENCE:0
CLASS:PUBLIC
TRANSP:OPAQUE
SUMMARY:test event
DTSTART;TZID=America/Los_Angeles:20120815T103000
DTEND;TZID=America/Los_Angeles:20120815T113000
ATTENDEE;CN=John Doe;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:
 mailto:john.doe@example.com
ORGANIZER;CN=Joan Doe:mailto:joan.doe@example.com
END:VEVENT
END:VCALENDAR
]
Request sent; retry is 1.
[status-line] < HTTP/1.1 404 Not Found
luc
  • 3,642
  • 1
  • 18
  • 21
Patrick Ohly
  • 712
  • 6
  • 8

1 Answers1

0

(I don't know about SyncEvolution, but perhaps some recent experience I have with google calendars can shed some light. I'm not sure there is a satisfactory answer.)

This can be a problem (even without a DELETE):

Suppose user U PUTs an event that has attendees but U is not the organizer. What happens is that U "steals" the event (becomes the organizer) and inserts a (probably) read-only copy of the event on everyone else's calendar. Note: for an event with ATTENDEES Google calendar makes the owner/creator/insertor the organizer. The UID is then "held" by the first ATTENDEE who mentions it. Since there can be no duplicate UIDs on google calendars, the error occurs on subsequent PUTs by other ATTENDEES.

This becomes even worse when events are deleted from one calendar (but not all) and the UID is still "held" by someone. Or the delete somehow does not actually remove the UID (which can occur on google calendars).

Mitigation strategies:

For events with an organizer, only PUT into the organizer's calendar.

Somehow unique-ify the UUID if you can not accomplish the above (with the result that the events become unconnected duplicates)

Jas
  • 327
  • 2
  • 9