pimutils / pimutils/vdirsyncer

Failing iCloud Discovery

Open
#838 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
185
Avg merge
11h 49m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing vdirsyncer -vdebug discover with the reported iCloud configuration and capture the missing SSL traceback. Trace the request through vdirsyncer/storage/dav.py and vdirsyncer/http.py; done means initial iCloud discovery completes without the SSL failure or missing-collection warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.