iCloud calendar

Hello All,

good day.

im trying to add my iCloud shared calendar into Nextcloud, but im getting the below errors:

Sabre\VObject\Recur\NoInstancesException: This recurrence rule does not generate any valid instances

i don’t mind if its read only, but just want to use one app instead of 2 or 3 for the same purpose.

does anyone know how can this be fixed?


Please follow the usual attempt, provide DETAILED information about your environment, the used software versions and explain IN DETAIL how you’ve tried to add your iCloud calendar to Nextcloud.

apologies for the late reply… i finally got some time to start troubleshooting this again.

here is the log when im trying to add my shared icloud calendar (read only) to my nextcloud instatnce (20.0.2 on Docker):

[webdav] Fatal: Sabre\VObject\Recur\NoInstancesException: This recurrence rule does not generate any valid instances at <>

  1. /var/www/html/apps/dav/lib/CalDAV/CalDavBackend.php line 2446
    Sabre\VObject\Recur\EventIterator->__construct(Sabre\VObject\Co … l}, “0436ACAF-5D47-4F99-9A5B-6D4FCD6EDAFD”)
  2. /var/www/html/apps/dav/lib/CalDAV/CalDavBackend.php line 1108
    OCA\DAV\CalDAV\CalDavBackend->getDenormalizedData(“BEGIN:VCALENDAR … n”)
  3. /var/www/html/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php line 142
    OCA\DAV\CalDAV\CalDavBackend->createCalendarObject(“2”, “b3c7d6f3-b529-4 … s”, “BEGIN:VCALENDAR … n”, 1)
  4. /var/www/html/apps/dav/lib/AppInfo/Application.php line 302
    OCA\DAV\CalDAV\WebcalCaching\RefreshWebcalService->refreshSubscription(“principals/users/username”, “b3c7d6f3-b529-4 … s”)
  5. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 264
    OCA\DAV\AppInfo\Application->OCA\DAV\AppInfo{closure}("*** sensitive parameters replaced ***")
  6. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 239
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch([Closure {}], “*** sensitive parameter replaced ", " sensitive parameter replaced ***”)
  7. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {}], “*** sensitive parameter replaced ", " sensitive parameter replaced ***”)
  8. /var/www/html/lib/private/EventDispatcher/SymfonyAdapter.php line 85
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch("*** sensitive parameter replaced ", " sensitive parameter replaced ***")
  9. /var/www/html/apps/dav/lib/CalDAV/CalDavBackend.php line 2147
    OC\EventDispatcher\SymfonyAdapter->dispatch("*** sensitive parameter replaced ***", Symfony\Componen … {})
  10. /var/www/html/3rdparty/sabre/dav/lib/CalDAV/CalendarHome.php line 251
    OCA\DAV\CalDAV\CalDavBackend->createSubscription(“principals/users/username”, “1”, {{DAV:}displayna … }})
  11. /var/www/html/apps/dav/lib/CalDAV/CalendarHome.php line 84
    Sabre\CalDAV\CalendarHome->createExtendedCollection(“1”, Sabre\DAV\MkCol {})
  12. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1206
    OCA\DAV\CalDAV\CalendarHome->createExtendedCollection(“1”, Sabre\DAV\MkCol {})
  13. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 586
    Sabre\DAV\Server->createCollection(“calendars/username/1”, Sabre\DAV\MkCol {})
  14. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpMkcol(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  15. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit(“method:MKCOL”, [Sabre\HTTP\Requ … }])
  16. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  17. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 319
  18. /var/www/html/apps/dav/lib/Server.php line 332
  19. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
  20. /var/www/html/remote.php line 167
    require_once("/var/www/html/a … p")

MKCOL /remote.php/dav/calendars/username/1
from by username at 2020-11-23T03:07:16+00:00

i hope yall can help me.

Thaks in advance!

Hello, I have the same error more time per hour. My installation is:
System: Ubuntu 20.04.1 on Intel Pentium Silver J5005 with 8GB memory
PHP 7.4.3, MariaDB 10.3.25

