This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Sync with icloud Caldav

Tags: None
(comma "," separated)
gamma
Registered Member
Posts
2
Karma
0

Sync with icloud Caldav

Tue Mar 31, 2020 9:06 am
Hey,

i installed Kontact and set up all my accounts.

Everything is working fine, even gmail and my work Office 365 exchange shared calendar.

The one thing not working is the synchronization with apples caldav server.
I set up a new dav Groupware ressource, added my username and a special third-party-app-password.
The account SEEMS to be working, Kontact can get all the calendars in my icloud account. But no data is actually sync'ed.

I tried to get some usefull information out of akonadiconsole, but i cannot find any error. If i synchronize the dav groupware account through akonadiconsole i can see some messages in the debugger view, but nothing leads me to any kind of problem.

Any ideas what i can do to find the issue behind the missing calendar events?

I use Kontacts on Kubuntu 20.04. But it is not a Kubuntu problem. I just set up a VM with opensuse tumbleweed and can reproduce the same behaviour in Kontacts. The tumbleweed vm has kontact 5.13.3 running.

Any tipps are appreciated!

Edit 1: I tried the caldav.icloud.com address as well as https://pXX-caldav.icloud.com/<DSid>/calendars/<pGUID>. Both adresses with the same result.
Edit 2: Maybe it's related to this bug https://bugs.kde.org/show_bug.cgi?id=386985
sunnykodukula
Registered Member
Posts
4
Karma
0

Re: Sync with icloud Caldav

Thu Dec 10, 2020 12:20 am
I have the same problem with CalDav and iCloud. With addressess i cannot even get Carddav working with KAddressbook. Everything works like a charm with evolution. though as much as i want to use kontact these drawbacks make me stay with evolution.
wabbajack
Registered Member
Posts
4
Karma
0

Re: Sync with icloud Caldav

Sat Aug 14, 2021 9:57 pm
I am having this issue. Could somebody please advise what I need to do? I can load the calendar names, but no events show up.

The only items that show up (and delegate across iCloud to other devices) are events that I create from within Kontact/KOrganizer.

Kontact version 5.16.3 (20.12.3)

Ubuntu 21.04 with kubuntu-desktop

Update It seems KOrganier is unable to bring the calendar "online":

Code: Select all
org.kde.pim.davresource: Error when uploading item: 400 "There was a problem with the request. The item has not been created on the server.\nThe file or folder p29-caldav.icloud.com does not exist. (0)."
org.kde.pim.davresource: Error when uploading item: 400 "There was a problem with the request. The item has not been created on the server.\nThe file or folder p29-caldav.icloud.com does not exist. (0)."


If I try to refresh the calendar by hitting 'F5', I see:

Code: Select all
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.davresource: Error when uploading item: 400 "There was a problem with the request. The item has not been created on the server.\nAn unexpected error (401) occurred while attempting to upload https://p29-caldav.icloud.com/297875558/calendars/DC541162-75C8-474C-8BD9-36A41CE4632F/1628981253.R720.ics. (401)."
org.kde.pim.davresource: Error when uploading item: 400 "There was a problem with the request. The item has not been created on the server.\nAn unexpected error (401) occurred while attempting to upload https://p29-caldav.icloud.com/297875558/calendars/DC541162-75C8-474C-8BD9-36A41CE4632F/1628981253.R835.ics. (401)."





If I issue `akondictl stop` and then `akondictl start --verbose` from console, and I open KOrganizer, I only see this:

Code: Select all
org.kde.pim.akonadicontrol: Service "org.kde.korganizer" owner changed from "" to ":1.411"
org.kde.pim.akonadicontrol: Service "org.kde.Akonadi.Firstrun.lock" owner changed from "" to ":1.411"
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4811ea70) )
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver: Subscriber "" disconnected
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4833ea50) )
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4833ea50) )
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe483708b0) )
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4833e7a0) )
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe483842f0) )
org.kde.pim.akonadicontrol: Service "org.kde.Akonadi.Firstrun.lock" owner changed from ":1.411" to ""
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe4811ea70) identified as "TagCacheMonitor - 94550861420560"
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe4833ea50) identified as "ETMCalendarMonitor - 94550861362608"
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe483708b0) identified as "TagCacheMonitor - 94550863447424"
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe4833e7a0) identified as "ItemMonitorMonitor - 94550862697664"
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe483842f0) identified as "TagCacheMonitor - 94550864662176"


