404s when trying to sync from google cal with start_date and end_date
When I'm using start_date and end_date then vdirsyncer cannot sync and fails with 404 errors. Kind of like google is listing non-existing calendar events when those parameters are supplied. If I'm commenting the fields out, then syncing works. I don't know how to workaround this issue other than just syncing everything.
- vdirsyncer version: 0.18.0
- python version: 3.10.7
- operating system: latest alpine docker image
Config:
[general]
status_path = "./status/"
[pair workcal]
a = "work"
b = "wolke"
collections = [["work", "[email protected]", "arbeit"]]
conflict_resolution = "a wins"
[storage work]
type = "google_calendar"
token_file = "./googleoathtoken"
client_id = "---"
client_secret = "---"
start_date = "datetime.now()"
end_date = "datetime.now() + timedelta(days=365)"
read_only = true
[storage wolke]
type = "caldav"
url = "https://nextcloud.example.com/remote.php/dav"
username = "username"
password = "----"
Log:
error: Unknown error occurred for workcal/work: /caldav/v2/[email protected]/events/[email protected]
error: Use `-vdebug` to see the full traceback.
debug: File "/usr/local/lib/python3.10/site-packages/vdirsyncer/cli/tasks.py", line 71, in sync_collection
debug: sync.sync(
debug: File "/usr/local/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 140, in sync
debug: a_nonempty = a_info.prepare_new_status()
debug: File "/usr/local/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 61, in prepare_new_status
debug: for href, item, etag in self.storage.get_multi(prefetch) if prefetch else ():
debug: File "/usr/local/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 505, in get_multi
debug: raise exceptions.NotFoundError(href)
And a little bit above:
[...]DESCRIPTION:This is an event reminder\nTRIGGER:-P0DT0H10M0S\nEND:VALARM\nEND:VEVENT\nEND:VCALENDAR\n</caldav:calendar-data>\n </D:prop>\n </D:propstat>\n </D:response>\n <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">\n <D:href>/caldav/v2/[email protected]/events/[email protected]</D:href>\n <D:status>HTTP/1.1 404 Not Found</D:status>\n </D:response>\n <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">\n <D:href>/caldav/v2/[email protected]/events/[email protected]</D:href>\n <D:status>HTTP/1.1 404 Not Found</D:status>\n </D:response>\n <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">\n <D:href>/caldav/v2/[email protected]/events/[email protected]</D:href>\n <D:status>HTTP/1.1 404 Not Found</D:status>\n </D:response>\n <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">\n <D:href>/caldav/v2/[email protected]/events/[email protected]</D:href>\n <D:status>HTTP/1.1 404 Not Found</D:status>\n </D:response>\n <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">\n <D:href>/caldav/v2/[email protected]/events/[email protected]</D:href>\n <D:status>HTTP/1.1 404 Not Found</D:status>\n </D:response>\n <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">\n <D:href>/caldav/v2/[email protected]/events/[email protected]</D:href>\n <D:status>HTTP/1.1 404 Not Found</D:status>\n </D:response>\n</D:multistatus>\n
Is this linked with https://github.com/pimutils/vdirsyncer/issues/760? Seeing the same issue while trying to link an existing fastmail cal.
It looks like any event with @ in it's name will error.
I can't seem to figure out how to get a non-404 response from Fastmail CalDAV for events with at-signs in their UIDs. I've submitted a support ticket with Fastmail inquiring about the behavior.
I can't seem to figure out how to get a non-404 response from Fastmail CalDAV for events with at-signs in their UIDs. I've submitted a support ticket with Fastmail inquiring about the behavior.
Sounds like an issue in vdirsyncer to be honest, we have some issues with regards to un-encoding UIDs with escaped characters.
This is a separate issue though. I think there is a ticket for it somewhere.
I'll go ahead and make sure I test the new implementation for this specific sitution.
I should have posted this follow-up (I haven't had a chance to look into it myself yet), but the Fastmail folks say this is a bug on the vdirsyncer side, and have a convincing argument for why:
In my testing, https://github.com/pimutils/vdirsyncer/commit/889183ec89ba807177ee7a276d6f9113df09e7ac resolves this issue (I did a bisect after finding the error was gone in the latest revision).
That patch was included in 0.19.0 (Dec 2022). Please upgrade
Yep, I did so once I realized the issue had been resolved, and the new version works perfectly. Ubuntu 22.04 doesn't ship a recent enough version so I packaged it myself.