Ask / Submit
1

CardDav fails to sync with Radicale server

asked 2016-06-13 03:25:06 +0300

hammerhead gravatar image

Sailfish 2.0.1.11 / msyncd logs when trying to sync with radicale:

 Jun 13 02:02:12 Jolla carddav-client[25227]: [D] Buteo::USBModedProxy::isUSBConnected:85 - USB connected in mode:: "undefined" 
Jun 13 02:02:12 Jolla carddav-client[25227]: [W] Buteo::TransportTracker::btConnectivityStatus:202 - This device does not have a BT adapter 
Jun 13 02:02:12 Jolla carddav-client[25227]: [D] Buteo::NetworkManager::NetworkManager:47 - Online status:: false 
Jun 13 02:02:12 Jolla carddav-client[25227]: [D] main:71 - attempting to register dbus service: "com.buteo.msyncd.plugin.carddav.Contacts-30" 
Jun 13 02:02:12 Jolla carddav-client[25227]: [D] main:78 - Plugin  "carddav"  with profile  "carddav.Contacts-30"  registered at dbus  "com.buteo.msyncd.plugin.carddav.Contacts-30"  and path  / 
Jun 13 02:02:12 Jolla carddav-client[25227]: [D] Buteo::NetworkManager::slotOnlineStateChanged:140 - Online status changed, is online is now:: true 
Jun 13 02:02:12 Jolla carddav-client[25227]: [D] Buteo::TransportTracker::onInternetStateChanged:160 - Internet state changed: true 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] Buteo::ProfileManagerPrivate::ProfileManagerPrivate:126 - Primary profile path set to "/home/nemo/.cache/msyncd" 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] Buteo::ProfileManagerPrivate::ProfileManagerPrivate:127 - Secondary profile path set to "/etc/buteo/profiles" 
Jun 13 02:02:13 Jolla carddav-client[25227]: [W] ContactsEngine::ContactsEngine:845 - The 'mergePresenceChanges' option has not been configured - presence changes will only be reported via ContactManagerEngine::contactsPresenceChanged()
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] Syncer::startSync:93 - void Syncer::startSync(int) starting carddav sync with account 30 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::ConnectionManager::setupSocketConnection:106 - connection-manager.cpp 106 setupSocketConnection p2p error: QDBusError("org.freedesktop.DBus.Error.FileNotFound", "Failed to connect to socket /run/user/100000/signond/socket: No such file or directory") 1 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::ConnectionManager::init:132 - connection-manager.cpp 132 init Peer connection unavailable, activating service 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "PendingRegistration" SignOn::IdentityImpl(0x10f20e0) 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::AuthSessionImpl::initInterface:94 - authsessionimpl.cpp 94 initInterface 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::AuthSessionImpl::initInterface:94 - authsessionimpl.cpp 94 initInterface 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::ConnectionManager::init:150 - connection-manager.cpp 150 init Connected to "libsignon-qt1" 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0x10f20e0) 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "NeedsUpdate" SignOn::IdentityImpl(0x10f20e0) 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "PendingUpdate" SignOn::IdentityImpl(0x10f20e0) 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::IdentityImpl::infoUpdated:442 - identityimpl.cpp 442 infoUpdated SERVER INFO UPDATED. NeedsUpdate " 31 " 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] Syncer::sync:120 - Sync adapter initialised, determining remote changes since "" for account 30 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] CardDav::fetchAddressbooksInformation:500 - void CardDav::fetchAddressbooksInformation(const QString&) requesting addressbook sync information 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] RequestGenerator::generateRequest:93 - generateRequest(): ""  QUrl( "" )  "1" "PROPFIND" "<d:propfind xmlns:d="DAV:" xmlns:cs="http://calendarserver.org/ns/"><d:prop><d:resourcetype /><d:displayname /><cs:getctag /></d:prop></d:propfind>" 
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::IdentityImpl::getInfoReply:381 - identityimpl.cpp 381 getInfoReply QMap(("ACL", QVariant(QStringList, () ) ) ( "AuthMethods" ,  QVariant(QDBusArgument, ) ) ( "Caption" ,  QVariant(QString, "Jolla") ) ( "Id" ,  QVariant(uint, 31) ) ( "Owner" ,  QVariant(QStringList, () ) ) ( "Realms" ,  QVariant(QStringList, () ) ) ( "RefCount" ,  QVariant(int, 0) ) ( "StoreSecret" ,  QVariant(bool, true) ) ( "Type" ,  QVariant(int, 0) ) ( "UserName" ,  QVariant(QString, "g") ) ( "UserNameSecret" ,  QVariant(bool, false) ) ( "Validated" ,  QVariant(bool, true) ) )  
Jun 13 02:02:13 Jolla carddav-client[25227]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0x10f20e0) 
Jun 13 02:02:13 Jolla carddav-client[25227]: [W] CardDav::addressbooksInformationResponse:518 - void CardDav::addressbooksInformationResponse() error: 2 ( 0 ) 
Jun 13 02:02:13 Jolla carddav-client[25227]: [W] Syncer::cardDavError:284 - CardDAV sync finished with error: 0 purging state data for account: 30 
Jun 13 02:02:13 Jolla carddav-client[25227]: [C] CardDavClient::syncFinished:142 - CardDAV sync failed: 401 ""