The error message
Fatal webdav Sabre\VObject\Recur\NoInstancesException: This recurrence rule does not generate any valid instances
/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php - line 2446:
/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php - line 1108:
/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Calendar.php - line 202:
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1104:
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 527:
/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 474:
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 251:
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 319:
/var/www/nextcloud/apps/dav/lib/Server.php - line 332:
/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:
/var/www/nextcloud/remote.php - line 167:
require_once("/var/www/ne … p")

I use 4 Android 9.X equipment, both phones and tablets. Looking around on Github I find discussions about this error. Also that there might be an issue with one of the entries in the agenda. Within the error message above I cannot find which entry in the addressbook causes the error.
It’s not a good idea to berequired to remove the complete agenda…
Hopefully there is a solution.

Your calendar data contains an event with an invalid recurrence rule, therefore it cannot be processed as it should. Fix your calendar data so that only event entries with a valid rule exist. The problem has already been described in the past as you can see here:

Dear j-ed, thank you so much for your answer on GitHub. I too have read it. Unfortunately that is not my question.
Where to find the instance that causes the problem.
** Which user and which entry causes the problem**
That is why I specified the the error message in the hope to get a response where to cure the error. Anyway many thanks for your replay.

You have to analyze the iCloud calendar data and have to fix or remove the invalid formatted recurring event. I would expect to find an uid in the log file which identifies the relevant record. Once you’ve git thisuid you can e.g. export your calendar to an ical file and search for the uid to identify the defect record.

intereseting for me is that if i export the calendar into an ical file and import it in nextcloud, it works, but i cant open using the webdav address.

I would assume that the export function corrects the faulty event re currency which doesn’t happen if the calendar should be imported using the webdav address.

just did a fresh export and out of 498 events, it imported 497.

question would be, which one didnt go thru…

Couldn’t you find any hint in the Nextcloud log file which helps you identifying the missing record.

yup… i went in and found one instance that was repeating and was having issues.

let me remove it and try again.

1 Like

i think i just found my issue…

looks like there is a ghost event that its not being actually deleted from the icloud calendar.

its not on my icloud calendar, but somehow it is.

i edited the ics file and imported it successsfully with no errors.

1 Like

Dear J-ed,
Suddenly I found that one person had an invalid date as death date (Sterfdatum) while I was fixing one of my contacts. I have about 25 dead persons in my 325 contacts the rest is luckely still alive. Then I carefully went through all my contacts and found that there were more died people that had an death date with invalid date.

Unfortunately it did not help, the error still comes up. Now I believe it would be nice if the error message should give some of the data in the record it complains about to make it easy in a lot of contacts to fix that record that is causing the error.

Anyway, still very happy with NextCloud!

Best Regards, Cees

so i got my issue fixed with my icloud calendar subscription into Nextcloud.

i had to delete my caledar and recreate it, then use the webcal address to add it to nextcloud without issues.

now my question is, how often does Nextcloud pull info from the subscribed calendar?

after getting rid of the ghost event causing the majority of the issues, i was able to create a new subscription but its not showing up.

this is what i did:
docker exec --user www-data Nextcloud php occ config:app:set dav calendarSubscriptionRefreshRate --vaule "PT5M"

and after executing it i got this:
Config value calendarSubscriptionRefreshRate for app dav set to PT5M

i also went to the nextcloud.oc_calendarsubscriptions db and had to manually update the refreshrate from NULL to PT1M as shown below:

| id | uri | principaluri | displayname | refreshrate | calendarorder | calendarcolor | striptodos | stripalarms | stripattachments | lastmodified | synctoken |source |
| 23 | - | principals/users/user | Calendar | PT1M | 0 | #9750A4 | NULL | NULL | NULL | 1608928209 | 1 | webcal://xxx|

ran the cron.php and still not seeing any events on the subscribed calendaer…

any ideas?

thanks in advance!