Ask / Submit
2

cardDAV client syncs contacts inside radicale calendar

asked 2016-09-18 21:29:33 +0300

donkeyxote gravatar image

updated 2016-09-19 00:42:31 +0300

Hi all, newbie here.

I have a very strange issue with radicale + CardDAV: having some difficulties trying to sync contacts with my existing radicale user, I asked my sysadmin to add a new user for testing purposes.

My config:

user: username
password: ***************
host: https://myserverurl
card_path: /username/
cal_path: /username/

Results:

  • In any case (only cardDAV, only calDAV, cardDAV + calDAV) I can't see the addressbook resource (even if I can see and select calendars) from settings->add.

  • calendar sync is fine.

  • contacts sync is fine if the user only have one resource (contacts.vcf) in the account.

The issue is when the user owns more then one resource. I added to the testing account resources contacts.vcf and calendar.ics, then synced and added a new contact.

What happens is:

Radicale correctly advertises resources:

<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CR="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/pippo/</href>
    <propstat>
      <prop>
        <resourcetype>
          <principal />
          <collection />
        </resourcetype>
        <displayname>pippo</displayname>
        <CS:getctag>"d41d8cd98f00b204e9800998ecf8427e"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    <href>/pippo/contacts.vcf/</href>
    <propstat>
      <prop>
        <resourcetype>
          <CR:addressbook />
          <collection />
        </resourcetype>
        <displayname>contacts.vcf</displayname>
        <CS:getctag>"d41d8cd98f00b204e9800998ecf8427e"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    <href>/pippo/calendar.ics/</href>
    <propstat>
      <prop>
        <resourcetype>
          <C:calendar />
          <collection />
        </resourcetype>
        <displayname>calendar.ics</displayname>
        <CS:getctag>"b51573a587c4e29d6ad3df29277c472e"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Then I add a new contact "John Doe", and here is where things start going wrong: jolla's carddav client sync the vcard to calendar.ics

