python-caldav / caldav

Apache License 2.0
324 stars 98 forks source link

Possible regression: any URL should work #171

Closed tobixen closed 2 years ago

tobixen commented 2 years ago

It used to be possible to access a caldav server feeding the DAVClient class with not just the root URL of the caldav server,but with any caldav URL. Apparently this is broken in 0.8.2, ref https://github.com/home-assistant/core/issues/65588 and https://github.com/home-assistant/core/issues/65941 and #169

It's needed to write up test code for this and get this working again for the upcoming version 0.9. Then it's needed to get the library upgraded within Home Assistant.

tobixen commented 2 years ago

One of the reporters claimed to have problems with NextCloud. The current tests have been exercised towards NextCloud, without problems. Two others are reporting problems with iCloud. The tests haven't been exercised towards iCloud yet.

tobixen commented 2 years ago

This one is annoying. Some hypotheses:

ACiDGRiM commented 2 years ago

This may or may not be known, but the public subscription links provided by Nextcloud are actually .ics file downloads served from within the /dav path For example: https://mycloud.domain.net/remote.php/dav/public-calendars/dFK34fADfuisehe?export

This is nice to just connect a calendar without providing a username/password, which is what I used in the past.

Connecting to the caldav url, in HomeAssistant (https://mycloud.domain.net/remote.php/dav) and providing an account username/password does work in HomeAssistant. The work around for not providing a username/password is to create a "service account" in nextcloud, share the desired calendars to this account, and then provide an app-password to HomeAssistant for this non-user service account.

I do not know if the public subscription can be accessed in a non-ics, true cal/dav connection, removing ?export does not improve this issue.

tobixen commented 2 years ago

It could be a regression with the HA integration rather than the caldav library. As I mentioned in one of the other issues raised, the caldav library should not be used at all for parsing an .ics-feed. However, the iCloud users are reporting issues with caldav-URLs pointing to a calendar and not to an ICS feed.

I had hoped to get time looking into this, but then a f... war broke out. I'm currently doing volunteer work at the Polish/Ukrainian border.

ACiDGRiM commented 2 years ago

Do what you need to do! I solved my issue and just hoped to add a detail if it was useful.

Hopefully you can get back to more mundane 1st world problems soon, who would have thought they would be preferable to anything, let alone war!

tobixen commented 2 years ago

180 could be related, but probably not.

tobixen commented 2 years ago

I never really found out of this issue, but I'm planning to release v0.9 tomorrow. Perhaps it will solve the problem. I hope so.

elohmeier commented 2 years ago

I can confirm this is fixed in release v0.9.1.

tobixen commented 2 years ago

I'll close it then. Yay!