vdirsyncer icon indicating copy to clipboard operation
vdirsyncer copied to clipboard

Failing iCloud Discovery

Open amarand opened this issue 4 years ago • 0 comments

When trying to perform the initial discovery in iCloud, I am receiving an error. I have created an app-specific password for my account and am using that. I can also sign into the web-site directly without issues, so the username (email) and password are working fine.

  • Your vdirsyncer version

vdirsyncer, version 0.16.7

  • If applicable, which server software (and which version) you're using

Raspbian 4.19.118-v7l+

  • Your Python version

Python 3.7.3

  • Your operating system

Raspbian 4.19.118-v7l+

  • Your config file
# vdirsyncer configuration for MagicMirror.
#
# Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it.
# Run `vdirsyncer --help` for CLI usage.
#
# Optional parameters are commented out.
# This file doesn't document all available parameters, see
# http://vdirsyncer.pimutils.org/ for the rest of them.

[general]
# A folder where vdirsyncer can store some metadata about each pair.
status_path = "~/.vdirsyncer/status/"

# CALDAV Sync
[pair iCloud_to_MagicMirror]
a = "Mirror"
b = "iCloud"
collections = ["HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC"]

# Calendars also have a color property
metadata = ["displayname", "color"]

[storage Mirror]
# We need a single .ics file for use with the mirror (Attention! This is really slow on big amounts of events.)
type = "singlefile"
# We'll put the calendar file to a readable location for the calendar module
path = "/home/sgoodman/MagicMirror/modules/calendars/%s.ics"

[storage iCloud]
type = "caldav"
url = "https://caldav.icloud.com/"
# Authentication credentials
username = "e****@d*****.***"
password = "****-****-****-****"
# We only want to sync in the direction TO the mirror, so we make iCloud readonly
read_only = true
# We only want to sync events
item_types = ["VEVENT"]
# We need to keep the number of events low, so we'll just sync the next month
# Adjust this to your needs
start_date = "datetime.now() - timedelta(days=1)"
end_date = "datetime.now() + timedelta(days=30)"
  • Use vdirsyncer -vdebug for debug output. The output is sensitive, but please attach at least the last few lines before the error (if applicable), censored as necessary. This is almost always the most useful information.
vdirsyncer -vdebug discover
debug: Using 1 maximal workers.
Discovering collections for pair iCloud_to_MagicMirror
Mirror:
  - "MagicMirror"
debug: PROPFIND https://caldav.icloud.com/
debug: {'User-Agent': 'vdirsyncer/0.16.7', 'Content-Type': 'application/xml; charset=UTF-8', 'Depth': '1'}
debug:
debug:     <d:propfind xmlns:d="DAV:">
debug:         <d:prop>
debug:             <d:resourcetype />
debug:         </d:prop>
debug:     </d:propfind>
debug:
debug: Sending request...
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/cli/discover.py", line 204, in _print_collections
debug:     discovered = get_discovered()
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/cli/discover.py", line 133, in get_self
debug:     return self._discovered
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/utils.py", line 170, in __get__
debug:     obj.__dict__[self.__name__] = result = self.fget(obj)
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/cli/discover.py", line 142, in _discovered
debug:     return handle_storage_init_error(self._cls, self._config)
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/cli/discover.py", line 138, in _discovered
debug:     discovered = list(self._cls.discover(**self._config))
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/storage/dav.py", line 267, in discover
debug:     for c in self.find_collections():
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/storage/dav.py", line 220, in find_collections
debug:     rv = list(self._find_collections_impl(''))
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/storage/dav.py", line 250, in _find_collections_impl
debug:     data=self._collection_xml)
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/storage/dav.py", line 390, in request
debug:     return http.request(method, url, session=self._session, **more)
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/http.py", line 144, in request
debug:     r = func(method, url, **kwargs)
debug:   File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
debug:     resp = self.send(prep, **send_kwargs)
debug:   File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
debug:     r = adapter.send(request, **kwargs)
debug:   File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
debug:     raise SSLError(e, request=request)
warning: Failed to discover collections for iCloud, use `-vdebug` to see the full traceback.
warning: No collection "HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC" found for storage Mirror.

amarand avatar Jul 15 '20 14:07 amarand