yandex carddav failed - vdirsyncer doesn't understand
I'm tyring to setup new yandex carddav url, I setup it using:
[storage local_contacts_ya]
type = "filesystem"
path = "~/encfs/cfg/contacts"
fileext = ".vcf"
[storage yandex_contacts]
type = "carddav"
token_file = "~/.config/vdirsyncer/yandex_con"
url = "https://carddav.yandex.ru/addressbook/[email protected]/1/"
username = "[email protected]"
password = "PASS"
[pair contacts_ya]
a = "yandex_contacts"
b = "local_contacts_ya"
collections = ["from a", "from b"]
metadata = ["displayname"]
Here is a result of discover command:
# vdirsyncer discover contacts_ya
Discovering collections for pair contacts_ya
yandex_contacts:
- "1"
local_contacts_ya:
- "default"
warning: No collection "1" found for storage local_contacts_ya.
Should vdirsyncer attempt to create it? [y/N]: y
warning: No collection "default" found for storage yandex_contacts.
Should vdirsyncer attempt to create it? [y/N]: y
error: The server returned something vdirsyncer doesn't understand. Error message: InvalidXMLResponse("Couldn't find home-set.")
error: While this is most likely a serverside problem, the vdirsyncer devs are generally interested in such bugs. Please report it in the issue tracker at https://github.com/pimutils/vdirsyncer/issues
Can you try using the URL https://carddav.yandex.ru/addressbook/[email protected]/ instead?
If that doesn't work, I need to understand your scenario a bit better:
- Do you already have contacts in your local storage?
- Do you already have contacts in the remote storage?
Debug logs would also be useful here, since the server is returning a response that vdirsyncer is not understanding:
error: The server returned something vdirsyncer doesn't understand. Error message: InvalidXMLResponse("Couldn't find home-set.")
Seeing this response might help better understand what's up.
This is a new sync. Storage path has 'default' folder which should not be used. 1 remote contact.
Debug output, no cookies
https://paste.debian.net/1347040/
The "storage" path is the directory where all your address books are contained. Each directory inside of it is a separate address book.
If you create directory ~/encfs/cfg/contacts/1 and delete directory ~/encfs/cfg/contacts/default, all should work fine.
The root of the issue here is that vdirsyncer can't determine the home path from your provider (e.g.: the server returns an empty <c:addressbook-home-set />, so it doesn't know where to create the "default" address book that it's seeing locally.
Right. It works. I'm syncing google into contacts/default and yandex into contacs/1, which causing the issue. I had to create separate dirrectories for google and yandex.
Vdirsyncer is trying to default in yandex because you're telling it to sync all collections found in storage b and all collections found in storage a. If you only want to sync the collection that already exists in yandex, use:
[pair contacts_ya]
a = "yandex_contacts"
b = "local_contacts_ya"
collections = ["from a"] # don't include "from b" here
metadata = ["displayname"]