pimutils / vdirsyncer

📇 Synchronize calendars and contacts.

Home Page:https://vdirsyncer.pimutils.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COUNT in RRULE must be a positive integer

mkrecek234 opened this issue · comments

Current version, syncing 2 CalDAV calendars (Nextcloud + SOgo)
I setup a recurring event which repeats forever, yearly, every 4th Saturday of April

This event syncs properly.
If I edit it in Mac Calendar.app (macOS) and do whatever, it seems the event is adjusted to include COUNT=0.
vdirsyncer then will throw an internal error:
COUNT in RRULE must be a positive integer

COUNT=0 should be allowed though for endless events

Here is the debug excerpt:

BEGIN:VEVENT
debug: CLASS:PUBLIC
debug: CREATED:20230319T094334Z
debug: DTEND;VALUE=DATE:20230430
debug: DTSTAMP:20230319T120229Z
debug: DTSTART;VALUE=DATE:20230429
debug: EXDATE;VALUE=DATE:20230429
debug: LAST-MODIFIED:20230319T111647Z
debug: LOCATION:test
debug: RRULE:FREQ=YEARLY;COUNT=0;UNTIL=20230427T220000Z;BYMONTH=4;BYDAY=4SA
debug: SEQUENCE:1
debug: SUMMARY:Test
debug: TRANSP:TRANSPARENT
debug: UID:6F9FD18D-0FC7-4719-AEEF-524D0500C96B
debug: BEGIN:VALARM
debug: ACTION:DISPLAY
debug: DESCRIPTION:Erinnerung
debug: TRIGGER:-PT15H
debug: UID:415DCDAD-8151-4E4B-A920-57010BCBC189
debug: X-APPLE-DEFAULT-ALARM:TRUE
debug: X-WR-ALARMUID:415DCDAD-8151-4E4B-A920-57010BCBC189
debug: END:VALARM
debug: ATTENDEE;EMAIL=user@domain.de;PARTSTAT=DECLINED;CN=Michael Krecek;
debug:  RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:user@domain2.de
debug: ORGANIZER;CN=Michael Krecek;EMAIL=user2@domain3.net:mailto:user2@domain3.
debug:  net
debug: END:VEVENT
debug: END:VCALENDAR
debug: Sending request...
debug: 500
debug: {'Date': 'Sun, 19 Mar 2023 12:04:43 GMT', 'Server': 'Apache/2.4.52 (Ubuntu)', 'Expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'Cache-Control': 'no-store, no-cache, must-revalidate', 'Pragma': 'no-cache', 'Content-Security-Policy': "default-src 'none';", 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains', 'Referrer-Policy': 'no-referrer', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'SAMEORIGIN', 'X-Permitted-Cross-Domain-Policies': 'none', 'X-Robots-Tag': 'noindex, nofollow', 'X-XSS-Protection': '1; mode=block', 'Connection': 'close', 'Transfer-Encoding': 'chunked', 'Content-Type': 'application/xml; charset=utf-8'}
debug: <?xml version="1.0" encoding="utf-8"?>
debug: <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
debug:   <s:exception>Sabre\VObject\InvalidDataException</s:exception>
debug:   <s:message>COUNT in RRULE must be a positive integer!</s:message>
debug: </d:error>
error: Unknown error occurred for mk_private_calendar/personal: 500 Server Error: Internal Server Error for url: https://cloud.server.de/remote.php/dav/calendars/login-user@server.de/privat/6F9FD18D-0FC7-4719-AEEF-524D0500C96B.ics
commented

This is a response from the server rejecting the item with the given message:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\VObject\InvalidDataException</s:exception>
  <s:message>COUNT in RRULE must be a positive integer!</s:message>
</d:error>

I don't see the specification prohibiting COUNT=0. It doesn't make much sense to me, since it's an event that repeats zero times. But it's not invalid.

Report to Calendar.app that they're generating something senseless, and report to sabredav that they're rejecting a technically-valid event.