Nextcloud contacts not loading into roundcube v57 ubuntu 18.04

So I realize that Ubuntu 18.04 support is ending/ended and that we should be moving on to 22.04LTS but I installed a brand new box with 18.04 LTS and the “curl -s https://mailinabox.email/setup.sh | sudo bash” script which should install v57a.

Did something break along the way?

I know I have a server that its currently working on and one that I thought it should be working on.

I think syncing contacts between roundcube and nextcloud was broken in v57a. You would need an update of the roundcube carddav plugin, and the configured url towards nextcloud was changed as well. Sorry, can’t find a link to an issue or pull request for this.

is this it?

No, sorry. The changes are on the roundcube side. I took a closer look and it seems the v57a release already has the updated carddav plugin.
Thus only the changed carddav url is needed. You’ll find that in this Pull request. The change is

Old

 'url' => 'https://${PRIMARY_HOSTNAME}/cloud/remote.php/carddav/addressbooks/%u/contacts',

New

 'url' => 'https://${PRIMARY_HOSTNAME}/cloud/remote.php/dav/addressbooks/users/%u/contacts/',

root@mail:/var/log/roundcubemail# cat carddav.log
[03-Apr-2023 21:15:52 -0400]: [5 ERR] Database::get (SELECT “filename” FROM carddav_migrations) ERROR: [1] no such table: carddav_migrations
root@mail:/var/log/roundcubemail#

Tried updating the file manually.
/usr/local/lib/roundcubemail/plugins/carddav/config.inc.php

That didn’t seem to fix the issue.

Any thoughts?

Roundcube doesnt look like it even tries to load the plugin.

image

That might be a red herring. As documented here apparently that is an expected log entry. I would worry if you see it multiple times, but the date (April 3rd) suggests it only occurred once, some time ago?.
To check that the plugin is loaded, look at the About entry. There should be an entry for CardDAV there.
Indeed, one would expect an Owncloud address book in the list you show. What did you change to the config.inc.php file? Just to be sure: in the change I mentioned above you should replace ${PRIMARY_HOSTNAME} with the domain name of the box (e.g. box.example.com)

If you’re feeling adventurous you might look at setting debug logging

I can say the plug-in is loaded and I have turned on debugging log.

I found that late last night trying to troubleshoot on my own.

Yes of course I know the url needs to contain my box name.

This one appears to be interesting.

12-Apr-2023 21:53:07 -0400]: [1 DBG] internalGet query: SELECT * FROM carddav_addressbooks WHERE ((“user_id” = ‘1’)) [12-Apr-2023 21:53:07 -0400]: [1 DBG] internalGet query: SELECT * FROM carddav_addressbooks WHERE ((“user_id” = ‘1’)) [12-Apr-2023 21:53:07 -0400]: [1 DBG] internalGet query: SELECT * FROM carddav_addressbooks WHERE ((“user_id” = ‘1’)) [12-Apr-2023 21:53:08 -0400]: [1 DBG] internalGet query: SELECT * FROM carddav_addressbooks WHERE ((“user_id” = ‘1’)) [12-Apr-2023 21:53:08 -0400]: [1 DBG] carddav::listAddressbooks [12-Apr-2023 21:53:09 -0400]: [1 DBG] internalGet query: SELECT * FROM carddav_addressbooks WHERE ((“user_id” = ‘1’)) [12-Apr-2023 21:53:12 -0400]: [1 DBG] carddav::checkMigrations [12-Apr-2023 21:53:12 -0400]: [1 DBG] internalGet query: SELECT “filename” FROM carddav_migrations [12-Apr-2023 21:53:12 -0400]: [1 DBG] carddav::initPresets [12-Apr-2023 21:53:12 -0400]: [1 DBG] internalGet query: SELECT * FROM carddav_addressbooks WHERE ((“user_id” = ‘1’)) [12-Apr-2023 21:53:13 -0400]: [1 DBG] Starting discovery with input https://mail.server.com/cloud/remote.php/dav/addressbooks/users/chris@server.com/contacts/ [12-Apr-2023 21:53:13 -0400]: [1 DBG] Try context path /.well-known/carddav [12-Apr-2023 21:53:13 -0400]: [2 NFO] Exception while querying current-user-principal: cURL error 51: SSL: no alternative certificate subject name matches target host name ‘mail.server.com’ (see libcurl - Error Codes) [12-Apr-2023 21:53:13 -0400]: [1 DBG] Try context path / [12-Apr-2023 21:53:13 -0400]: [2 NFO] Exception while querying current-user-principal: cURL error 51: SSL: no alternative certificate subject name matches target host name ‘mail.server.com’ (see libcurl - Error Codes)

Sorry, does not ring a bell here.
Another approach might be looking at the other server. You mentioned you had a server where it is working properly?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.