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

CalDAV/CardDAV in Saimaa 2.0.0.10

asked 2015-10-27 07:27:53 +0200

mjtorn gravatar image

updated 2015-10-27 07:28:13 +0200

Hi!

I set up ownCloud for me, configured syncing and got both problems and questions.

Having automatic syncing turned on (and any interval for sync content) does not push a new contact from my phone to the server automatically. I had to wait, though I have sync automatically checked. This is a bug.

(I am ok with adding a contact to, or removing one from ownCloud and waiting for it to be pushed because the phone can't know something changed immediately)

Jolla's calendar shows my ownCloud calendars, but did not push calendar events from either my calendar or the contact birthdays into ownCloud. This is a bug.

Thanks!

PS Why is [X] Sync automatically and "Sync content (interval)" separate? Makes no sense; if I want automatic sync I don't want also manual and/or interval.

edit retag flag offensive close delete

Comments

Hei,

I am also having trouble setting up correctly caldav/carddav after update to Saimaa (2.0.0.10). Caldav used to work before the update with OwnCloud 7.0.4. Now while setting up the account, I get during "Getting calendar details..." the error message "Oops, problem with account creation. Could not create account." If I select only Carddav, the account is created, but there is no sync happening.

I also tried with a fresh installation of OwnCloud 8.2.1 and get the same symptoms. Any idea what I should check? Any suggestions?

arno784 ( 2015-11-30 16:16:38 +0200 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2015-11-06 12:58:39 +0200

mjtorn gravatar image

To wrap up from IRC (thanks again for that!) in answer form, because it doesn't fit in a comment.

There is no feature to sync to an existing remote calendar, though there may be one in the future. This is ok for me, I'll just use the remote calendar and we'll see what may happen in the future.

Deleting an "owned" contact is not allowed. That means if I delete from the server, it's a feature (like security) that it doesn't get deleted from the phone. There was a more complex example about how adding a field on the phone and deleting all others than the new one (post-sync) on the server leaves only the latest field on the phone, but that's not pertinent, only an interesting thing to note.

Not having all contacts on the server may be due to a timeout or somesuch and lacking error reporting. This is noted as work that needs to be done, ie. better error reporting.

To rectify the missing contacts:

  1. Deleted the ownCloud account on my phone
  2. Deleted the Contacts address book on ownCloud
  3. Created a new ownCloud ("CalDAV and CardDAV") account

I kept an eye on my ownCloud installation's access log throughout this.

Syncing calendar worked out of the box immediately: PROPFIND -> REPORT -> PUT/DELETE

The contacts not so much, though. I noticed it's calling PROPFIND for

/remote.php/carddav/addressbooks/mjt/

and

/remote.php/carddav/addressbooks/mjt/contacts/

just as expected, but there's no REPORT or PUT.

Note that the /contacts/ location is asked for only when I do not have an address book remotely.

(For what it's worth, I have rewrite rules for /carddav/ and friends to /remote.php/ as the ownCloud documentation suggests, so there's no hassle with URI prefixes)

I even closed People, Messages and disabled Android in case there's a lock on this data (though there shouldn't be, obviously) and that didn't help either.

Having the address book named Contacts deleted causes the phone to create it again, but no sync. I have Sync automatically turned on (see above for the calendar) but editing a contact does not trigger changes anymore.

Regardless of editing a contact or syncing automatically, this is what I see

MY_IP - - [06/Nov/2015:11:11:26 +0100] "PROPFIND /.well-known/carddav HTTP/1.1" 302 160 "-" "Mozilla/5.0"
MY_IP - - [06/Nov/2015:11:11:26 +0100] "PROPFIND /remote.php/carddav/ HTTP/1.1" 401 304 "-" "Mozilla/5.0"
MY_IP - mjt [06/Nov/2015:11:11:26 +0100] "PROPFIND /remote.php/carddav/ HTTP/1.1" 207 420 "-" "Mozilla/5.0"
MY_IP - mjt [06/Nov/2015:11:11:26 +0100] "PROPFIND /remote.php/carddav/principals/mjt/ HTTP/1.1" 207 439 "-" "Mozilla/5.0"
MY_IP - mjt [06/Nov/2015:11:11:26 +0100] "PROPFIND /remote.php/carddav/addressbooks/mjt/ HTTP/1.1" 207 883 "-" "Mozilla/5.0"

This seems to me to indicate that it tries hard to sync but maybe it doesn't know the contact book anymore, since I deleted the original one?

My answer to all this is that I dumped the contacts into a file with

devel-su -p vcardconverter -e vcards.2015-11-06.vcf

copied it over to my desktop and imported with the ownCloud web ui;

/index.php/apps/contacts/addressbook/local/5/vcard_standard/import/status?progresskey=contacts-import-639968078

Local? 5? Hopefully just ownCloud internals from deleting and recreating that we don't have to care about

Now syncing manually through Settings

MY_IP - mjt [06/Nov/2015:11:25:08 +0100] "REPORT /remote.php/carddav/addressbooks/mjt/contacts/ HTTP/1.1" 207 819413 "-" "Mozilla/5.0"

And a ton of PUT

MY_IP - mjt [06/Nov/2015:11:25:57 +0100] "PUT /remote.php/carddav/addressbooks/mjt/contacts/%257B03486308-d44b-43cb-826b-1635e9c7dafd%257D.vcf HTTP/1.1" 204 0 "-" "Mozilla/5.0"

These don't exactly add up, I read 907 PUT requests into my address books for today, and just a bit later 1018, without doing anything with the phone, but last time editing a contact didn't trigger a sync. In fact, a lot of these PUTs coincide with my contingency sync schedule of 15-minute peak-time syncing. They work.

Is there any queueing going on in syncing that might cause delays?

Why were there so many contacts being PUT every time, although I changed 1 or 2 or 3 contacts each test?

Hopefully someone can reproduce the delete-from-owncloud-and-have-to-sync-manually-first procedure.

TLDR Automatic syncing of contact edits I make on the phone don't seem to work after having re-created the ownCloud account and its address book, though manually syncing does. Had to push the contacts in through a VCF file the first time around.

Calendar seems to work consistently.

PS. Would really appreciate a "use at your own risk" type of option to be able to delete contacts from the remote synced server and have them deleted on the phone, as the web gives a much nicer overview of things and Jolla Communicator mainly crashes when trying to see the contacts.

Thanks!

edit flag offensive delete publish link more

Comments

@chris.adams is there a logger facility for this? I'd be more than happy to provide something off the phone if it helps :)

EDIT: I recreated the account in order to get shared calendars working (see other question-issue) and now I found that syncing contacts may work. I think some got duplicated somehow, like I edited a contact and noticed the old name on the ownCloud UI - AND ALSO THE PHONE :o

What I did was delete the un-edited duplicate on my phone and saw a DELETE.

The one contact that was missing before I "booted" the remote data with a major VCF file is now listed twice in the ownCloud UI, though the contact is only once on my phone, so there's still some confusion here...

mjtorn ( 2015-11-08 15:56:25 +0200 )edit

You can enable detailed logging from the sync plugins by doing the following:

1) edit /etc/systemd/journald.conf and set RateLimitBurst=5000 and RateLimitInterval=10s then reboot if you had to change this.

