Bug 353987 - Incomplete CardDav sync with ownCloud
Summary: Incomplete CardDav sync with ownCloud
Status: RESOLVED NOT A BUG
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: DAV Resource (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-16 21:52 UTC by sourcemaker
Modified: 2016-03-01 23:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sourcemaker 2015-10-16 21:52:05 UTC
I use Kontact 5.0.2 and owncloud 8.1.3 to synchronize my contacts.
Unfortunately, the contacts are only partially synchronized.

I can sync Akonadi as often as I want, the number of missing contacts remain the same.
Since my Android phone finds all contacts, I assume that Akonadi causes the error.


Reproducible: Always

Steps to Reproduce:
1. Add davgroupware resource to akonadi
2. Synchronize with owncloud (CardDav)

Actual Results:  
Missing contacts!

Expected Results:  
All contacts are synchronized
Comment 1 Walton Hoops 2015-10-17 19:53:52 UTC
I'm having the same issue. Also Kontact 5.0.2 and OwnCloud 8.1.3. Output from the Akondi Debugger:

akonadi_davgroupware_resource_2 (0x7f89bc00cbd0) 39 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "38" Name: "https://cloud.waltonhoops.com/remote.php/carddav/addressbooks/whoops/contacts/" Parent ID: "35" Remote ID: "https://cloud.waltonhoops.com/remote.php/carddav/addressbooks/whoops/contacts/" Remote Revision: "" Resource: "akonadi_davgroupware_resource_2" Mimetypes: "(inode/directory, text/directory)" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "(ALL)" } Ancestors: { { ID: "35" Remote ID: "akonadi_davgroupware_resource_2" Name: "akonadi_davgroupware_resource_2" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((AccessRights, a)(ENTITYDISPLAY, ("Contacts" "" "" ()))(davprotocol, 1))" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_davgroupware_resource_2 (0x7f89bc00cbd0) 39 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_davgroupware_resource_2 (0x7f89bc00cbd0) 40 { Command: "FetchCollections" Collections: "UID 38" Depth: "0" Resource: "" Mimetypes: "()" Ancestors Depth: "2" Ancestors Attributes: "QSet()" Enabled: "true" Sync: "false" Display: "false" Index: "false" Status: "false" }
akonadi_davgroupware_resource_2 (0x7f89bc00cbd0) 40 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "38" Name: "https://cloud.waltonhoops.com/remote.php/carddav/addressbooks/whoops/contacts/" Parent ID: "35" Remote ID: "https://cloud.waltonhoops.com/remote.php/carddav/addressbooks/whoops/contacts/" Remote Revision: "" Resource: "akonadi_davgroupware_resource_2" Mimetypes: "(inode/directory, text/directory)" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "(ALL)" } Ancestors: { { ID: "35" Remote ID: "akonadi_davgroupware_resource_2" Name: "akonadi_davgroupware_resource_2" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((AccessRights, a)(ENTITYDISPLAY, ("Contacts" "" "" ()))(davprotocol, 1))" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_davgroupware_resource_2 (0x7f89bc00cbd0) 40 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }

If I can provide any other useful information I'd be happy to help.
Comment 2 Ferry 2015-10-30 17:42:03 UTC
Same problem here. After update to Kubuntu 15.10 (Kontact 5.02) at a certain point my address book cache got cleared and shows 0 contacts (out of > 1200).

Re-adding the resource shows I can retrieve my collections (1 local, 1 shared), but still when syncing it stalls at about 30%, then after a long wait completes, but shows 0 contacts. Tried putting the resource offline/online, restarting it etc.

Not sure if this might be caused by some kind of time out due to the large amount of contacts.

I can probably provide a similar debugger log using the akonadi console, let me know if/how I can help.
Comment 3 nxelas 2015-11-13 22:58:57 UTC
Hi,

Using the same setup I can see no contacts in my list.
Adding a contact with Kaddressbook correctly syncs with the server. It appears on the server and Kaddressbook. Deleting the contact works correctly too, no matter if deleted on the server or Kaddressbook.
No contact added or already on the server will show up in Kaddressbook. 
Deleting the akonadi config and database as well as anything find "kaddressbook*", kmail, korganiser did not help.
 
I also use kubuntu 15.10, kaddressbook is version 5.0.2
Comment 4 Grégory Oestreicher 2016-02-07 17:28:42 UTC
It's possible that some of those contacts are not parsed correctly and thus don't show up. Can you enable debug logs for the dav resource, restart it and then look into ~/.xsession-errors (or a similarly-named file like ~/.xsession-errors-:0) for any clues?

To enable the debug logs start "kdebugsettings" and search for "dav". Then check the box next to it and voilà :)
Comment 5 Ferry 2016-02-07 19:17:11 UTC
In my case updating owncloud to a bit higher point release solved the issue.
Comment 6 Grégory Oestreicher 2016-02-09 20:36:38 UTC
OK, thanks for the update. I'll close it for now, but re-open if there are still issues with the latest ownCloud.
Comment 7 nxelas 2016-03-01 23:22:43 UTC
This is probably not a problem with owncloud and the akonadi dav resource per say as for me several vcards were misformed and owncloud reported errors with them when akonadi tried to access them. It seems they had some incorrect attributes or some empty lines. They were rather old entries probably made with old versions of Kaddressbook. The Akonadi logs did not help much, they only said no entries were imported. I guess older versions of Akonadi or owncloud and my android client are more lenient with incorrect entries. To fix the issue I exported all the contacts to a vcard in owncloud, which fixed the invalid entries, deleted all contacts and reimported them with the vcard.