mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
14.01k stars 1.44k forks source link

roundcube carddav not working #1269

Open tbhi opened 7 years ago

tbhi commented 7 years ago

I'm finding that roundcube isn't picking up carddav contacts. The address book is shown in roundcube but doesn't update and I can't see the settings similiar to https://github.com/blind-coder/rcmcarddav/issues/186.

/var/log/roundcubemail/carddav.warn has entries like [15-Oct-2017 08:56:27 +0100]: <mg0pk32f> BACKEND: (refreshdb_from_server) Errors occurred during the refresh of addressbook 2

tbhi commented 7 years ago

Just tried the upstream master branch and that works ok. Have asked for a new release - https://github.com/blind-coder/rcmcarddav/issues/210

NoahAndrews commented 6 years ago

Seems like we can't count on that release happening anytime soon. Maybe we should install this from git instead of a release tarball. The README even shows that that's a supported form of installation.

JoshData commented 6 years ago

I plan to make a release tomorrow.

On January 17, 2018 3:05:29 PM EST, Noah Andrews notifications@github.com wrote:

Seems like we can't count on that release happening anytime soon. Maybe we should install this from git instead of a release tarball. The README even shows that that is a supported form of installation.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mail-in-a-box/mailinabox/issues/1269#issuecomment-358427418

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

NoahAndrews commented 6 years ago

Awesome, will it fix this issue?

JoshData commented 6 years ago

We'll find out tomorrow! I haven't looked into it yet.

JoshData commented 6 years ago

Oh ugh I misread the comment above. You meant a release of rcmcarddav, I think? I thought you meant you were waiting on a release of Mail-in-a-Box. I thought rcmcarddav was already patched. Sorry. I'm going to post a new release of Mail-in-a-Box. (I don't understand the rcmcarddav issue so I'm not able to do anything for that in our release.)

NoahAndrews commented 6 years ago

Ah, gotcha. @stan3 says that the master branch version of rcmcarddav works correctly, so it should be enough to just download it from there during setup, rather than the outdated tarball.

bpeterman commented 6 years ago

@NoahAndrews I'm not sure that master is quite stable for that plugin. I'm getting this error when using the master zip of rcmcarddav: `[27-Jan-2018 13:55:20 America/Denver] PHP Fatal error: Uncaught Error: Class 'Httpful\Bootstrap' not found in /usr/local/lib/roundcubemail/plugins/carddav/carddav_common.php:25 Stack trace:

0 /usr/local/lib/roundcubemail/plugins/carddav/carddav_backend.php(22): require_once()

1 /usr/local/lib/roundcubemail/plugins/carddav/carddav.php(122): require_once('/usr/local/lib/...')

2 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_plugin_api.php(99): carddav->init()

3 /usr/local/lib/roundcubemail/program/include/rcmail.php(135): rcube_plugin_api->init(Object(rcmail), 'mail')

4 /usr/local/lib/roundcubemail/program/include/rcmail.php(79): rcmail->startup()

5 /usr/local/lib/roundcubemail/index.php(43): rcmail::get_instance(0, NULL)

6 {main}

thrown in /usr/local/lib/roundcubemail/plugins/carddav/carddav_common.php on line 25 `

It's possible it's something on my side. I'll keep debugging.

bpeterman commented 6 years ago

Whoops, looks like I was just missing a dependency. It's working for me.

yeah commented 6 years ago

Whoops, looks like I was just missing a dependency. It's working for me.

Which one? I'm about to prepare a PR for this and am running into the same error.

bpeterman commented 6 years ago

I believe it was Httpful\Bootstrap but that's just based on the error message in my previous comment. I can check tomorrow when I'm able to log in and see what I did.

yeah commented 6 years ago

Thanks, I've found it in the meantime. It was right there in the README :-)

Install composer as per the documentation: https://getcomposer.org/download/ Run php composer.phar install

Using the latest master doesn't seem to solve the initial issue of contact changes not being picked up in Roundcube though. Does that work for you now?

bpeterman commented 6 years ago

It worked when I had tried it originally. But since logging in just now I don't see any of my nextcloud contacts. There might still be some issues with that plugin. :/

yeah commented 6 years ago

