vikunja icon indicating copy to clipboard operation
vikunja copied to clipboard

CalDAV not working properly with iOS

Open vikunja-bot opened this issue 10 months ago • 7 comments

Original issue by profi248 on 2020-12-28T15:49:27.000Z

[caldav] I'm trying to add Vikunja to iOS via CalDAV, and it mostly doesn't work. Adding an account works, and listing of lists worked fine once, after that it only showed one list (the last one). Listing of tasks on a list didn't work at all. Adding a task worked, except when it had a specified timestamp. In that case it failed with a timestamp parsing error (bottom of the log).

Everything was tested in native iOS 14.3 Reminders app.

Log from the server is below, there are a lot of failures with PROPPATCH, and some timestamp parsing errors.

Vikunja version v0.15.0+71-be7b53b9bc

2020-12-28T15:29:28.31365422Z: WEB 	▶ 192.168.0.1  PROPFIND 401 /.well-known/caldav 62.53µs - iOS/14.3 (18C66) accountsd/1.0
2020-12-28T15:29:28.542591698Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /.well-known/caldav 158.215032ms - iOS/14.3 (18C66) accountsd/1.0
2020-12-28T15:29:28.559414545Z: WEB 	▶ 192.168.0.1  OPTIONS 401 /dav/principals/david/ 41.5µs - iOS/14.3 (18C66) accountsd/1.0
2020-12-28T15:29:28.754367347Z: WEB 	▶ 192.168.0.1  OPTIONS 200 /dav/principals/david/ 134.089527ms - iOS/14.3 (18C66) accountsd/1.0
2020-12-28T15:29:32.269281277Z: WEB 	▶ 192.168.0.1  PROPFIND 401 /dav/principals/david/ 40.42µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:32.515754544Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/principals/david/ 130.918851ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:32.668509313Z: WEB 	▶ 192.168.0.1  OPTIONS 200 /dav/principals/david/ 138.368707ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:32.719812486Z: WEB 	▶ 192.168.0.1  PROPFIND 401 /dav/lists/ 40.94µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:32.947795942Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/ 135.49345ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.744700709Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/3 40.83µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.764406803Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/3 38.08µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.773124652Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/2 26.42µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.782137942Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/2 34.74µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.790773342Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/1 21.761µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.801263745Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/1 39.74µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.814713325Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/4 38.16µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.823396404Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/4 36.95µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.832776645Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 38.05µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.879233508Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 36.98µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.890972574Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/3 25.93µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.896382156Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/2 24.18µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.903897402Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/1 37.9µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.938519449Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/4 35.7µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:34.971852013Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 40.42µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:35.000151916Z: WEB 	▶ 192.168.0.1  PROPFIND 401 /dav/principals/david/ 47.01µs - iOS/14.3 (18C66) dataaccessd/1.0
2020-12-28T15:29:35.143451314Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/2/ 139.066969ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:35.187295961Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/principals/david/ 138.036576ms - iOS/14.3 (18C66) dataaccessd/1.0
2020-12-28T15:29:35.291715933Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/3/ 137.316555ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:35.329638687Z: WEB 	▶ 192.168.0.1  OPTIONS 200 /dav/principals/david/ 135.022079ms - iOS/14.3 (18C66) dataaccessd/1.0
2020-12-28T15:29:35.342388795Z: WEB 	▶ 192.168.0.1  PROPFIND 401 /dav/lists/ 37.15µs - iOS/14.3 (18C66) dataaccessd/1.0
2020-12-28T15:29:35.44365791Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/1/ 138.906198ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:35.547559441Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/ 136.112112ms - iOS/14.3 (18C66) dataaccessd/1.0
2020-12-28T15:29:35.601847631Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/4/ 145.255202ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:35.672064247Z: WEB 	▶ 192.168.0.1  MKCALENDAR 405 /dav/lists/C7D1E705-0E0B-4C5D-A399-A3763EA77E45/ 37.27µs - iOS/14.3 (18C66) dataaccessd/1.0
2020-12-28T15:29:35.751077172Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 134.256757ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:35.903766861Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/2/ 139.84773ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:36.14674282Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/3/ 134.167747ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:36.410727266Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/1/ 136.835484ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:36.627727527Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/4/ 151.631966ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:36.872771451Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 136.309212ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:58.372201348Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/ 381.005146ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:58.560941557Z: WEB 	▶ 192.168.0.1  OPTIONS 200 /dav/lists/ 141.973635ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:58.808358156Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 137.217515ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:58.97246101Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 45.64µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.00407055Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 35.51µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.013690401Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 41.99µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.162639632Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 135.08459ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.305522939Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 134.481129ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.525675947Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 144.21771ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.584305697Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 42.91µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.590438311Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 41.35µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.596834185Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 42.19µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:29:59.880439104Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 148.058158ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:00.061933607Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 148.387809ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:38.428303729Z: WEB 	▶ 192.168.0.1  PROPFIND 401 /dav/lists/5/ 38.961µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:38.7624641Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 292.719269ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:38.781379602Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 36.63µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:38.787438375Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 39.33µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:38.794704812Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 39.821µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:39.119253472Z: WEB 	▶ 192.168.0.1  PUT 201 /dav/lists/5/89D6F999-35CF-41D6-A176-045A17CB7185.ics 157.943311ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:39.383490578Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 137.024974ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:39.557862785Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 140.014981ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:55.7890752Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 295.664216ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:55.809162855Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 40.35µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:55.821734223Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 38.14µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:55.831947535Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 39.49µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:55.984827525Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 138.638928ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:56.136564341Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 138.954378ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:57.704558151Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 148.385139ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:57.937537307Z: WEB 	▶ 192.168.0.1  OPTIONS 200 /dav/lists/5/ 132.818244ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:58.190028488Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 147.757228ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:58.221468447Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 44.77µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:58.230142457Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 67.94µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:58.238164194Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 48.14µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:58.393160998Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 138.563117ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:30:58.550549568Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 139.77506ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:13.531146858Z: WEB 	▶ 192.168.0.1  GET 200 /api/v1/lists/5 24.082163ms - Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
2020-12-28T15:31:13.534696276Z: WEB 	▶ 192.168.0.1  GET 200 /api/v1/lists/5/tasks?sort_by[]=done&sort_by[]=id&order_by[]=asc&order_by[]=desc&filter_by[]=done&filter_value[]=false&filter_comparator[]=equals&filter_concat=and&page=1 27.631671ms - Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
2020-12-28T15:31:22.828472919Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 149.810003ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:22.846037787Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 38.06µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:22.855714689Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 38.4µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:22.863256806Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 33.2µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:23.154633992Z: WEB 	▶ 192.168.0.1  PUT 500 /dav/lists/5/8278E61E-AE34-470E-96C4-3BB44BC653C7.ics 141.868515ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:32.366614113Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 302.735672ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:32.527965671Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 38.35µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:32.537481102Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 51.86µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:32.574354824Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 44.821µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:32.916779684Z: WEB 	▶ 192.168.0.1  PUT 500 /dav/lists/5/8278E61E-AE34-470E-96C4-3BB44BC653C7.ics 144.221891ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:37.736051387Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 142.408496ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:37.756095042Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 36.18µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:37.765119522Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 46.031µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:37.771990687Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 38.13µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:38.046670606Z: WEB 	▶ 192.168.0.1  PUT 500 /dav/lists/5/6DA7F151-75BD-425F-830E-6196668A8E56.ics 134.623258ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:41.282210876Z: WEB 	▶ 192.168.0.1  PROPFIND 207 /dav/lists/5/ 147.056957ms - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:41.331785246Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 44.47µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:41.341087386Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 39.03µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:41.348511283Z: WEB 	▶ 192.168.0.1  PROPPATCH 405 /dav/lists/5 42.42µs - iOS/14.3 (18C66) remindd/1.0
2020-12-28T15:31:41.559932832Z: WARNING	▶ caldav/caldavTimeToTimestamp 54a2 Error while parsing caldav time 20201229 to TimeStamp: parsing time "20201229" as "20060102T150405": cannot parse "" as "T"
2020-12-28T15:31:41.560084462Z: WARNING	▶ caldav/caldavTimeToTimestamp 54a3 Error while parsing caldav time 20201229 to TimeStamp: parsing time "20201229" as "20060102T150405": cannot parse "" as "T"
2020-12-28T15:31:41.562313977Z: WEB 	▶ 192.168.0.1  PUT 500 /dav/lists/5/6DA7F151-75BD-425F-830E-6196668A8E56.ics 144.37682ms - iOS/14.3 (18C66) remindd/1.0

