Carddav with Owncloud 9 broken sync

asked 2016-07-23 00:28:51 +0300

PureTryOut gravatar image

Since the upgrade from Owncloud 8 to Owncloud 9, the contacts sync has been completely broken for me. It syncs all contacts, but with random contacts it leaves out their names, or sync them with lots of , between them. If I would change the contact on my phone manually to have proper names again, and then sync it back to Owncloud, it just dissapears on the web interface. Manually checking the database I can see it's still there, and it will still sync every change from my phone fine, it just doesn't show up anymore in the web interface.

Today after syncing, whole groups of contacts (I group them in the web interface) dissapeared. Again same problem, they show up fine on the phone and the database.

I'm not so sure this is a server problem or a problem with how Sailfish syncs them, but it's almost unusable for me right now. Does anyone else have this problem? Is there a fix or a workaround?

edit retag flag offensive close delete

Comments

If you can give me a test account on the server, I can investigate the issue further. Email me the details at chris dot adams at jolla dot com - thanks.

chris.adams ( 2016-07-25 08:01:29 +0300 )edit

The "no names get downsynced to phone" is an issue with our sync plugin when it fails to decompose the FN detail (which OwnCloud provides) into an N detail (which OwnCloud seemingly does not). FN is formatted name like "John Smith" whereas N is a structured name which consists of a variety of subfields (prefix, firstname, middlename, lastname, suffix, etc). The algorithm to decompose the FN into N fields is somewhat complex (it looks for chinese characters to hint the algorithm, it then uses the current locale to hint the algorithm for the order) - see https://git.merproject.org/mer-core/libcontacts/blob/master/src/seasidecache.cpp#L1216 for that.

In my testing, it seems like the decomposition is failing even for very simple FN fields, as a result of missing translations which would hint the appropriate tokenisation for the current locale. I am following this up internally - thank you for bringing it to our attention.

Another issue you raise is that upsyncs sometimes cause strange behaviour on your server. In my testing, your server has some very strange semantics:

1) it doesn't seem to report e-tag changes when an existing contact is modified via the web-ui, where that contact was created initially in the web-ui. (It does, however, report e-tag changes to contacts which were originally created on the device and subsequently upsynced to the server, and then changed via the web-ui - which is the expected behaviour.)

2) Subsequently, making changes to a contact on the phone, which was originally created via the web-ui and later downsynced to the phone, those changes will be upsynced to the server successfully and cause an e-tag update (according to the debug output from the carddav plugin, visible after running msyncd with MSYNCD_LOGGING_LEVEL=8 enabled), however the changes will then not be reflected in teh web-ui.

I cannot speak as to the root cause of those (possibly related) issues. It seems like your OwnCloud instance is managing two separate vCard instances for each contact which was originally created via the web-ui (one for changes made via the web-ui, and another for changes made via sync), where only the first one of those is visible in the web-ui...

It may be an OwnCloud issue, or maybe there's a bug in our plugin (e.g. violating the CardDAV or vCard RFC in some way) which is causing OwnCloud to behave in that fashion.

chris.adams ( 2016-08-12 14:18:34 +0300 )edit