Any ideas?

_(@chris.adams you mention that some fixes will come in 2.0.2 -=> any schedule for that?)_

edit retag flag offensive close delete

Comments

I don't know the precise schedule for 2.0.2.x but it was frozen some time ago, so I suspect that it will be released very soon.

chris.adams ( 2016-06-13 06:21:09 +0300 )edit

Can you judge from the logs what might be the error and maybe even determine a workaround for the time being?

hammerhead ( 2016-06-13 10:06:36 +0300 )edit

Did you set correctly the path to the calendar files? There is some fuzziness around it when creating the caldav account I use: http(s)://mymachine:myport for the server and: /user/mycalendar.ics

for the calendar. Mind the httpS if you use SSL, and watch for the first / in the calendar path. good luck

eatdirt ( 2016-06-13 10:33:17 +0300 )edit

Yes, I tried that (right now even with the port added, as you suggest).

Note that this is about CardDav, so I also left out the CalDav option as some users report that configuring both simultaneously failed.

The server side is full of positive log entries like the following, but nothing ends up in the contacts.db on Sailfish.

  <response>
    <href>/x/addressbook.vcf/io09dsogiz.vcf</href>
    <propstat>
      <prop>
        <getetag>"f8f213638606d4e99bd3289c6e0ca537"</getetag>
        <CR:address-data>BEGIN:VCARD
VERSION:3.0
N:Head;Hammer;;;
UID:io09dsogiz
NAME:Hammer Head
REV:20140928T162432Z
X-RADICALE-NAME:io09dsogiz.vcf
END:VCARD</CR:address-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
hammerhead ( 2016-06-13 11:38:12 +0300 )edit

Huh, this is strange: I just deleted the account on Sailfish, then added another one with a path I had never used before on the server (/user/hammer) but the radicale logs still output all the responses from addressbook.vcf when I sync (and still no contacts appear on the device).

How can I ensure that any previously configured accounts are purged on the Sailfish device?

hammerhead ( 2016-06-13 11:46:56 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-06-20 14:40:42 +0300

hammerhead gravatar image

I noticed that I had many contacts with BDAY set to a format like 1990-12-31T00:00:00Z.

(Note that, at least 19901231T000000Z is explicitly mentioned as valid by RFC6350.)

Anyway, changing all of these contacts to a simple format like 19901231 seemed to solve the issue (unless something else that I am unaware of changed in the meanwhile too).


To verify the amount of contacts after the CardDav sync operation, I ran this on Sailfish:

echo 'select count(*) from Contacts;' | sqlite3 /home/nemo/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db
edit flag offensive delete publish link more

Comments

Ok, maybe that's explaining. I've contacts with BDAY set like this : BDAY:1986-09-03T00:00:00 after setting BDAY parameters through SailfishOS.

occirol ( 2016-06-20 20:42:35 +0300 )edit

Thanks for the information. I have created https://bugs.merproject.org/show_bug.cgi?id=1606 to track this issue. Unfortunately I'm busy with other things for the next couple of weeks and don't think I'll have the time to resolve this issue. If someone from the community is willing to investigate and hopefully provide a patch to fix, that would be greatly appreciated. Otherwise, I'll try to get to it in a couple of weeks.

chris.adams ( 2016-06-21 05:42:08 +0300 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2016-06-13 03:25:06 +0300

Seen: 460 times

Last updated: Jun 20 '16