sabre-io / dav

sabre/dav is a CalDAV, CardDAV and WebDAV framework for PHP
http://sabre.io
BSD 3-Clause "New" or "Revised" License
1.53k stars 346 forks source link

Every VEVENT in this object must have identical UIDs #954

Closed jolinux closed 7 years ago

jolinux commented 7 years ago

Use baikal and vdirsyncer to sync ics-Files.

to sync up local.ics to server baikal

Error

debug: {'X-Sabre-Version': '3.1.3', 'X-Powered-By': 'PHP/5.5.5', 'Pragma': 'no-cache', 'Date': 'Thu, 30 Mar 2017 07:38:03 GMT', 'Transfer-Encoding': 'chunked', 'Cache-Control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Server': 'Apache/2.2.15 (CentOS)', 'Connection': 'close', 'Expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'Content-Type': 'application/xml; charset=utf-8'} debug: <?xml version="1.0" encoding="utf-8"?> debug: debug: 3.1.3</s:sabredav-version> debug: Sabre\DAV\Exception\BadRequest</s:exception> debug: Every VEVENT in this object must have identical UIDs</s:message> debug: </d:error> error: Unknown error occured for calendar/abfalltermine: 400 Client Error: Bad Request for url: https://..../abfalltermine/078c7e140694dde600ef1b0f2d5b3786.ics error: Use -vdebug to see the full traceback.

print ics-file (debug vdirsyncer)

debug: BEGIN:VEVENT debug: DTSTAMP:20170330T073809Z debug: UID:2238fca63a95f30e9a295a432b8b7084 debug: CREATED:20170327T115154Z debug: LAST-MODIFIED:20170327T121445Z debug: SUMMARY:Biomüll debug: DESCRIPTION:Alle Termine auf http://www.abfallkalender-gifhorn.de/2017/muel debug: l_mit_ics.php debug: DTSTART;VALUE=DATE:20171220 debug: DTEND;VALUE=DATE:20171221 debug: CATEGORIES:Abfalltermine debug: END:VEVENT debug: BEGIN:VEVENT debug: DTSTAMP:20170330T073809Z debug: UID:4a4eb53e3ead7fe2082a5c2df0763f3b debug: CREATED:20170327T115154Z debug: LAST-MODIFIED:20170327T121445Z debug: SUMMARY:Gelber Sack debug: DESCRIPTION:Alle Termine auf http://www.abfallkalender-gifhorn.de/2017/muel debug: l_mit_ics.php debug: DTSTART;VALUE=DATE:20171222 debug: DTEND;VALUE=DATE:20171223 debug: CATEGORIES:Abfalltermine debug: END:VEVENT debug: BEGIN:VEVENT debug: DTSTAMP:20170330T073809Z debug: UID:c1b65f3dfd185538a76542081f6c4dca debug: CREATED:20170327T115154Z debug: LAST-MODIFIED:20170327T121445Z debug: SUMMARY:Restmüll debug: DESCRIPTION:Alle Termine auf http://www.abfallkalender-gifhorn.de/2017/muel debug: l_mit_ics.php debug: DTSTART;VALUE=DATE:20171228 debug: DTEND;VALUE=DATE:20171229 debug: CATEGORIES:Abfalltermine debug: END:VEVENT debug: BEGIN:VEVENT debug: DTSTAMP:20170330T073809Z debug: UID:88@BORGA-1490616968318 debug: CREATED:20170327T121608Z debug: LAST-MODIFIED:20170327T121608Z debug: SUMMARY:Test debug: DTSTART;VALUE=DATE-TIME:20170328T063000Z debug: DURATION:PT60M debug: CATEGORIES:black debug: END:VEVENT debug: END:VCALENDAR

evert commented 7 years ago

Please note the error that sabre/dav emits:

Every VEVENT in this object must have identical UIDs

Your VEVENT object clearly violates this.

jolinux commented 7 years ago

Yes I see it also, but every ics-exporter I use has this format. And all ics I download has also this format.

Java Calender Borg (use iCal4j)
online creator http://apps.marudot.com/ical/ online validator http://severinghaus.org/projects/icv/

Info about UID https://tools.ietf.org/html/rfc5545#section-3.8.4.7

evert commented 7 years ago

This is a restriction of the CalDAV protocol. Every object can only contain one event. If I changed this, the server is no longer compatible with CalDAV.