dengste / org-caldav

Caldav sync for Emacs orgmode
GNU General Public License v3.0
712 stars 105 forks source link

Can't Sync Todos to Nextcloud Calendar VEVENT #268

Closed PaladinMorak closed 1 year ago

PaladinMorak commented 1 year ago

Hello,

I have been trying to sync my Org based TODO files with my calendar so that I have a single calendar in which both my scheduled TODOs and other appointments appear. After setting everything up according to the Readme I get the following error in the debug logs

Event UID 68f1cb38-351c-45e5-8ae3-8c0fe1768a60: Org --> Cal
Putting event UID 68f1cb38-351c-45e5-8ae3-8c0fe1768a60.
(Try 1) Error when trying to put URL https://XXXX/college-1/68f1cb38-351c-45e5-8ae3-8c0fe1768a60.ics: HTTP/1.1 403 Forbidden
(Try 2) Error when trying to put URL https://XXXX/college-1/68f1cb38-351c-45e5-8ae3-8c0fe1768a60.ics: HTTP/1.1 403 Forbidden
(Try 3) Error when trying to put URL https://XXXX/college-1/68f1cb38-351c-45e5-8ae3-8c0fe1768a60.ics: HTTP/1.1 403 Forbidden
(Try 4) Error when trying to put URL https://XXXX/college-1/68f1cb38-351c-45e5-8ae3-8c0fe1768a60.ics: HTTP/1.1 403 Forbidden
(Try 5) Error when trying to put URL https://XXXX/college-1/68f1cb38-351c-45e5-8ae3-8c0fe1768a60.ics: HTTP/1.1 403 Forbidden
Failed to put URL https://XXXX/college-1/68f1cb38-351c-45e5-8ae3-8c0fe1768a60.ics after 5 tries with error HTTP/1.1 403 Forbidden
Event UID 68f1cb38-351c-45e5-8ae3-8c0fe1768a60: Error while doing Org --> Cal

and the following log message in Nextcloud:

Sabre\CalDAV\Exception\InvalidComponentType: iCalendar objects must at least have a component of type VEVENT

My emacs config looks like this

(use-package! org-caldav
  :config (setq org-caldav-url "https://XXX")
          (setq org-icalendar-timezon "Europe/Berlin")
          (setq org-caldav-calendars
            '((:calendar-id "college-1" :files ("~/Documents/TODO/college.org" "~/Documents/TODO/bachelorthesis.org")
               :inbox "~/Documents/TODO/inbox.org")))
          (setq org-icalendar-include-todo 'all
                org-caldav-sync-todo t
                org-caldav-todo-percent-states '((0 "TODO") (1 "NEXT") (2 "PROG") (100 "KILL") (100 "DONE")))
          (setq org-icalendar-categories '(local-tags)))

Any help to get this sorted out would be greatly appreciated.

jackkamm commented 1 year ago

Are you able to sync non-todo events to the Nextcloud calendar?

Also, if you create a separate iCalendar just for todo's, via Nextcloud Tasks, are you able to sync todo's to it?

Personally I am using separate iCalendars for Events and Todos. I am not sure how good Nextcloud support is for a single iCalendar that contains both (it may work fine, but I just haven't tried it).

PaladinMorak commented 1 year ago

Hi,

I was able to solve the problem by creating a new Nextcloud calendar that supported both events and tasks.