pimutils / vdirsyncer

📇 Synchronize calendars and contacts.
https://vdirsyncer.pimutils.org/
Other
1.57k stars 163 forks source link

vdirsyncer fails to sync privately shared icloud calendars #800

Open brabalan opened 5 years ago

brabalan commented 5 years ago

My partner privately shares two icloud calendars with my calendars. Both calendars fails to sync with the following backtrace:

error: Unknown error occured for icloud_cal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: /xxxxxxxx/calendars/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.ics
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/cli/tasks.py", line 69, in sync_collection
debug:     partial_sync=pair.partial_sync
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/__init__.py", line 136, in sync
debug:     b_nonempty = b_info.prepare_new_status()
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/__init__.py", line 59, in prepare_new_status
debug:     if prefetch else ()):
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/storage/dav.py", line 505, in get_multi
debug:     raise exceptions.NotFoundError(href)

These calendars have an id that is much longer than the "normal" calendars (64 characters). Could this be a size limit on the file name?

[pair icloud_cal] a = "icloud_cal_local" b = "icloud_cal_remote" collections = ["from a", "from b"] metadata = ["displayname"]

[storage icloud_cal_local] type = "filesystem" path = "~/.calendars/icloud/" fileext = ".ics"

[storage icloud_cal_remote] type = "caldav" url = "https://caldav.icloud.com/" username = "…" password = "…"

typemoe commented 5 years ago

Exactly the same configuration, exactly the same error under MacOS.

malterik commented 1 year ago

I'm having the same issue at the moment with vdirsyncer 0.19.0. I can sync non-shared calendars from icloud but when I attempt to sync the shared one I get an internal server error. This is the error log.

debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/cli/tasks.py", line 72, in sync_collection
debug:     await sync.sync(
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/sync/__init__.py", line 145, in sync
debug:     b_nonempty = await b_info.prepare_new_status()
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/sync/__init__.py", line 62, in prepare_new_status
debug:     async for href, item, etag in self.storage.get_multi(prefetch):
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/storage/dav.py", line 524, in get_multi
debug:     response = await self.session.request(
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/storage/dav.py", line 416, in request
debug:     return await http.request(method, url, session=session, **more)
debug:   File "/usr/lib/python3/dist-packages/vdirsyncer/http.py", line 153, in request
debug:     response.raise_for_status()
debug:   File "/usr/lib/python3/dist-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
debug:     raise ClientResponseError(
epichub commented 1 year ago

This is my experience aswell, trying to sync to/from a shared icloud calendar..

WhyNotHugo commented 1 year ago

Can you provide a full debug log? The error in 0.19.0 seems different from the error in 0.16.7.