addrb icon indicating copy to clipboard operation
addrb copied to clipboard

How to use with Nextcloud?

Open doronbehar opened this issue 2 years ago • 2 comments

Hello :)

Thanks for writing and sharing this command line application. It looks promising!

I'm having trouble using it with Nextcloud, I'm getting 404 errors (admin is my nextcloud username):

When using https://nextcloud.doronbehar.com/remote.php/dav/ as the endpoint:

404 Not Found: <error xmlns="DAV:"><exception xmlns="http://sabredav.org/ns">Sabre\DAV\Exception\NotFound</exception><message xmlns="http://sabredav.org/ns">File not found: admin in &#39;principals&#39;</message></error>

When using https://nextcloud.doronbehar.com/remote.php/dav/addressbooks/users/admin/personal/ as the endpoint:

404 Not Found: <error xmlns="DAV:"><exception xmlns="http://sabredav.org/ns">Sabre\DAV\Exception\NotFound</exception><message xmlns="http://sabredav.org/ns">Card not found</message></error>

The last URL works with vdirsyncer.

doronbehar avatar Nov 20 '22 07:11 doronbehar

Thanks for reporting! Unfortunately I do not have access to a Nextcloud system and hence can't really tell what's going on there. However, what you should be able to do (depending on the server) is open the URL in your browser and see what it shows you. The solution that I'm using is also using SabreDAV as backend and when I open the /dav/ URL in my browser (and log in) I can navigate through the DAV tree.

However, one thing that might be causing an issue is the fact that currently addrb doesn't go through all your address books, but only the very first it can find. See here:

https://github.com/mrusme/addrb/blob/785d726e2c0f42db02d302eac250c6eb8508ab5b/addrb.go#L128

It could be that your server is structured differently and hence this approach won't work. As said before, this solution works for me (TM) but I have never tested it on Nextcloud or any other backend. Feel free to further investigate and submit a PR if you happen to find a quickfix for the issue!

mrusme avatar Nov 20 '22 17:11 mrusme

probably same problem: https://github.com/mrusme/caldr/issues/1

Junker avatar Dec 30 '22 11:12 Junker