home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.62k stars 29.93k forks source link

CalDAV client error: PropfindError at '405 Method Not Allowed #122202

Closed xNaCly closed 1 month ago

xNaCly commented 2 months ago

The problem

Attempting to create a new caldav connection to protoncalender results in the following error:

CalDAV client error: PropfindError at '405 Method Not Allowed b'<html><body><h1>405 Method Not Allowed</h1>\nA request was made of a resource using a request method not supported by that resource\n</body></html>\n'', reason no reason 

What version of Home Assistant Core has the issue?

core-2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

caldav

Link to integration documentation on our website

https://www.home-assistant.io/integrations/caldav/

Diagnostics information

2024-07-19 20:24:11.663 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.12/site-packages/vobject/base.py:736: SyntaxWarning: invalid escape sequence '\-'

  patterns['name'] = '[a-zA-Z0-9\-_]+'

2024-07-19 20:24:11.678 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.12/site-packages/vobject/base.py:1219: SyntaxWarning: invalid escape sequence '\;'

  s = s.replace("\\", "\\\\").replace(";", "\;").replace(",", "\,")

2024-07-19 20:24:11.679 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.12/site-packages/vobject/base.py:1219: SyntaxWarning: invalid escape sequence '\,'

  s = s.replace("\\", "\\\\").replace(";", "\;").replace(",", "\,")

2024-07-19 20:24:27.884 WARNING (MainThread) [homeassistant.components.caldav.config_flow] CalDAV client error: PropfindError at '405 Method Not Allowed

b'<html><body><h1>405 Method Not Allowed</h1>\nA request was made of a resource using a request method not supported by that resource\n</body></html>\n'', reason no reason

2024-07-19 20:24:42.060 WARNING (MainThread) [homeassistant.components.caldav.config_flow] CalDAV client error: PropfindError at '405 Method Not Allowed

b'<html><body><h1>405 Method Not Allowed</h1>\nA request was made of a resource using a request method not supported by that resource\n</body></html>\n'', reason no reason

Example YAML snippet

No response

Anything in the logs that might be useful for us?

image

Additional information

To reproduce, the following could help, i created a dummy calender to subscribe to:

https://calendar.proton.me/api/calendar/v1/url/Z85iOPKmM6nZoeZa6FcbxfD1Ki3JtXEhTm7aBN1sUv2hs3JoaoKzTNcfMRBkhHv_L-vNYz5ek1fGECBgCHttKg==/calendar.ics?CacheKey=-T3wmDwWvjJYNjo6asUyyw%3D%3D

For anyone investigating, the error seems to occur here:

https://github.com/home-assistant/core/blob/288faf48e7d9228dda8d389a0299d6b4335e1259/homeassistant/components/caldav/config_flow.py#L82-L84

home-assistant[bot] commented 2 months ago

caldav documentation caldav source

shreyasajj commented 1 month ago

Hey, It looks like you were trying to connect to calendar api rather than the caldav version of protonmail, I dont think they have support for caldav https://www.reddit.com/r/ProtonMail/comments/yj0rev/caldav_support_for_calendar/

xNaCly commented 1 month ago

Hey, It looks like you were trying to connect to calendar api rather than the caldav version of protonmail, I dont think they have support for caldav https://www.reddit.com/r/ProtonMail/comments/yj0rev/caldav_support_for_calendar/

Oh seems like youre right, i always assumed it was just caldev because it worked in thunderbird and in the ios calender, thanks :)