2) restart sync daemon with extra logging enabled:

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

3) leave that running, and collect logs from carddav plugin from journal:

 devel-su journalctl -af | grep carddav

4) trigger a sync, you should see the complete logs from the plugin.

Cheers, Chris.

chris.adams ( 2015-11-09 11:57:42 +0200 )edit

I am also having problems with Caldav (https://together.jolla.com/question/121494/how-do-i-get-caldav-to-work-with-icloud-calendar/). I would like to try logging and perhaps getting help that way. What is the easiest way to edit journald.conf? I have basic knowledge of usingTterminal and Linux, but I don't know how to edit a file.

TomC ( 2015-11-14 17:25:09 +0200 )edit
1

answered 2015-10-31 16:33:28 +0200

Yo gravatar image

What is your actual question?

I'm going to try to give my statement on things you mention.

From my understanding "Automatic Sync" does not mean "Instant Sync". I'd say "manual" means you have to trigger each sync yourself. "Automatic" means, the phone triggers syncs itself defined by the given schedule. But then again it's not clear why the schedule drop down menu does not gray out. And it doesn't make sense that there is "manual" in the list of options. I'm totally confused now.

Jolla, please be more precise! What is "Automatic Sync" supposed to do? Is it instant sync? If yes then the behavior @mjtorn describes is a bug.

The other thing about the calendar: If you used your Jolla Calendar before you added the ownCloud calendar you have a local calendar. In the calendar app itself you can see all calendars. Go to pulley menu -> manage calendars. The calendars are not merged, but kept seperate.

I hope I could help and I'd like Jolla to have a look at the settings. Maybe @chris.adams could shed some light on this? What should happen when selecting automatic sync? And could you use more precise wording in the settings?

edit flag offensive delete publish link more

Comments

Automatic sync will cause a sync to occur automatically whenever you create or update a contact in the People application (if you have network connectivity at the time). Obviously, it cannot know if something changes server-side and so the scheduled sync options are still necessary (in order to periodically pull down changes from the server).

chris.adams ( 2015-11-03 05:07:49 +0200 )edit

Yeah, with automatic sync I'd expect changes made on the phone to go server-wards without delays, ie. when I save the change.

And the calendar would be so nice too

mjtorn ( 2015-11-03 10:15:02 +0200 )edit

That should be the case (well, there is a 10 second delay as we attempt to coalesce changes from multiple sources before triggering syncs) if the Automatic setting is enabled.

chris.adams ( 2015-11-04 03:47:05 +0200 )edit

@chris.adams ok, then it's just weird. I do get contacts synced eventually so maybe it's just a local network thing.

Got anything for the calendar, though? My phone's logged in to my ownCloud accoutn, got both calendars set to sync and suddenly I'm not seeing them on my ownCloud anymore at all!

Actually looking at /remote.php/caldav/calendars/mjt/personal shows it's empty, and probably that's why it's not presented in the ownCloud UI...

mjtorn ( 2015-11-04 08:33:24 +0200 )edit

I just realized something horrible - what if the calendar is not meant to be the same? Is that the case? Because that devalues the feature by .. I don't even know how much. Is there a way to make the remote CalDAV calendar be synced with Jolla's local one+

mjtorn ( 2015-11-04 12:19:29 +0200 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2015-10-27 07:27:53 +0200

Seen: 1,382 times

Last updated: Nov 06 '15