Original issue on Gitea


@kolaente commented on 2020-12-28T17:54:08.000Z:

The PROPPATCH methods don't have a handler, hence the errors in the log. This could be related to the issues you described.

I can see some more 500 errors which do not seem to be related to date parsing errors.

There should be more logging available - could you set the log level to debug, restart vikunja, do again what you did and then send the logs? (obfuscate any private data before sending)


profi248 commented on 2020-12-28T18:23:03.000Z:

Here you go, I hope it's useful. Some ParseInt errors showed up now.


@kolaente commented on 2021-04-15T21:55:38.000Z:

Is this still an issue? Can you reproduce it with the latest version on the demo?


profi248 commented on 2021-04-15T22:34:10.000Z:

Just tried it out, displaying of lists still doesn't work properly, after the initial load, only the last on shows up. Tasks in lists are still not shown. Adding a task with a timestamp does sort of work, but the timestamp is discarded.


fivetwoseven commented on 2021-05-10T17:49:25.000Z:

I'm having issues with the iOS Reminders as well. The first time I add the CalDAV account, the list shows up but shows blank. If I add a task on the phone, it shows online. Nothing added online shows on the phone, however. And after a bit of time, all tasks disappear on the phone. Happy to submit any information needed, I just need some guidance on how/where to set the log level to debug. I am using Portainer and running Vikunja in Docker.


@kolaente commented on 2021-05-10T20:22:55.000Z:

