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

CardDav -> NextCloud in 2.0.4.14 - Rampage stoppable?

Tracked by Jolla (Rejected)

asked 2016-11-24 17:08:18 +0300

Robomike gravatar image

For years CardDav wasn't working automatically. Used SyncEvolution for a while, but this stopped after I set up a new server and I wasn't able to bring it to work again. So I gave up. I configured CardDav and CalDav with the new server address, but had no success for months and wasn't interested too much to invest more time into that topic.

Now I have Sailfish 2.0.4.14 and Nextcloud 10.0.1, didn't modify my account settings, have CalDav/CarDav still activated, but set to "synchronize manually" and was surprised to notice: whenever I edit a contact in my contact list, the contact will be uploaded immediately to the nextcloud.

Well, this should make me happy - but oftenly the contact double, triple or appears more often in my NextCloud app. Seems it depends on the groups where the contacts were sorted formerly in OwnCloud/Nextcloud and imported back long time ago. Strange enough, because Sailfish doesn't display any group properties. Also, there seems to be a closed loop... I have some contact birthdays now up to 7 times in the calendar app (but no "real" calender events), and some phone numbers also multiple times, not displayed, but in the details list when editing contact details.

I really fear to use the "synchronize" button, anxious if starting a chain reaction blasting both, Sailfish and Nextcloud.

Any hints or clear rules by people who got these both working together properly would be highly appreciated.

edit retag flag offensive close delete

Comments

I use CalDAV regularly (also on Nextcloud server), and couple of times every week there appear random duplications. I just delete the CalDAV account and create it again on my Jolla, and everything is fine again for a little while. Of course you should always have backups.

William ( 2016-11-24 18:14:57 +0300 )edit

I use CalDav and Carddav (nextcloud, before owncloud) since more then a year. There were some breakdowns between, but most time no problems.

If the duplications appear, in calendar app I pull down to the "manage calendars", there all shown twice. Just deselect one of them. After a while, the dupes are gone.

@Robomike In your case, I would delete the caldav and caddav account, depending to your nextcloud installation. If there still address or calendar entry's (same as in nextcould) on the phone, just delete them on the phone. Add a new account, choose caldav & carddav, give the server address with https:// in the beginning. In my case it was not need to provide some extra folder paths. I have auto sync activated since the beginning and never lost any data.

poddl ( 2016-11-24 23:41:02 +0300 )edit
2

There are a variety of fixes coming in SFOS 2.1.0.x, due to QA improvements (test servers, improved unit tests) and community contributions for issues. So, it could be that a fix for your issue already exists and will be part of 2.1.0.x - but just in case it's not, can you capture sync logs by following the instructions from https://sailfishos.org/wiki/CalDAV_and_CardDAV_Community_Contributions#Sync_Logs and send the results to chris dot adams at jolla dot com so that I can investigate (make sure you redact personal information including usernames, passwords, phone numbers, addresses, etc).

Interestingly, though, local changes should not trigger syncs if the account has Manual sync only selected, so that's clearly a bug - I have filed JB#37054 to investigate this case.

Can you ssh into the device (requires enabling developer mode) and do:

 devel-su
 cd /home/nemo/.cache/msyncd/sync
 ls
 cat carddav*

and look for a key/value setting like:

 <key name="sync_always_up_to_date" value="false"/>

If that doesn't exist, then it seems that the "manual only" setting wasn't stored correctly to the sync profile for that account...

chris.adams ( 2016-11-25 06:26:04 +0300 )edit

@chris.adams : thanks a lot. I checked the key in the configuration xml and found it set to true. I can switch it by using the settings app, so now I see more clearly that this part of my question was a misunderstanding: I didn't get that apparently the "up to date"-setting overrides the "manual"-setting.

I will investigate the behavior of the syncing after the future update, as you mentioned. With your permission, I will contact you then if I stuck solving the problems.

@poddl : yes, I agree that's best to start with a new setup, but still trying to find out which way is best. After a backup of the contact database or after an export I will delete all data on both ends (better said on all ends, there are some PIM-Clients on several desktop installations waiting for expedient syncings.) But the database seems to be a bit lousy, because of the random duplications, the group definitions and so on. Maybe I should try to manually edit the contacts list and then import it - but where first? Into the phone? Into the nextcloud app? Into Evolution? Into "(KDE-)Contacts"?

Anyway, I will wait until 2.1.0.x is officially released. Maybe I can also switch my server to an official certificate, the self signed certificate is also a big obstacle whilst trying to make it work.

Robomike ( 2016-11-25 10:30:27 +0300 )edit

@Robomike I had the best experience with (KDE-)Contacts. It just works without any issues. Edit in Phone or Nextcloud is not very helpful, there are missing fields, like the note field, but Nextcloud leaves this fields untouched and their get synced as well.

In my opinion, certificate is mandatorily with nextcloud and sync stuff. Just use one of the "Let’s Encrypt" project, easy setup, no additional cots.

poddl ( 2016-11-25 11:23:39 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-12-05 20:28:32 +0300

Robomike gravatar image

Today I like my Jolla again :)

I found out:

  • NextCloud app is not acting as a database. A table element in MySQL-DB contains a complete VCard, and the NC-app extracts the data fields by itself. Okay, they have too less manpower for maintaining this thing, so I've read.
  • some of these items looked very strange
  • many were in fact invisble for some desktop applications and also for the built in web-UI, but not for Jolla
  • no idea what this items were generated from. I guess it's the crosslinking / connecting of different contact items in Jolla to one, but can't prove so far. But I think, the main problem was in NC, not in sailfish.

What I did:

  • made a backup on Jolla. Struggled with git a while, but there's still the well known "all.vcf".
  • upgraded sailfish
  • made a certificate for my server with Letsencrypt. (bloody simple, should have known earlier.)
  • deleted all visible contacts with evolution
  • found that gnome-contacts (a very simple contact manager available for Solus, which is my preferred OS) is able to show invisible contacts and used it to delete them (lots of work :( )
  • did not delete my contacts from Jolla (anxious)
  • deleted my DAV-account on Jolla
  • uploaded the "all.vcf" to Nextcloud contacts app.
  • uploaded the "all.ics" to the calendar app, no need to delete something, because they were never synchronized yet.
  • made a new DAV-account. No need to input paths there, because nextcloud installs permanent redirections for the different DAV-requests. So the only thing to input is the server address like "https://path.to.Nextcloud.maindir/remote.php/dav"

    • disabled the local calendar which the remote calendar is based on.

And all works like a charm for now.

Noticed that contact informations are handled charily. Deleted contact details in NC will not be deleted in Sailfish, but this may depend on the way NC's contact app works. The calendar is also working nice and in both directions. Yeah! (I've been waiting for only three years to state this. :/ )

Thanks again for your support.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2016-11-24 17:08:18 +0300

Seen: 1,118 times

Last updated: Dec 05 '16