ReplyParser::parseAddressbookInformation:318 - QList<ReplyParser::AddressBookInformation> ReplyParser::parseAddressbookInformation(const QByteArray&, const QString&) const have non-addressbook resource: "/pippo/calendar.ics/" 
ReplyParser::parseAddressbookInformation:361 - QList<ReplyParser::AddressBookInformation> ReplyParser::parseAddressbookInformation(const QByteArray&, const QString&) const have addressbook resource with status OK: "/pippo/calendar.ics/" 
ReplyParser::parseAddressbookInformation:379 - QList<ReplyParser::AddressBookInformation> ReplyParser::parseAddressbookInformation(const QByteArray&, const QString&) const found valid addressbook: "/pippo/calendar.ics/" with sync-token or c-tag 
ReplyParser::parseAddressbookInformation:314 - QList<ReplyParser::AddressBookInformation> ReplyParser::parseAddressbookInformation(const QByteArray&, const QString&) const have addressbook resource: "/pippo/contacts.vcf/" 
ReplyParser::parseAddressbookInformation:361 - QList<ReplyParser::AddressBookInformation> ReplyParser::parseAddressbookInformation(const QByteArray&, const QString&) const have addressbook resource with status OK: "/pippo/contacts.vcf/" 
ReplyParser::parseAddressbookInformation:379 - QList<ReplyParser::AddressBookInformation> ReplyParser::parseAddressbookInformation(const QByteArray&, const QString&) const found valid addressbook: "/pippo/contacts.vcf/" with sync-token or c-tag 
ReplyParser::parseAddressbookInformation:269 - ignoring addressbook-home-set response returned for addressbook information request: "/pippo/" 
CardDav::downsyncAddressbookContent:646 - void CardDav::downsyncAddressbookContent(const QList<ReplyParser::AddressBookInformation>&) no changes since last sync for "/pippo/calendar.ics/" from account 28 
CardDav::downsyncAddressbookContent:646 - void CardDav::downsyncAddressbookContent(const QList<ReplyParser::AddressBookInformation>&) no changes since last sync for "/pippo/contacts.vcf/" from account 28 
CardDav::downsyncComplete:923 - void CardDav::downsyncComplete() downsync complete with total AMR: 0 , 0 , 0 
Syncer::continueSync:154 - void Syncer::continueSync(const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&) storing remote changes to local device: AMR: 0 0 0 for account: 28 
Syncer::upsyncLocalChanges:212 - virtual void Syncer::upsyncLocalChanges(const QDateTime&, const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&, const QString&) upsyncing local changes to remote server: AMR: 1 0 0 for account: 28 since: QDateTime("2016-09-17 15:45:47.042 UTC Qt::UTC") 
CardDav::upsyncUpdates:972 - void CardDav::upsyncUpdates(const QString&, const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&) upsyncing updates to addressbook: "/pippo/calendar.ics/" : 1 0 0 
CardDavVCardConverter::convertContactToVCard:193 - generated vcard: 
{anonymous}::debugDumpData:64 - "BEGIN:VCARD" 
{anonymous}::debugDumpData:64 - "VERSION:3.0" 
{anonymous}::debugDumpData:64 - "N:Doe;John;;;" 
{anonymous}::debugDumpData:64 - "REV:2016-09-18T17:08:41Z" 
{anonymous}::debugDumpData:64 - "TEL:123456789" 
{anonymous}::debugDumpData:64 - "UID:3e8d08fb19484f61b35ca11e0c602d2a" 
{anonymous}::debugDumpData:64 - "FN:John Doe" 
{anonymous}::debugDumpData:64 - "END:VCARD" 
RequestGenerator::generateUpsyncRequest:140 - generateUpsyncRequest(): ""  QUrl( "https://pippo@treasurechest.covolunablu.org/pippo/calendar.ics/3e8d08fb19484f61b35ca11e0c602d2a.vcf" )  : 144 bytes 
RequestGenerator::generateUpsyncRequest:142 -     "Content-Type" = "text/vcard; charset=utf-8" 
RequestGenerator::generateUpsyncRequest:142 -     "Content-Length" = "144" 
CardDav::upsyncUpdates:1117 - void CardDav::upsyncUpdates(const QString&, const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&, const QList<QtContacts::QContact>&) ignored 0 spurious updates to addressbook: "/pippo/calendar.ics/" 
CardDav::upsyncResponse:1154 - Got updated etag for "28:AB:/pippo/calendar.ics/:3e8d08fb19484f61b35ca11e0c602d2a" : ""6ebe2c8e0a1f7cb7e8b24e8543323d1c"" 
CardDav::upsyncComplete:1173 - void CardDav::upsyncComplete() upsync complete 
Syncer::syncFinished:275 - void Syncer::syncFinished() about to store sync state data 
Syncer::syncFinished:283 - void Syncer::syncFinished() carddav sync with account 28 finished successfully! 
CardDavClient::syncFinished:136 - CardDAV sync succeeded! ""

So i end up with calendar.ics being like this:

BEGIN:VCALENDAR
PRODID:-//Radicale//NONSGML Radicale Server//EN
VERSION:2.0
BEGIN:VCARD
VERSION:3.0
N:Doe;John;;;
REV:2016-09-18T17:08:41Z
TEL:123456789
UID:3e8d08fb19484f61b35ca11e0c602d2a
FN:John Doe
X-RADICALE-NAME:3e8d08fb19484f61b35ca11e0c602d2a.vcf
END:VCARD
END:VCALENDAR

and an empty contacts.vcf

Just to be clear, I would like to repeat that if contacts.vcf is the only resource for the user, sync works just fine (even if i can't see that in settings->add account).

Is it just me? Am I doing something wrong? What am I missing?

Thank you for your attention.

edit retag flag offensive close delete

Comments

2

Thanks, clearly a bug in the CardDAV plugin. I've created https://bugs.merproject.org/show_bug.cgi?id=1657 to track this issue.

chris.adams ( 2016-09-19 05:26:23 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-09-19 22:45:31 +0300

donkeyxote gravatar image

Thank you Chris for your your kind reply, now I feel a little less dumb, and confident enough to suggest my solution to other users out there having the same problem.

Temporary workaround could be having two distinct users, one for calendars and one for contacts. Terrible, I know. But hey, at least it works.

edit flag offensive delete publish link more

Comments

Not specially, I use radicale too configured like this :

  • 1 account for calendar (with full path to calendar name)
  • 1 account for contacts (with full path to contact address book)

Both with same user in radicale.

occirol ( 2016-09-20 07:40:52 +0300 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2016-09-18 21:29:33 +0300

Seen: 310 times

Last updated: Sep 19 '16