I have a branch at yeah/mailinabox that installs the RoundCube CardDAV plugin from source (using Composer for the above-mentioned dependency...).

However, it doesn't solve the initial problem this issue was opened for. @stan3 which revision did you use to make it work?

tbhi commented 6 years ago

Just checked on my box and it appears after numerous upgrades I now have the 2.0.4 release version. The strange thing is that still all seems to be working and I've just tried adding a new entry to make sure it's not just cached. So not sure what's happening. If I get time will try again with a clean box.

yeah commented 6 years ago

2.0.4 – of which software? I was referring to your revision of the carddav plugin...

tbhi commented 6 years ago

2.0.4 of rcmcarddav

yeah commented 6 years ago

I'm sorry. I was looking at their changelog which stops at 0.8.0, so i got confused.

Interesting though that it’s working for you with 2.0.4 which is the version that MiaB is using right now.

I can definitely still reproduce the problem with 2.0.4.

kingwarrick commented 6 years ago

Not sure if it is related, but I've got an interesting situation that may end up being a separate issue.

Can see the address book in Roundcube, but it is empty. Nextcloud shows the contacts, which can also be accessed via third party connections through DAVDroid etc.

This is from carddav.warn:

[28-Mar-2018 10:13:17 -0700]: BACKEND: (get_record_from_carddav) Request for VCF '7B827C55-8AF2-48F2-AD89-52CD395620A5.vcf' which doesn't exist on the server.

and this from roundcube/errors

[29-Mar-2018 12:09:41 America/Los_Angeles] PHP Warning: Declaration of carddav_backend::rename_group($group_id, $newname) should be compatible with rcube_addressbook::rename_group($group_id, $newname, &$newid) in /usr/local/lib/roundcubemail/plugins/carddav/carddav_backend.php on line 26 [29-Mar-2018 13:34:38 America/Los_Angeles] PHP Warning: Declaration of carddav_backend::delete($ids) should be compatible with rcube_addressbook::delete($ids, $force = true) in /usr/local/lib/roundcubemail/plugins/carddav/carddav_backend.php on line 26 [29-Mar-2018 13:34:38 America/Los_Angeles] PHP Warning: Declaration of carddav_backend::list_groups($search = NULL) should be compatible with rcube_addressbook::list_groups($search = NULL, $mode = 0) in /usr/local/lib/roundcubemail/plugins/carddav/carddav_backend.php on line 26 [29-Mar-2018 13:34:38 America/Los_Angeles] PHP Warning: Declaration of carddav_backend::rename_group($group_id, $newname) should be compatible with rcube_addressbook::rename_group($group_id, $newname, &$newid) in /usr/local/lib/roundcubemail/plugins/carddav/carddav_backend.php on line 26

There's more. The user whose address book is missing from Roundcube has admin access to Nextcloud, and can enable/disable apps (I thought this was not enabled in MIaB?). The user was able to 'enable' and 'disable' the contacts and calendar through DAVDroid. Logged in to Nextcloud, and had to enable the apps again to view their contacts in Nextcloud.

Does any of the above sound related to this issue? How come the user has admin access to Nextcloud, and how can I take it away?

I have not yet tried 'updating' rcmcarddav, but will if my issue is seen as related.

Running current MIaB vanilla, no modifications (that I remember making).

EDIT: Unrelated issue. Was a problem with syncing between nextcloud and roundcube, caused by a change in name of the address book. Dropping the old address book row from the carddav_addressbook table in the roundcube database; a new entry populated the table, and the contacts/addressbook now show in roundcube.

JoshData commented 6 years ago

Is this still not working for anyone?

bpeterman commented 6 years ago

It's still not working for me.

jvolkenant commented 5 years ago

Perhaps the latest version of rcmcarddav 3.0.3 resolves this? Anyone that was having this problem able to test b7e9a9000593d5f27dd0cc5ee2b70bcd51196d6a

tomcarlson commented 4 years ago

I have a new (one month) installation of Mailinabox. After getting Thunderbird contacts syncing with Mailinabox's NextCloud, I noticed that those changes were not being reflected in Roundcube. Nextcloud contacts are great, syncing to my Phone and my Thunderbird,, just not getting picked up/ re-synced into Roundcube.