After adding a new event from KOrganizer:

Code: Select all
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4808b050) )
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4822d3c0) )
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe4808b050) identified as "TagWidgetMonitor - 94550872835120"
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe4822d3c0) identified as "TagCacheMonitor - 94550876842368"
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4801cbe0) )
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe4801cbe0) identified as "EditorItemManagerMonitor - 94550879092960"
org.kde.pim.akonadiserver: Subscriber "EditorItemManagerMonitor - 94550879092960" disconnected
org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7efe4801cbe0) )
org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7efe4801cbe0) identified as "EditorItemManagerMonitor - 94550871956608"
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver: Subscriber "TagCacheMonitor - 94550876842368" disconnected
org.kde.pim.akonadiserver: Subscriber "TagWidgetMonitor - 94550872835120" disconnected
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver.search: Executing search "searchUpdate-1628979148"
org.kde.pim.akonadiserver.search: Search  "searchUpdate-1628979148" done (without remote search)
org.kde.pim.akonadiserver.search: Search update for collection "OpenInvitations" ( 81 ) finished: all results:  0 , removed results: 0
org.kde.pim.akonadiserver.search: Executing search "searchUpdate-1628979148"
org.kde.pim.akonadiserver.search: Search  "searchUpdate-1628979148" done (without remote search)
org.kde.pim.akonadiserver.search: Search update for collection "DeclinedInvitations" ( 82 ) finished: all results:  0 , removed results: 0


System Information:
Code: Select all
Operating System: Kubuntu 21.04
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-25-generic
OS Type: 64-bit
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
wabbajack
Registered Member
Posts
4
Karma
0

Re: Sync with icloud Caldav

Sat Aug 14, 2021 11:13 pm
It seems that KOrganizer is not providing authorization headers. I'm proxying KDE through burp and seeing this:

Request
Code: Select all
PROPFIND / HTTP/1.1
Host: p29-contacts.icloud.com
Connection: close
User-Agent: Mozilla/5.0 (X11; Linux 5.11.0-25-generic; English) KHTML/5.80.0 (like Gecko) Konqueror/5 KIO/5.80zz
Pragma: no-cache
Cache-control: no-cache
Accept: text/html, text/*;q=0.9, image/jpeg;q=0.9, image/png;q=0.9, image/*;q=0.9, */*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Charset: utf-8,*;q=0.5
Accept-Language: en-US,en;q=0.9
Depth: 0
Content-Type: text/xml; charset=utf-8
Content-Length: 243

<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
 <prop xmlns="DAV:">
  <addressbook-home-set xmlns="urn:ietf:params:xml:ns:carddav"/>
  <current-user-principal xmlns="DAV:"/>
  <principal-URL xmlns="DAV:"/>
 </prop>
</propfind>


Response
Code: Select all
HTTP/1.1 401 Unauthorized
Server: AppleHttpServer/ba512e728b68b6da7d047b7c7c12cae42f0df279
Date: Sat, 14 Aug 2021 23:09:45 GMT
Content-Length: 0
Connection: close
X-Apple-Jingle-Correlation-Key: JPZAPLKDIRDRJKF2KFOE2BK23Q
apple-seq: 0
apple-tk: false
Apple-Originating-System: UnknownOriginatingSystem
X-Responding-Instance: carddav:12900901:st13p29ic-hpaf17231701:8001:2114B499:e2ddcf1cce67
WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="Newcastle"
Strict-Transport-Security: max-age=31536000; includeSubDomains;
via: xrail:st53p00ic-qujn11051301.me.com:8301:21D218:grp63,631194250daa17e24277dea86cf30319:80a5ec9f5b4ae6cb6c60e1ed056f1f0a:Miami
X-Apple-Request-UUID: 4bf207ad-4344-4714-a8ba-515c4d055adc
access-control-expose-headers: X-Apple-Request-UUID,Via
X-Apple-Edge-Response-Time: 22
wabbajack
Registered Member
Posts
4
Karma
0

