We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

Another caldav problem

asked 2016-05-04 10:47:40 +0200

alci gravatar image

updated 2018-12-03 21:55:35 +0200

Tanghus gravatar image

I have a problem with caldav, and I don't think it has been covered by previous questions.

Here is my scenario:

  • I have a radicale caldav server setup
  • when on my LAN, it works fine with both Thundebird Lightning _and_ Jolla calendar
  • I have an apache reverse proxy that adds SSL on top of the connection and exposes it to the Internet
  • I'm using letsencrypt generated certificates
  • this works fine when using Thunderbird Lightning, but... fails with Jolla
  • [EDIT] SFOS version is 2.0.1.11 (latest)

I have cheked that VERSION:2.0 is specified in the caldav file. It is, and anyway it works when used locally. Maybe it's related to ciphers, but I don't see anything related in the logs (I'm not an expert through). Buteo warns me about a missing profile: Failed to load profile: "onlinesync-carddav"

Any help would be welcome.

EDIT: now that I have the right parts of the url split into server address and calendar path, the account is created. But sync still fails. So I followed the steps given by Chris to get more logs about syncing (see first comment), and I get this:

[root@Jolla nemo]# journalctl -af | grep caldav
mai 05 19:16:33 Jolla caldav-client[13214]: [D] Buteo::USBModedProxy::isUSBConnected:85 - USB connected in mode:: "developer_mode" 
mai 05 19:16:33 Jolla caldav-client[13214]: [W] Buteo::TransportTracker::btConnectivityStatus:202 - This device does not have a BT adapter 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] Buteo::NetworkManager::NetworkManager:47 - Online status:: false 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] main:71 - attempting to register dbus service: "com.buteo.msyncd.plugin.caldav-sync-36" 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] main:78 - Plugin  "caldav"  with profile  "caldav-sync-36"  registered at dbus  "com.buteo.msyncd.plugin.caldav-sync-36"  and path  / 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] Buteo::NetworkManager::slotOnlineStateChanged:140 - Online status changed, is online is now:: true 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] Buteo::TransportTracker::onInternetStateChanged:160 - Internet state changed: true 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] Buteo::ProfileManagerPrivate::ProfileManagerPrivate:126 - Primary profile path set to "/home/nemo/.cache/msyncd" 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] Buteo::ProfileManagerPrivate::ProfileManagerPrivate:127 - Secondary profile path set to "/etc/buteo/profiles" 
mai 05 19:16:33 Jolla caldav-client[13214]: [D] CalDavClient::initConfig:279 - Initiating config... 
mai 05 19:16:34 Jolla caldav-client[13214]: [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: Aucun fichier ou dossier de ce type") 1 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::ConnectionManager::init:132 - connection-manager.cpp 132 init Peer connection unavailable, activating service 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "PendingRegistration" SignOn::IdentityImpl(0x81a0f0) 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::AuthSessionImpl::initInterface:94 - authsessionimpl.cpp 94 initInterface 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::AuthSessionImpl::initInterface:94 - authsessionimpl.cpp 94 initInterface 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] CalDavClient::startSync:112 - Init done. Continuing with sync 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::ConnectionManager::init:150 - connection-manager.cpp 150 init Connected to "libsignon-qt1" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0x81a0f0) 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "NeedsUpdate" SignOn::IdentityImpl(0x81a0f0) 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "PendingUpdate" SignOn::IdentityImpl(0x81a0f0) 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::IdentityImpl::infoUpdated:442 - identityimpl.cpp 442 infoUpdated SERVER INFO UPDATED. NeedsUpdate " 43 " 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] AuthHandler::sessionResponse:142 - Authenticated! 
mai 05 19:16:34 Jolla caldav-client[13214]: [W] mKCal::SqliteStorage::open:193 - sqlitestorage.cpp: 193 - database "/home/nemo/.local/share/system/privileged/Calendar/mkcal/db" opened 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] CalDavClient::start:460 - ++++++++++++++ mSyncStartTime: QDateTime(" Qt::LocalTime") LAST SYNC: QDateTime(" Qt::LocalTime") 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] CalDavClient::start:504 - no notebook exists for calendar path: "/myuser/mycal.ics/" , creating new 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] CalDavClient::start:505 - performing slow sync for "/myuser/mycal.ics/" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] NotebookSyncAgent::startSlowSync:214 - Start slow sync for notebook: "mycal.ics" for account "36" between QDateTime("2015-11-05 17:16:34.360 UTC Qt::UTC") to QDateTime("2017-05-05 17:16:34.360 UTC Qt::UTC") 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "---------------------------------------------------------------------" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "Depth : 1" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "Prefer : return-minimal" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "Content-Length : 321" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "Content-Type : application/xml; charset=utf-8" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "URL = https://user:pass@server.net/myuser/mycal.ics/" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "Request : REPORT" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"><d:prop><d:getetag /><c:calendar-data /></d:prop><c:filter><c:comp-filter name="VCALENDAR"><c:comp-filter name="VEVENT"> <c:time-range start="20151105T171634Z" end="20170505T171634Z"  /></c:comp-filter></c:comp-filter></c:filter></c:calendar-query>" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] Request::debugRequest:140 - "---------------------------------------------------------------------" 
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::IdentityImpl::getInfoReply:381 - identityimpl.cpp 381 getInfoReply QMap(("ACL", QVariant(QStringList, () ) ) ( "AuthMethods" ,  QVariant(QDBusArgument, ) ) ( "Caption" ,  QVariant(QString, "Jolla") ) ( "Id" ,  QVariant(uint, 43) ) ( "Owner" ,  QVariant(QStringList, () ) ) ( "Realms" ,  QVariant(QStringList, () ) ) ( "RefCount" ,  QVariant(int, 0) ) ( "StoreSecret" ,  QVariant(bool, true) ) ( "Type" ,  QVariant(int, 0) ) ( "UserName" ,  QVariant(QString, "myuser") ) ( "UserNameSecret" ,  QVariant(bool, false) ) ( "Validated" ,  QVariant(bool, true) ) )  
mai 05 19:16:34 Jolla caldav-client[13214]: [D] SignOn::IdentityImpl::updateState:96 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0x81a0f0) 
mai 05 19:16:35 Jolla caldav-client[13214]: [D] Report::processResponse:155 - Process REPORT response for server path "/myserver/mycal.ics/" 
mai 05 19:16:35 Jolla caldav-client[13214]: [C] Request::finishedWithError:100 - "REPORT" request failed. 401 "Network request failed with QNetworkReply::NetworkError: 202" 
mai 05 19:16:35 Jolla caldav-client[13214]: [D] NotebookSyncAgent::reportRequestFinished:347 - emitting report request finished with result: 401 "Network request failed with QNetworkReply::NetworkError: 202" 
mai 05 19:16:35 Jolla caldav-client[13214]: [D] CalDavClient::notebookSyncFinished:538 - Notebook sync finished. Total agents: 1 
mai 05 19:16:35 Jolla caldav-client[13214]: [D] CalDavClient::deleteNotebooksForAccount:166 - Total Number of Notebooks in device =  3 
mai 05 19:16:35 Jolla caldav-client[13214]: [D] CalDavClient::deleteNotebooksForAccount:175 - Deleted 0 notebooks 
mai 05 19:16:35 Jolla caldav-client[13214]: [C] CalDavClient::syncFinished:370 - CalDAV sync failed: 401 "Network request failed with QNetworkReply::NetworkError: 202"
edit retag flag offensive close delete

