Mobile app not syncing Contacts

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): 30.0.0
Operating system and version (eg, Ubuntu 24.04): Ubuntu 24.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.24.0
PHP version (eg, 8.3): 8.3

The issue you are facing: I am unable to sync my Android contacts with Nextcloud

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Open DAVx5
  2. Click the account in question
  3. Choose “Synchronize now”
  4. Curse because it didn’t work.

The output of your Nextcloud log in Admin > Logging:

Error     no app in context     RuntimeException No provider found for id account     Sep 29, 2024, 9:42:22 PM

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocnredvfflsc',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.koalatyworks.com',
  ),
  'datadirectory' => '/usr/share/nginx/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'https://nextcloud.koalatyworks.com',
  'maintenance_window_start' => 1,
  'default_phone_region' => 'US',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'dbpassword',
  'installed' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'koalatyworks.com',
  'mail_smtphost' => 'grace.koalatyworks.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'me@koalatyworks.com',
  'mail_smtppassword' => 'password',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Attention!! You should NEVER EVER post your “passwordsalt” anf “secret” key on this forum!!

Some quick guesses because you haven’t provided a list of activated apps. It might be possible that you’ve installed one which causes compatibility issures.

Have you enabled the Contacts app in Nextcloud?
Are you able to see all contacts which you want to sync?
Have you set-up an app password?

Do you have a valid SSL certificate provided on your Nextcloud-instance? Did you confirm the certificate in DAVx5?

Contacts app is enabled, and I can see the contacts on my Android. I’m not sure I know what you mean by an app password; the only password I’ve set is the NC one.

How would I go about confirming the certificate?

At first startup of DAVx5, renewed certificate or after revoking accepted certificates:

At next startup of DAVx5 you will be asked to check and accept the certificate. The message appears in the notification area of your mobile device.

The subject of thus thread is “Mobile app not syncing Contacts”, how could you see contacts on your mobile device if they are not synchronized?

By default you are having one login to login to Nextcloud using the web GUI. If you want to sync data with an app it is recommended to set-up an app password as described here:

https://docs.nextcloud.com/server/latest/user_manual/en/groupware/sync_android.html#synchronizing-with-android

Contacts may be stored before installing Nextcloud.
But the user should have a look into the contacts-properties, where you can check, whether a contact is assigned to DAVx5.

I’m trying to sync my Android contacts to Nextcloud. Sorry I wasn’t clear.

As for setting up an app password, I thought that was only necessary when using 2FA.

Is CardDAV configured in DAVx5 properly?

In principal you’re right but a personal password for web access is faster changed than light and to prevent any issues in the future you should use app passwords by default (that’s at least my recommendation).

The contacts which you can see on your Android device, have they been synchronized from Nextcloud to the device or did they already exist before you established the connection?

The reason for my question is, that Android devices usually tent to store contact data in a local address book or in the Google address book. You need to make sure that all your contacts are stored in the Nextcloud address book to be able to synchronize it both ways.
A good way to achive this is, to export the contact to a CSV file on your mobile device and to re-import it to the Nextcloud address book afterwards. See e.g.

I just checked. DAVx5 says https://nextcloud-server.domain/remote.php/dav/addressbooks/users/me/z-server-generated–system/

Do you think that could be the problem?

Ken

| j-ed
October 4 |

  • | - |

DaddyWarlock:

As for setting up an app password, I thought that was only necessary when using 2FA.

In principal you’re right but a personal password for web access is faster changed than light and to prevent any issues in the future you should use app passwords by default (that’s at least my recommendation).

The contacts which you can see on your Android device, have they been synchronized from Nextcloud to the device or did they already exist before you established the connection?

Already existed.

The reason for my question is, that Android devices usually tent to store contact data in a local address book or in the Google address book. You need to make sure that all your contacts are stored in the Nextcloud address book to be able to synchronize it both ways.
A good way to achive this is, to export the contact to a CSV file on your mobile device and to re-import it to the Nextcloud address book afterwards. See e.g.

Import vcard 2.1 to address book :information_source: Support

In some cases you might have a contact list that only can be exported in the vcard 2.1 version (*.vcf files). There are a lot of old programs, in my case it was an old android device. I just noticed that Nextcloud is not able to import any of the contacts (no specific error was shown: Show more details about the failing reason of an import · Issue #990 · nextcloud/contacts · GitHub), and after some investigation, I found out that you need at least version 3.0. There is an open feature request t…

I’ll have to look into that. Thanks!

Ken

| DaddyWarlock
October 4 |

  • | - |

I’m trying to sync my Android contacts to Nextcloud. Sorry I wasn’t clear. As for setting up an app password, I thought that was only necessary when using 2FA.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Yes, that can be an issue. If it is server generated address book it most likely can only be accessed in read-only mode, similar to system generated birthday calendars.

After login in Nextcloud with the browser, Contacts, you will find a gear-wheel “Contact-settings” in the lower left corner. After clicking on it scroll down to “Addressbooks” - “Contacts” - “…” - “Copy Link”

Paste the link into a text-editor and compare it to the URI in DAVx5.

They match. Still no syncing.

I tried exporting my Android contacts as a .vcf file, but the import failed.

On first page in DAVx5 tap on “Hamburger”-menue (upper left corner), then “Settings” and enable “Extended logging”
Maybe the log may show more details.

| Mornsgrans
October 5 |

  • | - |

On first page in DAVx5 tap on “Hamburger”-menue (upper left corner), then “Settings” and enable “Extended logging”
Maybe the log may show more details.

Okay, I enabled Verbose Logging. Where do I find the logs? Are they on the Android or on the server?


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Please find the information on the linked site below:
https://manual.davx5.com/settings.html
https://www.davx5.com/faq/how-to-debug