answered
2015-11-06 12:58:39 +0200
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:
- Deleted the ownCloud account on my phone
- Deleted the Contacts address book on ownCloud
- 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!
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