Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible regression: any URL should work #171

Closed
tobixen opened this issue Feb 8, 2022 · 9 comments
Closed

Possible regression: any URL should work #171

tobixen opened this issue Feb 8, 2022 · 9 comments
Milestone

Comments

@tobixen
Copy link
Member

tobixen commented Feb 8, 2022

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 home-assistant/core#65588 and home-assistant/core#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 added a commit that referenced this issue Feb 11, 2022
Two Home Assistant users reported that they were unable to connect to their
caldav servers after upgrading HA.  Both of them got the same error message,
both of them had configured up a non-base-URL in the config.  Feeding DAVClient
with a calendar URL, principal URL or any other caldav URL should work and was
working with earlier versions of caldav, though it appears we have no specific
test code on that.

Now we have test code feeding the DAVClient with a principal URL and a calendar
URL.  Unfortunately, I haven't been able to reproduce the problem yet.

Updates #171
References #169
References home-assistant/core#65941
References home-assistant/core#65588
@tobixen
Copy link
Member Author

tobixen commented Mar 2, 2022

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 tobixen added this to the v0.9 milestone Mar 2, 2022
@tobixen
Copy link
Member Author

tobixen commented Mar 7, 2022

This one is annoying. Some hypotheses:

  • This bug sneaked in when I was trying to solve Unable to connect :  #158, and has disappeared after a full refactoring of that work. I don't think it's likely, but it should be possible to figure out, it's just to run the 0.9-tests towards 0.8.x.
  • This is still a problem, I just haven't been able to reproduce it because I haven't been running the tests towards the right calendar server yet.
  • This is a problem specific to Home Assistant. I should have a look into the Home Assistant code.
  • The test code I've written is testing the wrong thing and is unable to reproduce the error.

@ACiDGRiM
Copy link

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
Copy link
Member Author

tobixen commented Mar 15, 2022

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
Copy link

ACiDGRiM commented Mar 15, 2022

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
Copy link
Member Author

tobixen commented Apr 24, 2022

#180 could be related, but probably not.

@tobixen
Copy link
Member Author

tobixen commented Apr 24, 2022

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
Copy link

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

@tobixen
Copy link
Member Author

tobixen commented Sep 6, 2022

I'll close it then. Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants