Author Topic: Problems with carddav plugin  (Read 8941 times)

Offline ras07

  • Newbie
  • *
  • Posts: 8
Problems with carddav plugin
« on: August 25, 2017, 12:43:12 AM »
I hope this is the right place for this question. I've been running (an older version of) roundcube with the carddav plugin for quite a while on a windows system, but I want move everything to Linux (Ubuntu 16.04.3). Everything is a fresh install. I'm running Apache 2.4.18, PHP 7.0.22, Roundcube 1.3.0, and the 2016-11-25 version of the carddav plugin (2.0.4?)

Everything works fine without the carddav plugin enabled, but with carddav, I get "DATABASE ERROR: CONNECTION FAILED!" after logging in to Roundcube. The errors log contains:

Code: [Select]
PHP Warning:  Declaration of carddav_backend::delete($ids) should be compatible with rcube_addressbook::delete($ids, $force = true) in /var/www/roundcube/plugins/carddav/carddav_backend.php on line 26
PHP Warning:  Declaration of carddav_backend::list_groups($search = NULL) should be compatible with rcube_addressbook::list_groups($search = NULL, $mode = 0) in /var/www/roundcube/plugins/carddav/carddav_backend.php on line 26
PHP Warning:  Declaration of carddav_backend::rename_group($group_id, $newname) should be compatible with rcube_addressbook::rename_group($group_id, $newname, &$newid) in /var/www/roundcube/plugins/carddav/carddav_backend.php on line 26
<e2o8b4j6> DB Error: [1146] Table 'roundcubemail.carddav_addressbooks' doesn't exist (SQL Query: SELECT id FROM carddav_addressbooks WHERE user_id='1' AND active=1) in /var/www/roundcube/program/lib/Roundcube/rcube_db.php on line 542 (GET /)
<e2o8b4j6> DB Error: [1146] Table 'roundcubemail.carddav_addressbooks' doesn't exist (GET /)

Any thoughts on what I might be doing wrong?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Problems with carddav plugin
« Reply #1 on: August 25, 2017, 08:45:53 AM »
It doesn't like the carddav plugin has been updated to work with Roundcube 1.3.0.

Offline ras07

  • Newbie
  • *
  • Posts: 8
Re: Problems with carddav plugin
« Reply #2 on: August 25, 2017, 02:58:13 PM »
Well, bummer.

I downgraded to Roundcube 1.2.5 but had the same problem. Do you happen to know how far back you have to go for carddav to work? (Carddav is pretty important to my installation.)

Thanks

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Problems with carddav plugin
« Reply #3 on: August 25, 2017, 09:01:05 PM »
Unfortunately I don't. From the Github tracking it sounds like it should work on the 1.2.x branch https://github.com/blind-coder/rcmcarddav/issues/186 so maybe you should try and update the plugin with the code from the master branch and se if that fixes the problem.

Offline ras07

  • Newbie
  • *
  • Posts: 8
Re: Problems with carddav plugin
« Reply #4 on: August 26, 2017, 03:24:39 AM »
I think I have it working (even on 1.3!) using the master branch. I'm pulling from Google contacts; it sounds like others are having trouble with different services.

Thanks!

Offline jamfx

  • Newbie
  • *
  • Posts: 1
Re: Problems with carddav plugin
« Reply #5 on: November 29, 2017, 02:22:29 AM »
Hi,

I tried CardDav in my Roundcube and got a problem. I can activate the Plugin in the latest RoundCube Release (Version 1.3.3) but I can not save anything inside the plugin.
I also posted my Issue on GitHub already: https://github.com/blind-coder/rcmcarddav/issues/178
Maybe someone can have a look at this. I am using a Nextcloud Adressbook and pasted the link, after giving all necessary credentials. On Pressing Save everything got wiped and is clearing all fields again, so empty fields are saved.
Any suggestons on this?
Best regards
JamFX

Offline Loguithat1955

  • Full Member
  • ***
  • Posts: 54
Re: Problems with carddav plugin
« Reply #6 on: November 29, 2017, 02:52:40 AM »
This is a problem between NextCloud and the Plugin. Nextcloud uses SabreDAV 3.22 which breaks some DAV responses. This was introduced in 3.21. I have reported there a problem with other DAV Clients, specially the Windows 10 Clients. Then there was a fix for this in 3.22 which seems to fix the most clients, but not the CardDAV Plugin. Since there seems to be no easy fix for this, i have downgraded my personal SabreDAV Installation to the working version 3.20. With this version the CardDAV Plugin works as expected. You can update the individual components of SabreDAV manually to the latest versions of the SabreDAV Github Repository. This worked without any problems for me and the most acute mistakes have been fixed. All clients can easily synchronize.

Since development of SabreDAV ist stopped since April last year, i fear this will never get fixed from SabreDAV side. I didn't understand why NextCloud developers have updated to this buggy SabreDAV Version, but in the last moths most of the decisions by the NextCloud developers was more than stupid.

You don't get answers to uncomfortable questions and if you do, you are put off by one developer to the next and get only insufficient answers without a real solution. Problems are not fixed, but mostly "solved" with the phrase that this is the way the developers have thought of it, even if it is still impractical.

Anyway, this is not the right place to discuss NextCloud problems. If you want get the sync to work, you should downgrade the SabreDAV included in Nextcloud to 3.20 and update afterwards the individual components to the newest versions. This should work also with NextCloud. The only thing that is not fixed is the extremely slow sync process. This is caused by the enormous I/O overhead of NextCloud. That was the main reason for me to switch to pure SabreDAV. For example: SabreDAV itself takes near 5 seconds for 300Kb, NextCloud needs between 45 and 65 seconds on the same server for the same task. I talk about sync times, not the NextCloud GUI.

Offline quicktrick

  • Newbie
  • *
  • Posts: 4
Re: Problems with carddav plugin
« Reply #7 on: November 30, 2017, 12:41:09 PM »
The only thing that is not fixed is the extremely slow sync process. This is caused by the enormous I/O overhead of NextCloud. That was the main reason for me to switch to pure SabreDAV. For example: SabreDAV itself takes near 5 seconds for 300Kb, NextCloud needs between 45 and 65 seconds on the same server for the same task. I talk about sync times, not the NextCloud GUI.

Hello Loguithat1955 !

Could you please tell a little more about SabreDAV.  Does it work with PHP 7.1 and Nginx? Do you use it with MySQL? How do you add users to it? Do you use it with Thunderbird too? Which Thunderbird add-on do you use?

(sorry for my poor English) I'm looking for a CardDAV solution for my mail server.

Thanks in advance!

Offline Loguithat1955

  • Full Member
  • ***
  • Posts: 54
Re: Problems with carddav plugin
« Reply #8 on: November 30, 2017, 03:06:05 PM »
SabreDAV is the base of NextCloud/OwnCloud in terms of the DAV Features (Calendar/ToDos/Contacts/Files). If i understand it correctly, development of this was nearby a one-man-show and it is to much for the developer. Yes, it works great with PHP 7.x and nginx. I use it with PHP 7.0 and nginx 1.10, since this are the latest stable versions on Debian 9. I use it with Maria DB, which is nearly the same as MySQL. Since there is no real GUI, you can add users directly in to the database. a first user should be created automatically after first install as an example. I didn't use Thunderbird, i use eMClient on the Desktop where DAV Features a build in and work wonderful. Additionally i use Outlook with CalDAVSynchronizer. Thunderbird-Lightnng can also connect. For contacts you can use Cardbook as AddOn. Paths for DAV and the Database structure is the same as in Nextcloud.

BTW: My English is also not the best, im from Germany :-)
« Last Edit: November 30, 2017, 03:09:32 PM by Loguithat1955 »

Offline quicktrick

  • Newbie
  • *
  • Posts: 4
Re: Problems with carddav plugin
« Reply #9 on: December 01, 2017, 03:11:54 AM »
Thanks a lot for your reply, Loguithat1955 !

Yesterday I found this post from the developer of SabreDAV: After 10 years, I'm stopping my work on sabre/dav.  Though, I don't think the development will actually be stopped. The project is large and mature, so some solution about its support will be found sooner or later.

I'll try to install and use SabreDAV on my server. And maybe I'll ask you some more questions, if you don't mind. :)

Thanks again!

Alex

Offline Loguithat1955

  • Full Member
  • ***
  • Posts: 54
Re: Problems with carddav plugin
« Reply #10 on: December 01, 2017, 05:57:44 AM »
Installation is not very complicated. There are some examples and a relative good documentation. Personally i use in most parts the default values, i have only merged all DAV parts in to one big *.php-file so that all url's share at the end the same paths. Additionally i have set some aliases in nginx so that i have better readable url's. I didn't use the user-management of SabreDAV. so that i do not use the user tables. Authentications works here via http basic auth against the same IMAP server as i setup in Roundcube. With this i can use in all terms the same credentials and if my IMAP credentials change, they change at the same time in all instances of all services. I have found a nginx module, to let it authenticate against IMAP. The only problem is, i cant remember where i have found it before and now it's customized a lot. I hope i didn't loose it...

Offline quicktrick

  • Newbie
  • *
  • Posts: 4
Re: Problems with carddav plugin
« Reply #11 on: December 01, 2017, 06:34:23 AM »
A thousand thanks, Loguithat1955 !  I appreciate your help very much!

Is it too impudent to ask you to share some configs of yours?  :)


Offline Loguithat1955

  • Full Member
  • ***
  • Posts: 54
Re: Problems with carddav plugin
« Reply #12 on: December 01, 2017, 06:58:05 AM »
I cant share anything (specially the imap auth) but the rest should be ok. What do you need for configs? SabreDAV or nginx, or PHP or EAS for SabreDAV?

Offline quicktrick

  • Newbie
  • *
  • Posts: 4
Re: Problems with carddav plugin
« Reply #13 on: December 01, 2017, 07:23:54 AM »
SabreDAV or nginx, or PHP or EAS for SabreDAV?

That would be great!   

(Is there any specific in PHP settings for SabreDAV?)