@fivetwoseven I guess it would be worth a try if you would set the log level to debug. For portainer I think the best way to set this would be through an env variable VIKUNJA_LOG_LEVEL=debug (been a while since I've used portainer but iirc you can set env variables there?).


@kolaente commented on 2021-07-11T14:35:51.000Z:

So I finally got around testing this with an ios device. Here's what I found.

I first tried to connect it through the local wifi to my dev instance running locally. That did not work. I only got an error "this did not work" and this in the Vikunja api logs:

PROPFIND 401 /.well-known/caldav 40.551µs - iOS/14.6 (18F72) remindd/1.0

Status 401 means "unauthorized". That's the status a client gets when they don't send their basic auth credentials. In combination with the very fast response (40µs) it looks like the iOS implementation simply did not send any client credentials. However, also sends this header in case the authentication credentials were missing: Www-Authenticate: basic realm=Restricted. That essentially means "hey please come back with proper basic auth credentials". And yet, iOS did not come back, instead it tried a few other urls:

PROPFIND 404 / 47.511µs - iOS/14.6 (18F72) remindd/1.0
PROPFIND 401 /.well-known/caldav 40.551µs - iOS/14.6 (18F72) remindd/1.0
PROPFIND 404 / 31.08µs - iOS/14.6 (18F72) remindd/1.0
PROPFIND 404 /principals/ 31.17µs - iOS/14.6 (18F72) remindd/1.0
PROPFIND 404 /calendar/dav/test/user/ 23.77µs - iOS/14.6 (18F72) remindd/1.0

As you can see from the status codes, with no success. It just gave up when the first try did not succeed.

Next, I tried connecting to try. And that seemed to have worked, creating the account in the ios settings worked. In the logs I was able to see it also tried to connect without any credentials first but then provided them when that did not work:

PROPFIND 401 /.well-known/caldav 438.784µs - iOS/14.6 (18F72) accountsd/1.0
PROPFIND 207 /.well-known/caldav 265.904444ms - iOS/14.6 (18F72) accountsd/1.0
PROPFIND 401 /dav/principals/demo/ 266.082µs - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/principals/demo/ 180.359999ms - iOS/14.6 (18F72) remindd/1.0
PROPFIND 401 /dav/lists/ 129.763µs - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/lists/ 210.25997ms - iOS/14.6 (18F72) remindd/1.0

I suspect that's due to try being available over https while my local dev instance isn't. That should not be an issue but it looks like it is.

After that it did a bunch of requests to get all lists:

PROPFIND 207 /dav/lists/1255/ 325.641107ms - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/lists/1217/ 187.552424ms - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/lists/1254/ 184.592967ms - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/lists/1262/ 194.360873ms - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/lists/1244/ 194.533747ms - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/lists/1247/ 237.377818ms - iOS/14.6 (18F72) remindd/1.0
PROPFIND 207 /dav/lists/1242/ 200.254749ms - iOS/14.6 (18F72) remindd/1.0

And they all showed up:

image

But without any tasks. When I tried to create a task that did not work either.

Another interesting thing to note is there's a bunch of failing PROPPATCH requests:

PROPPATCH 405 /dav/lists/1197 191.747µs - iOS/14.6 (18F72) remindd/1.0
PROPPATCH 405 /dav/lists/1197 89.961µs - iOS/14.6 (18F72) remindd/1.0
PROPPATCH 405 /dav/lists/1253 60.106µs - iOS/14.6 (18F72) remindd/1.0
PROPPATCH 405 /dav/lists/1253 59.449µs - iOS/14.6 (18F72) remindd/1.0
PROPPATCH 405 /dav/lists/1261 120.255µs - iOS/14.6 (18F72) remindd/1.0

I suspect these are the actual cause of lists going missing (maybe iOS removes a list when it tried to do something with it and that failed?)

So in conclusion, I'm not sure how to proceed with this problem. I can see there's issues with it but I can't reproduce it all the time (the lists were all there) and I can't look into it bc iOS won't connect to my local dev instance.

Open for ideas.


realcanadrian commented on 2022-01-19T23:49:29.000Z:

Is it just a cert issue? I know Nextcloud tasks users were having trouble syncing CalDav to iOS until they figured out that Apple made https mandatory and tightened their cert requirements. Letsencrypt certs work fine though. Could you add a Letsencrypt cert to your dev instance and see if it resolves the issue?


@kolaente commented on 2022-01-20T07:57:25.000Z:

@realcanadrian I guess that would make sense. Try has a Let's Encrypt certificate. Will check with my local dev instance.


AverageMarcus commented on 2022-01-31T08:29:33.000Z:

I have a valid certificate on mine and I'm still seeing issues with CalDAV on iOS and MacOS.

The lists are retrieved but all show as having 0 tasks (when they do in fact have tasks).

I've been able to add a new tasks to one of the lists which does save into Vikunja but almost immediately after creating it it disappears from the iOS/MacOS app and the list shows 0 tasks again.


Snuggle commented on 2022-09-08T00:43:23.000Z:

I've been testing with a valid certificate and have the same results as @AverageMarcus.

It almost seems as if the iOS client is able to write new tasks but not read.

I also set up an SMTP server and during this behaviour my emails get spammed every few seconds with the following, even though adding new tasks works correctly and the lists are showing up (albeit with 0 tasks still which is not correct) so it absolutely has the correct credentials.


@kolaente commented on 2022-09-08T11:36:51.000Z:

I also set up an SMTP server and during this behaviour my emails get spammed every few seconds with the following, even though adding new tasks works correctly and the lists are showing up (albeit with 0 tasks still which is not correct) so it absolutely has the correct credentials.

Hmmm that's strange. Can you check the server logs?


Snuggle commented on 2022-09-11T13:48:29.000Z:

I also set up an SMTP server and during this behaviour my emails get spammed every few seconds with the following, even though adding new tasks works correctly and the lists are showing up (albeit with 0 tasks still which is not correct) so it absolutely has the correct credentials.

Hmmm that's strange. Can you check the server logs?

2022-09-11 13:36:00.040650+00:00[31m2022-09-11T14:36:00.040480351+01:00: ERROR	▶ [DATABASE] 3a603[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:36:31.784305+00:002022-09-11T14:36:31.784009034+01:00: WEB 	▶ 123.123.123.123  PROPFIND 401 /dav/lists/3/ 16.969803ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:32.208161+00:00[31m2022-09-11T14:36:32.207919679+01:00: ERROR	▶ [DATABASE] 3a649[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:36:32.275241+00:002022-09-11T14:36:32.274969032+01:00: WEB 	▶ 123.123.123.123  PROPFIND 207 /dav/lists/3/ 395.320336ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:32.465075+00:002022-09-11T14:36:32.464846999+01:00: WEB 	▶ 123.123.123.123  OPTIONS 401 /dav/lists/3/ 78.447µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:32.830076+00:002022-09-11T14:36:32.829738486+01:00: WEB 	▶ 123.123.123.123  OPTIONS 200 /dav/lists/3/ 295.397461ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:33.211065+00:002022-09-11T14:36:33.210812799+01:00: WEB 	▶ 123.123.123.123  PROPFIND 401 /dav/lists/3/ 63.571µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:33.660329+00:00[31m2022-09-11T14:36:33.660120904+01:00: ERROR	▶ [DATABASE] 3a6cb[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:36:33.669092+00:002022-09-11T14:36:33.668959352+01:00: WEB 	▶ 123.123.123.123  PROPFIND 207 /dav/lists/3/ 360.607662ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:34.358456+00:002022-09-11T14:36:34.358234192+01:00: WEB 	▶ 123.123.123.123  PROPPATCH 405 /dav/lists/3 59.774µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:34.602507+00:002022-09-11T14:36:34.602290776+01:00: WEB 	▶ 123.123.123.123  PROPPATCH 405 /dav/lists/3 68.085µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:34.881734+00:002022-09-11T14:36:34.88158051+01:00: WEB 	▶ 123.123.123.123  PROPPATCH 405 /dav/lists/3 42.231µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:35.176895+00:002022-09-11T14:36:35.176563037+01:00: WEB 	▶ 123.123.123.123  PROPFIND 401 /dav/lists/3/ 55.675µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:35.594344+00:00[31m2022-09-11T14:36:35.594123661+01:00: ERROR	▶ [DATABASE] 3a72c[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:36:35.603311+00:002022-09-11T14:36:35.603124613+01:00: WEB 	▶ 123.123.123.123  PROPFIND 207 /dav/lists/3/ 314.939276ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:35.861958+00:002022-09-11T14:36:35.861812553+01:00: WEB 	▶ 123.123.123.123  PROPFIND 401 /dav/lists/3/ 50.943µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:36:36.272268+00:00[31m2022-09-11T14:36:36.272012015+01:00: ERROR	▶ [DATABASE] 3a78d[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:36:36.283740+00:002022-09-11T14:36:36.283562173+01:00: WEB 	▶ 123.123.123.123  PROPFIND 207 /dav/lists/3/ 316.350471ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:37:00.016078+00:00[31m2022-09-11T14:37:00.015893068+01:00: ERROR	▶ [DATABASE] 3a7c6[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:37:00.021856+00:00[31m2022-09-11T14:37:00.021688987+01:00: ERROR	▶ [DATABASE] 3a7d6[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:37:14.013422+00:00[31m2022-09-11T14:37:14.013090938+01:00: ERROR	▶ mail/func1 3a7e1[0m Error closing the mail server connection: %s
2022-09-11 13:37:14.013493+00:00not connected to SMTP server
2022-09-11 13:38:00.025758+00:00[31m2022-09-11T14:38:00.025536189+01:00: ERROR	▶ [DATABASE] 3a7ec[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:38:00.031160+00:00[31m2022-09-11T14:38:00.03100493+01:00: ERROR	▶ [DATABASE] 3a7fc[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
##########
2022-09-11 13:54:00.034725+00:00[31m2022-09-11T14:54:00.034575539+01:00: ERROR	▶ [DATABASE] 3ab78[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:54:11.019044+00:002022-09-11T14:54:11.018761697+01:00: WEB 	▶ 123.123.123.123  PROPFIND 401 /dav/lists/3/ 79.991µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:11.418165+00:00[31m2022-09-11T14:54:11.417961628+01:00: ERROR	▶ [DATABASE] 3abbd[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:54:11.430057+00:002022-09-11T14:54:11.429759019+01:00: WEB 	▶ 123.123.123.123  PROPFIND 207 /dav/lists/3/ 334.975815ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:11.645243+00:002022-09-11T14:54:11.644958302+01:00: WEB 	▶ 123.123.123.123  PROPPATCH 405 /dav/lists/3 81.455µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:11.815689+00:002022-09-11T14:54:11.815213984+01:00: WEB 	▶ 123.123.123.123  PROPPATCH 405 /dav/lists/3 80.339µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:12.019211+00:002022-09-11T14:54:12.018904843+01:00: WEB 	▶ 123.123.123.123  PROPPATCH 405 /dav/lists/3 47.424µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:12.209566+00:002022-09-11T14:54:12.209300213+01:00: WEB 	▶ 123.123.123.123  PROPFIND 401 /dav/lists/3/ 57.217µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:12.646655+00:00[31m2022-09-11T14:54:12.646229795+01:00: ERROR	▶ [DATABASE] 3ac1e[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks
2022-09-11 13:54:12.659626+00:002022-09-11T14:54:12.659365708+01:00: WEB 	▶ 123.123.123.123  PROPFIND 207 /dav/lists/3/ 357.054113ms - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:13.246989+00:002022-09-11T14:54:13.246776299+01:00: WEB 	▶ 123.123.123.123  PROPFIND 401 /dav/lists/3/ 59.198µs - iOS/16.0 (20A362) remindd/1.0
2022-09-11 13:54:13.720610+00:00[31m2022-09-11T14:54:13.720340563+01:00: ERROR	▶ [DATABASE] 3ac7f[0m [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks

Sure! This is what my logs look like when one of those emails is sent. I am using Fastmail as my email hosting provider, I wouldn't be surprised if the Error closing the mail server connection is caused by them rate-limiting requests due to the spam.

To create the errors above, I 'Enabled' Vikunja in the iOS accounts menu and then opened the iOS Reminders app. I was also sent this email at the same time as the errors above:

image


Snuggle commented on 2022-09-11T14:09:53.000Z:

If you'd like to see the log with debug mode enabled, here you go: https://pastebin.com/yTyrez3G


@kolaente commented on 2022-09-13T15:13:25.000Z:

@Snuggle Are you using db caching? Does it work if you disable it?


Skotticus commented on 2022-09-18T16:09:28.000Z:

Is this possibly related to Apple's .well-known specification? I ran into this when setting up dockerized Baikal with Traefik — it needed a bunch of middleware to play nice with iOS.


@kolaente commented on 2022-09-20T15:35:56.000Z:

@Skotticus Might be. Do you have any info about this specifically?


LucaBernstein commented on 2022-09-24T17:28:55.000Z:

I've been testing with a valid certificate and have the same results as @AverageMarcus.

It almost seems as if the iOS client is able to write new tasks but not read.

I also set up an SMTP server and during this behaviour my emails get spammed every few seconds with the following, even though adding new tasks works correctly and the lists are showing up (albeit with 0 tasks still which is not correct) so it absolutely has the correct credentials.

About the emails: They will be solved with my PR: https://kolaente.dev/vikunja/api/pulls/1252


ch88ba commented on 2023-03-05T11:28:10.000Z:

I've been trying out Vikunja lately and it's been great, but the lack of iOS support is stopping me using it full time. Anyway, I decided to dig more into this and I think I've worked out the issue.

iOS seems to send HTTP Auth headers with square brackets: Authorization:[Basic blahtoken], which Vikunja does not like.

You can test this yourself with cURL. The following always returns a 401:

curl -v https://tasks.example.com/dav/lists/1 -H "Authorization:[Basic footoken]"

...but the following works fine

curl -v https://tasks.example.com/dav/lists/1 -H "Authorization: Basic footoken"

I don't know Go, but happy to try and take a look at a fix if no one is available.


@kolaente commented on 2023-03-05T11:36:47.000Z:

@chrisbanes okay that's interesting. How did you figure that out?

From my own testing it looks like it kind of works initially but then doesn't. If the problem is the brackets, then it wouldn't work at all.


ch88ba commented on 2023-03-05T11:39:19.000Z:

Just looking through the debug logs. It is an assumption based on the cURL requests I used above, I haven't actually got iOS to sync yet. I'm trying to work out if I can modify the request headers with Traefik to verify.


@kolaente commented on 2023-03-05T11:41:16.000Z:

If it's only in the logs, it might be the log format - headers are usually string slices so the [] around them could just denote that.


ch88ba commented on 2023-03-05T11:44:22.000Z:

Ah you're right. That was silly of me 🤦‍♂️


fiigivi commented on 2023-05-09T11:45:17.000Z:

I would love to see some progress on this bug. It's the only blocker stopping me from actually using Vikunja.

Maybe post a bugbounty or something?


@kolaente commented on 2023-05-09T14:36:03.000Z:

Maybe post a bugbounty or something?

Please, go ahead :)


fiigivi commented on 2023-05-09T16:44:43.000Z:

Where would you prefer one to be posted?


ch88ba commented on 2023-05-17T13:22:33.000Z:

From my limited time debugging this, I was 80% sure this is an issue in https://github.com/samedi/caldav-go which Vikunja uses underneath, but I couldn't find the direct cause.


Skotticus commented on 2023-05-17T18:47:47.000Z:

@Skotticus Might be. Do you have any info about this specifically?

Oh man, I let this one go, didn't I? I don't know where exactly y'all are at with this, but I can copy what I have in my Traefik config for you.

My fileconfig.yml for Traefik contains this:

  middlewares:  
    # Baikal calDAV server
    baikal-dav:
      redirectRegex:
        regex: "https://(.*)/.well-known/(card|cal)dav"
        replacement: "https://$1/dav.php/"
        permanent: "true"

For what it's worth, this didn't stop me from setting up Vikunja for my business, and my team seems to be fans.


fiigivi commented on 2023-05-20T06:57:31.000Z:

From my limited time debugging this, I was 80% sure this is an issue in https://github.com/samedi/caldav-go which Vikunja uses underneath, but I couldn't find the direct cause.

samedi/caldav-go hasn't been updated since 2019, and seems abandoned. Might be time to switch this out with simething like emersion/go-webdav?

As mentioned earlier, I'd be willing to put up money to get this fixed. Maybe something like US$50? But unless someone can point me towards a service that facilitates transactions like this, all I can do is promise to paypal someone :)


@kolaente commented on 2023-05-23T14:47:18.000Z:

samedi/caldav-go hasn't been updated since 2019, and seems abandoned. Might be time to switch this out with simething like emersion/go-webdav?

Is there any documentation for go-webdav? I'd be open to switch in hope of some issues going away but not if that would mean to figure out most of the implementation details.

As mentioned earlier, I'd be willing to put up money to get this fixed. Maybe something like US$50? But unless someone can point me towards a service that facilitates transactions like this, all I can do is promise to paypal someone :)

We haven't yet set up a bounty program on a platform so let's say if someone wants to tackle this please comment here and then paypal it I guess? Open for alternatives.


adamshand commented on 2023-06-07T19:44:15.000Z:

Also happy to chuck some money into a bounty, say NZD$100?


LucaBernstein commented on 2023-06-17T09:29:50.000Z:

Is there any documentation for go-webdav? I'd be open to switch in hope of some issues going away but not if that would mean to figure out most of the implementation details.

Seems the auto-generated documentation could be quote helpful: https://pkg.go.dev/github.com/emersion/[email protected]/caldav

Internally, it seems to be using: https://github.com/emersion/go-ical


fiigivi commented on 2023-07-17T13:37:30.000Z:

I really want this to work, so I created a work-around.

Be aware - this work-around is really fragile. It also just syncs one project to one calendar*.

The work-around is to use vdirsyncer to sync a vikunja project (via caldav) to disk, and then sync that up to another caldav-host (I use Baïkal).

In this example-config for vdirsyncer, I sync project 1 to the calendar named vikunja in baikal.

[general]
status_path = "~/.vdirsyncer/status/"

[pair vk]
a = "vkbk"
b = "vikunja"
collections = null
conflict_resolution = "a wins"

[pair bk]
a = "vkbk"
b = "baikal"
collections = null
conflict_resolution = "a wins"

[storage vikunja]
type = "caldav"
url = "https://vikunja.example.org/dav/projects/1"
item_types = ["VTODO"]
username = "fiigivi"
password = "XXX"

[storage baikal]
type = "caldav"
url = "https://baikal.example.org/dav.php/calendars/fiigivi/vikunja/"
username = "fiigivi"
password = "XXX"

[storage vkbk]
type = "filesystem"
path = "~/.vdirsyncer/vkbk/"
fileext = ".ics"

And now you can run vdirsyncer sync vk and vdirsyncer sync bk to sync a project in vikunja and a calendar in baikal (after having run vdirsyncer discover when first setting this up).

As noted, this is really fragile, and I've come across two semi-big problems so far.

The first problem is that vikunja creates a field for METHOD: which baikal does not support (I get Unknown error occurred for bk: 415 Client Error: Unsupported Media Type), so before running vdirsyncer sync bk you have to remove those lines (I just run sed -i '/^METHOD/d' ~/.vdirsyncer/vkbk/* && vdirsyncer sync bk). I don't know if you can expect the same error with other caldav-servers. Also, this problem is why you have to sync to disc before syncing to baikal. If not for this, it would be possible to directly sync baikal and vikunja.

The second problem is that vikunja only does VTODO, so if one of your caldav-clients creates a more advanced object, the sync will fail. Just creating a reminder on iOS/macOS works fine. You can even add a due-date. But, if you add a due-time from iOS/macOS, it creates a VCALENDAR-object, and syncing to vikunja will fail.

I'd recommend to keep it as simple as possible (KISS!) when interacting with this calendar from other clients.

[*]: As mentioned, this also just syncs one project to one calendar. You can probably sync more project and calendars using the same config, without duplicating all of it, but you'll have to read up on collections in the vdirsyncer-config, and match up names in vikunja and on the caldav-server.


luwol03 commented on 2023-09-25T11:01:04.000Z:

Hello, I'd love to have this feature too, but I have no skill in go. So I tried to analyze where the problem is by using a proxy to check the requests made by iOS to vikunja and a nextcloud server in comparison. The first requests look more or less the same, but then vikunja doesn't return the todo items, which seems like why they don't show up in the reminders app. Hope this helps someone.

Discover all lists

Nextcloud PROPFIND /remote.php/dav/calendars/{user-id}/

Request:
<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
  <A:prop>
    <A:add-member/>
    <C:allowed-sharing-modes xmlns:C="http://calendarserver.org/ns/"/>
    <D:autoprovisioned xmlns:D="http://apple.com/ns/ical/"/>
    <E:bulk-requests xmlns:E="http://me.com/_namespace/"/>
    <B:calendar-alarm xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <D:calendar-color xmlns:D="http://apple.com/ns/ical/"/>
    <B:calendar-description xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:calendar-free-busy-set xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <D:calendar-order xmlns:D="http://apple.com/ns/ical/"/>
    <B:calendar-timezone xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:current-user-privilege-set/>
    <B:default-alarm-vevent-date xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:default-alarm-vevent-datetime xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:displayname/>
    <C:getctag xmlns:C="http://calendarserver.org/ns/"/>
    <C:invite xmlns:C="http://calendarserver.org/ns/"/>
    <D:language-code xmlns:D="http://apple.com/ns/ical/"/>
    <D:location-code xmlns:D="http://apple.com/ns/ical/"/>
    <B:max-attendees-per-instance xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:owner/>
    <C:pre-publish-url xmlns:C="http://calendarserver.org/ns/"/>
    <C:publish-url xmlns:C="http://calendarserver.org/ns/"/>
    <C:push-transports xmlns:C="http://calendarserver.org/ns/"/>
    <C:pushkey xmlns:C="http://calendarserver.org/ns/"/>
    <A:quota-available-bytes/>
    <A:quota-used-bytes/>
    <D:refreshrate xmlns:D="http://apple.com/ns/ical/"/>
    <A:resource-id/>
    <A:resourcetype/>
    <B:schedule-calendar-transp xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:schedule-default-calendar-URL xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <C:source xmlns:C="http://calendarserver.org/ns/"/>
    <C:subscribed-strip-alarms xmlns:C="http://calendarserver.org/ns/"/>
    <C:subscribed-strip-attachments xmlns:C="http://calendarserver.org/ns/"/>
    <C:subscribed-strip-todos xmlns:C="http://calendarserver.org/ns/"/>
    <B:supported-calendar-component-set xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:supported-calendar-component-sets xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:supported-report-set/>
    <A:sync-token/>
  </A:prop>
</A:propfind>
Response:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id-#1}/</d:href>
    <d:propstat>
      <d:prop>
        <cs:allowed-sharing-modes>
          <cs:can-be-shared/>
          <cs:can-be-published/>
        </cs:allowed-sharing-modes>
        <x2:calendar-color xmlns:x2="http://apple.com/ns/ical/">#007AFF</x2:calendar-color>
        <x2:calendar-order xmlns:x2="http://apple.com/ns/ical/">1</x2:calendar-order>
        <cal:calendar-timezone>
          BEGIN:VCALENDAR&#13;
          VERSION:2.0&#13;
          CALSCALE:GREGORIAN&#13;
          BEGIN:VTIMEZONE&#13;
          TZID:Europe/Berlin&#13;
          BEGIN:DAYLIGHT&#13;
          TZOFFSETFROM:+0100&#13;
          RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU&#13;
          DTSTART:19810329T020000&#13;
          TZNAME:MESZ&#13;
          TZOFFSETTO:+0200&#13;
          END:DAYLIGHT&#13;
          BEGIN:STANDARD&#13;
          TZOFFSETFROM:+0200&#13;
          RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU&#13;
          DTSTART:19961027T030000&#13;
          TZNAME:MEZ&#13;
          TZOFFSETTO:+0100&#13;
          END:STANDARD&#13;
          END:VTIMEZONE&#13;
          END:VCALENDAR&#13;
        </cal:calendar-timezone>
        <d:displayname>DEFAULT_TASK_CALENDAR_NAME</d:displayname>
        <cs:getctag>http://sabre.io/ns/sync/4</cs:getctag>
        <d:owner>
          <d:href>/remote.php/dav/principals/users/{user-id}/</d:href>
        </d:owner>
        <d:resourcetype>
          <d:collection/>
          <cal:calendar/>
        </d:resourcetype>
        <cal:schedule-calendar-transp>
          <cal:transparent/>
        </cal:schedule-calendar-transp>
        <cal:supported-calendar-component-set>
          <cal:comp name="VTODO"/>
        </cal:supported-calendar-component-set>
        <d:sync-token>http://sabre.io/ns/sync/4</d:sync-token>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Vikunja PROPFIND /dav/projects/

Request:
<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
  <A:prop>
    <A:add-member/>
    <C:allowed-sharing-modes xmlns:C="http://calendarserver.org/ns/"/>
    <F:autoprovisioned xmlns:F="http://apple.com/ns/ical/"/>
    <E:bulk-requests xmlns:E="http://me.com/_namespace/"/>
    <B:calendar-alarm xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <F:calendar-color xmlns:F="http://apple.com/ns/ical/"/>
    <B:calendar-description xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:calendar-free-busy-set xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <F:calendar-order xmlns:F="http://apple.com/ns/ical/"/>
    <B:calendar-timezone xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:current-user-privilege-set/>
    <B:default-alarm-vevent-date xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:default-alarm-vevent-datetime xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:displayname/>
    <C:getctag xmlns:C="http://calendarserver.org/ns/"/>
    <F:language-code xmlns:F="http://apple.com/ns/ical/"/>
    <F:location-code xmlns:F="http://apple.com/ns/ical/"/>
    <B:max-attendees-per-instance xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:owner/>
    <C:pre-publish-url xmlns:C="http://calendarserver.org/ns/"/>
    <C:publish-url xmlns:C="http://calendarserver.org/ns/"/>
    <C:push-transports xmlns:C="http://calendarserver.org/ns/"/>
    <C:pushkey xmlns:C="http://calendarserver.org/ns/"/>
    <A:quota-available-bytes/>
    <A:quota-used-bytes/>
    <F:refreshrate xmlns:F="http://apple.com/ns/ical/"/>
    <A:resource-id/>
    <A:resourcetype/>
    <B:schedule-calendar-transp xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:schedule-default-calendar-URL xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <C:source xmlns:C="http://calendarserver.org/ns/"/>
    <C:subscribed-strip-alarms xmlns:C="http://calendarserver.org/ns/"/>
    <C:subscribed-strip-attachments xmlns:C="http://calendarserver.org/ns/"/>
    <C:subscribed-strip-todos xmlns:C="http://calendarserver.org/ns/"/>
    <B:supported-calendar-component-set xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <B:supported-calendar-component-sets xmlns:B="urn:ietf:params:xml:ns:caldav"/>
    <A:supported-report-set/>
    <A:sync-token/>
  </A:prop>
</A:propfind>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
  <D:response>
    <D:href>/dav/projects/1</D:href>
    <D:propstat>
      <D:prop>
        <D:displayname>Inbox</D:displayname>
        <D:owner>/dav/</D:owner>
        <D:resourcetype>
          <D:collection/>
          <C:calendar/>
        </D:resourcetype>
        <C:supported-calendar-component-set>
          <C:comp name="VCALENDAR"/>
          <C:comp name="VTODO"/>
        </C:supported-calendar-component-set>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>
  <D:response>
    <D:href>/dav/projects/2</D:href>
    <D:propstat>
      <D:prop>
        <D:displayname>Projekt 1</D:displayname>
        <D:owner>/dav/</D:owner>
        <D:resourcetype>
          <D:collection/>
          <C:calendar/>
        </D:resourcetype>
        <C:supported-calendar-component-set>
          <C:comp name="VCALENDAR"/>
          <C:comp name="VTODO"/>
        </C:supported-calendar-component-set>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>
</D:multistatus>

Get sync token request

Nextcloud PROPFIND /remote.php/dav/calendars/{user-id}/{list-id-#1}

Request:
<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
  <A:prop>
    <C:getctag xmlns:C="http://calendarserver.org/ns/"/>
    <A:sync-token/>
  </A:prop>
</A:propfind>
Response:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id-#1}/</d:href>
    <d:propstat>
      <d:prop>
        <cs:getctag>http://sabre.io/ns/sync/4</cs:getctag>
        <d:sync-token>http://sabre.io/ns/sync/4</d:sync-token>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Vikunja PROPFIND /dav/projects/2/

Request:
<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
  <A:prop>
    <C:getctag xmlns:C="http://calendarserver.org/ns/"/>
    <A:sync-token/>
  </A:prop>
</A:propfind>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
  <D:response>
    <D:href>/dav/projects/2</D:href>
    <D:propstat>
      <D:prop/>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>
</D:multistatus>

List reminders todos

Nextcloud PROPFIND /remote.php/dav/calendars/{user-id}/{list-id-#1}

Request:
<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
  <A:prop>
    <A:getcontenttype/>
    <A:getetag/>
  </A:prop>
</A:propfind>
Response:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id-#1}/</d:href>
    <d:propstat>
      <d:prop/>
      <d:status>HTTP/1.1 418 I'm a teapot</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id-#1}/{item-id-#1}.ics</d:href>
    <d:propstat>
      <d:prop>
        <d:getcontenttype>text/calendar; charset=utf-8; component=vtodo</d:getcontenttype>
        <d:getetag>&quot;{some-random?-md5-like-hash-#1}&quot;</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id-#1}/{item-id-#2}.ics</d:href>
    <d:propstat>
      <d:prop>
        <d:getcontenttype>text/calendar; charset=utf-8; component=vtodo</d:getcontenttype>
        <d:getetag>&quot;{some-random?-md5-like-hash-#2}&quot;</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id-#1}/{item-id-#3}.ics</d:href>
    <d:propstat>
      <d:prop>
        <d:getcontenttype>text/calendar; charset=utf-8; component=vtodo</d:getcontenttype>
        <d:getetag>&quot;{some-random?-md5-like-hash-#3}&quot;</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Vikunja PROPFIND /dav/projects/2/

Request:
<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
  <A:prop>
    <A:getcontenttype/>
    <A:getetag/>
  </A:prop>
</A:propfind>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
  <D:response>
    <D:href>/dav/projects/2</D:href>
    <D:propstat>
      <D:prop>
        <D:getcontenttype>text/calendar</D:getcontenttype>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>
</D:multistatus>

Get todo items by their id

Nextcloud REPORT /remote.php/dav/calendars/{user-id}/{list-id-#1}/

Request:
<?xml version="1.0" encoding="UTF-8"?>
<B:calendar-multiget xmlns:B="urn:ietf:params:xml:ns:caldav">
  <A:prop xmlns:A="DAV:">
    <A:getetag/>
    <B:calendar-data/>
    <C:created-by xmlns:C="http://calendarserver.org/ns/"/>
    <C:updated-by xmlns:C="http://calendarserver.org/ns/"/>
    <B:schedule-tag/>
  </A:prop>
  <A:href xmlns:A="DAV:">/remote.php/dav/calendars/{user-id}/{list-id-#1}/{item-id-#1}.ics</A:href>
  <A:href xmlns:A="DAV:">/remote.php/dav/calendars/{user-id}/{list-id-#1}/{item-id-#2}.ics</A:href>
  <A:href xmlns:A="DAV:">/remote.php/dav/calendars/{user-id}/{list-id-#1}/{item-id-#3}.ics</A:href>
</B:calendar-multiget>
Response:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id}/{idem-id-#1}.ics</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>&quot;{some-random?-md5-like-hash-#1}&quot;</d:getetag>
        <cal:calendar-data>
          BEGIN:VCALENDAR
          CALSCALE:GREGORIAN
          PRODID:-//Apple Inc.//iOS 17.0//EN
          VERSION:2.0
          BEGIN:VTODO
          CREATED:20230924T204725Z
          DTSTAMP:20230924T204725Z
          LAST-MODIFIED:20230924T204725Z
          STATUS:NEEDS-ACTION
          SUMMARY:Take out the dog
          UID:{some-UUID-#3}
          END:VTODO
          END:VCALENDAR
        </cal:calendar-data>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <cs:created-by/>
        <cs:updated-by/>
        <cal:schedule-tag/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id}/{idem-id-#2}.ics</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>&quot;{some-random?-md5-like-hash-#2}&quot;</d:getetag>
        <cal:calendar-data>
          BEGIN:VCALENDAR
          CALSCALE:GREGORIAN
          PRODID:-//Apple Inc.//iOS 17.0//EN
          VERSION:2.0
          BEGIN:VTODO
          CREATED:20230924T203735Z
          DTSTAMP:20230924T203735Z
          LAST-MODIFIED:20230924T203735Z
          STATUS:NEEDS-ACTION
          SUMMARY:Buy banannas
          UID:{some-UUID-#2}
          END:VTODO
          END:VCALENDAR
        </cal:calendar-data>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <cs:created-by/>
        <cs:updated-by/>
        <cal:schedule-tag/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/calendars/{user-id}/{list-id}/{idem-id-#3}.ics</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>&quot;{some-random?-md5-like-hash-#3}&quot;</d:getetag>
        <cal:calendar-data>
          BEGIN:VCALENDAR
          VERSION:2.0
          PRODID:-//Nextcloud Tasks v0.14.5
          BEGIN:VTODO
          UID:{some-UUID-#3}
          CREATED:20230924T230028
          LAST-MODIFIED:20230924T230028
          DTSTAMP:20230924T230028
          SUMMARY:Figgure out the ical problem with Vikunja
          END:VTODO
          END:VCALENDAR
        </cal:calendar-data>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <cs:created-by/>
        <cs:updated-by/>
        <cal:schedule-tag/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Vikunja REPORT /dav/projects/2/

This request is not made, because there were no todo items returend before


pinpox commented on 2024-01-11T11:32:48.000Z:

Still want this feature very much. If you decide to put up a bounty for it, I'm willing to add something to it.

Maybe if all the people who want this very useful feature chime in, someone actually fixes it :)


PterX commented on 2024-01-14T14:54:06.000Z:

This is a very useful feature. I really hope the author can spend some effort to upgrade it.


fiigivi commented on 2024-03-01T06:29:44.000Z:

Still want this feature very much. If you decide to put up a bounty for it, I'm willing to add something to it.

Maybe if all the people who want this very useful feature chime in, someone actually fixes it :)

Though no "official" bugbounty have been posted, at least two of us have piped up that we want to put money towards a fix [1][2]. I still stand by that.

https://kolaente.dev/vikunja/vikunja/issues/753#issuecomment-52950 I really want this to work, so I created a work-around.

Be aware - this work-around is really fragile. It also just syncs one project to one calendar*.

This workaround was too fragile to be usable.

I believe the simplest solution is to move on to a new library. I've been learning some go, and have been planning on taking a crack at this, but life keeps coming in the way 🙃

vikunja-bot avatar Apr 01 '25 11:04 vikunja-bot

any updates on this?

boexler avatar Jul 17 '25 09:07 boexler

There's a PR with partial fixes: https://github.com/go-vikunja/vikunja/pull/748

kolaente avatar Jul 17 '25 09:07 kolaente

so it mostly works nowadays? will test soon then!

xeruf avatar Sep 04 '25 21:09 xeruf

In my case, it works quite unusually. After generating the token in Vikunja and adding the calendar to the Apple Reminders app, all projects appear and it works as expected. After some time (maybe 1 day), only one random project remains, and the others disappear. This happens on both iOS and macOS.

mareklat avatar Sep 05 '25 04:09 mareklat

In my case, it works quite unusually. After generating the token in Vikunja and adding the calendar to the Apple Reminders app, all projects appear and it works as expected. After some time (maybe 1 day), only one random project remains, and the others disappear. This happens on both iOS and macOS.

I want to extend on that, that for me the one project that remains is my username but without any tasks. So it is unusable when it happens.

TheSander562 avatar Sep 05 '25 06:09 TheSander562

Having a similar issue: I set it up, then all lists appear, then they disappear barring one.

A fixing PR is merged and should be available with the upcoming 1.0, will test on my nightly instance...

xeruf avatar Sep 10 '25 18:09 xeruf

Hi everyone, I installed Vikunja on my cluster today and tried setting up CalDAV sync with my iPhone. I can confirm that all projects showed up (as "Lists") in the native reminder app. Also, after opening one list all the others disappeared, similar to what others have described in this thread. However, after the projects went missing I noticed that iOS quietly changed the URL in the account settings! Initially it was /dav/principals/username/, as shown by the web ui and as set by me creating the account. After opening one of the lists, the URL got changed to dav/projects/3/ - which explains why there was only one project left. I manually changed the URL back to the initial one and since then, all projects are shown (and don't disappear anymore)! I have no idea why iOS does this but it seems that manually correcting the URL once did the trick for me!

I should note that I have disabled Calendar sync in the account settings and only kept reminder sync enabled. iOS Version: user_agent="iOS/18.7 (22H20) remindd/3740", Vikunja v1.0.0-rc2

Edit: Celebrated too early. After about half an hour iOS's remindd decided to to an OPTIONS /dav/projects/ request instead of OPTIONS /dav/principals/username/ as it did initially. After that it only syncs one project again (the one with the highest id)

PalatinCoder avatar Sep 28 '25 13:09 PalatinCoder