Re: Sync with icloud Caldav

Sat Aug 14, 2021 11:18 pm
Validated that when adding the Authorization header manually I get a proper response:

REQUEST
Code: Select all
PROPFIND / HTTP/1.1
Host: p29-contacts.icloud.com
Connection: close
User-Agent: Mozilla/5.0 (X11; Linux 5.11.0-25-generic; English) KHTML/5.80.0 (like Gecko) Konqueror/5 KIO/5.80zz
Pragma: no-cache
Cache-control: no-cache
Accept: text/html, text/*;q=0.9, image/jpeg;q=0.9, image/png;q=0.9, image/*;q=0.9, */*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Charset: utf-8,*;q=0.5
Accept-Language: en-US,en;q=0.9
Authorization: BASIC <redacted>
Depth: 0
Content-Type: text/xml; charset=utf-8
Content-Length: 243

<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
 <prop xmlns="DAV:">
  <addressbook-home-set xmlns="urn:ietf:params:xml:ns:carddav"/>
  <current-user-principal xmlns="DAV:"/>
  <principal-URL xmlns="DAV:"/>
 </prop>
</propfind>


RESPONSE
Code: Select all
HTTP/1.1 207 Multi-Status
Server: AppleHttpServer/ba512e728b68b6da7d047b7c7c12cae42f0df279
Date: Sat, 14 Aug 2021 23:17:40 GMT
Content-Type: application/xml; charset=UTF-8
Connection: close
X-Apple-Jingle-Correlation-Key: <redacted>
apple-seq: 0
apple-tk: false
Apple-Originating-System: UnknownOriginatingSystem
X-Responding-Instance: carddav:12900601:st13p29ic-hpaf18251001:8001:e2ddcf1cce67
Strict-Transport-Security: max-age=31536000; includeSubDomains;
via: xrail:st53p00ic-qujn12070901.me.com:8301:21D218:grp63,<redacted>
X-Apple-Request-UUID: a93efef6-7c75-4b1e-8b1a-5ae354568363
access-control-expose-headers: X-Apple-Request-UUID,Via
X-Apple-Edge-Response-Time: 67
Content-Length: 1129

<?xml version="1.0" encoding="UTF-8"?>
<multistatus xmlns="DAV:">

   <response>
      <href>/</href>
      
      <propstat>
         <prop>
         
         
           
         <current-user-principal>
             <href>/<redacted>/principal/</href>
         </current-user-principal>
         
         
         
         
           
           
           
           
           

           
           
           
           
           
         
         
           
           
           
           
           
           
           
           
           
           
           
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
         </prop>
         <status>HTTP/1.1 200 OK</status>
      </propstat>
      
      
      <propstat>
         <prop>
            <principal-URL/>
<addressbook-home-set xmlns="urn:ietf:params:xml:ns:carddav"/>

         </prop>
         <status>HTTP/1.1 404 Not Found</status>
      </propstat>
       
   </response>

</multistatus>

wabbajack
Registered Member
Posts
4
Karma
0

Re: Sync with icloud Caldav

Sat Aug 14, 2021 11:33 pm
There is a bug open for this, but no action in 6 months:

https://bugs.kde.org/show_bug.cgi?id=434757
jjcv
Registered Member
Posts
1
Karma
0

Re: Sync with icloud Caldav

Tue Feb 15, 2022 10:16 pm
It looks like to cause of the problem has been found and a fix has been issued.

https://invent.kde.org/frameworks/kdav/-/merge_requests/16

Waiting for the update now.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]