Comments

1

hello, could you give which version of sfos do you have ? please

cemoi71 ( 2016-05-04 11:02:31 +0200 )edit
1

You need to redact your log, as it may have confidential information in it.

The fact that it's returning MethodNotAllowed during account creation is interesting, that's usually for a REPORT request.

Out of interest, does account creation succeed (and find the appropriate calendars to sync)? If so, does synchronisation then fail? If that latter, then you can get more logs out of the CalDAV sync plugin via:

systemctl --user stop msyncd
MSYNCD_LOGGING_LEVEL=8 devel-su -p msyncd

Leave that running, then in a separate terminal, do:

devel-su journalctl -af | grep caldav

and retrigger sync. The logs from that latter terminal should be useful. Please redact them of any personal information and I will investigate further.

chris.adams ( 2016-05-05 04:12:22 +0200 )edit

Well, the account is not created, but looking at the log on the server I foun an interesting information: the Jolla tries to connect but connection is refused with:

INFO: Anonymous user refused

alci ( 2016-05-05 09:09:00 +0200 )edit

Ok, I found the problem. Any part of the url put after the first slash in server is ignored, so I have to put it in the calendar path instead. So:

This separation between server and calendar path is a bit funny...

alci ( 2016-05-05 09:24:08 +0200 )edit
1

@chris.adams just a remark nearby... would it be better if you post something as answer. otherwise it will be difficult to close with clarity ?... best regards and have good continuation all.

cemoi71 ( 2016-05-05 14:16:24 +0200 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2016-05-05 16:52:28 +0200

alci gravatar image

Ok, answering my own question, courtesy of @chris.adams who pointed me to the right direction. On Jolla, the caldav account setting has four parts, which are:

  1. the user: myuser
  2. the password: mypass
  3. the server address: http(s)://server.tld/
  4. the calendar path: path/to/cal.ics/

The url is then formed as: http(s)://myuser:mypass@server.tld/path/to/cal.ics/ Any part put after server.tld is ignored. So if you replace server address with https://server.tld/path/to/ and calendar path with cal.ics/, jolla will try to get https:///myuser:mypass@server.tld/cal.ics/ which does not exists.

The answer was is the logs, in the form of my user/pass in plaintext. Thanks to Chris for pointing it ! I had to change my password on the server, thanks to openldap for making it easy :-)

edit flag offensive delete publish link more

Comments

This is the first part of the story... now that the account is created, sync still fails... Editing the question.

alci ( 2016-05-05 20:27:26 +0200 )edit
1

hi there, same problem, multiple times. I am keeping forgetting this simply because the error message returned is totally uninformative and there is even not an example on the account caldav page. Jolla fix that please... Concerning the rest, try to tick on "ignore SSL errors", especially if you have signed your own certs on radicale. cheers, chris.

eatdirt ( 2016-05-06 01:11:17 +0200 )edit

Well, ignore ssl errors did not help... by the way, certificates are signed by Letsencrypt...

alci ( 2016-05-06 19:06:03 +0200 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2016-05-04 10:47:40 +0200

Seen: 630 times

Last updated: May 05 '16