8000 specific calendar events crash the calendar integration · Issue #53465 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

specific calendar events crash the calendar integration #53465

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

Closed
itobey opened this issue Jul 25, 2021 · 1 comment · Fixed by #61718 or #65685
Closed

specific calendar events crash the calendar integration #53465

itobey opened this issue Jul 25, 2021 · 1 comment · Fixed by #61718 or #65685

Comments

@itobey
Copy link
itobey commented Jul 25, 2021

The problem

issue

When setting up my calendar I noticed the calendar integration breaking, which happened suddenly after it worked for days without an issue. It took me some time to figure out what has been happening and I can now report an issue.

In short: if a calendar event has the duration of the entire day and is scheduled to be repeated on a yearly basis, this event will crash the calendar integration as long as this event is yesterday. This can be worked around by removing the yearly repeat feature or moving the event to today or 2 days back - which all is not helpful for a calendar.

context

This is an event which will crash the integration (displayed in .ics format):

BEGIN:VEVENT
DTSTAMP:20210706T115337Z
UID:0c2b9e78-a731-4dfb-832b-1cb44bb105fc
SUMMARY:Guy Bday
DTSTART;VALUE=DATE:20210723
DTEND;VALUE=DATE:20210724
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=7
STATUS:CONFIRMED
BEGIN:VALARM
TRIGGER:-PT30M
ACTION:DISPLAY
DESCRIPTION:Guy Bday
END:VALARM
END:VEVENT

However it will only crash the integration if today is 2021-07-24. If today is any other date it will not crash. Moreover the integration heals itself when the day changes. So if it's 2021-07-24 and the integration is crashed, the issue will resolve automatically if the day changes to 2021-07-25.

error message

The error thrown in the log is this one:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 350, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 558, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 146, in update
    self.data.update()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 280, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 212, in update
    vevent = event.instance.vevent
  File "/usr/local/lib/python3.8/site-packages/vobject/base.py", line 531, in __getattr__
    raise AttributeError(name)
AttributeError: vevent
2021-07-24 23:59:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for calendar.default_calendar fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/vobject/base.py", line 529, in __getattr__
    return self.contents[toVName(name)][0]
KeyError: 'vevent'

similar issues

#46345

environment

  • everything in Docker, hosted with K3s
    • homeassistant/home-assistant:2021.6.6
    • calendar CalDAV: ckulka/baikal:0.8.0
    • creation of events: Android DAVx5 3.3.12-gplay + Simple Calendar 6.14.1 Pro

configuration of the integration

calendar:
  - platform: caldav
    username: myuser
    password: mypass
    url: https://baikal.nuc.local/dav.php/calendars/myuser/default/
    verify_ssl: false

There are no issues with other tools like the Android calendar to interact with the events and CalDAV - only the Home Assistant integration crashes for an entire day.

What is version of Home Assistant Core has the issue?

homeassistant/home-assistant:2021.6.6

What was the last working version of Home Assistant Core?

homeassistant/home-assistant:2021.6.6

What type of installation are you running?

Home Assistant Container

Integration causing the issue

calendar

Link to integration documentation on our website

No response

Example YAML snippet

calendar:
  - platform: caldav
    username: myuser
    password: mypass
    url: https://baikal.nuc.local/dav.php/calendars/myuser/default/
    verify_ssl: false

Anything in the logs that might be useful for us?

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 350, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 558, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 146, in update
    self.data.update()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 280, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 212, in update
    vevent = event.instance.vevent
  File "/usr/local/lib/python3.8/site-packages/vobject/base.py", line 531, in __getattr__
    raise AttributeError(name)
AttributeError: vevent
2021-07-24 23:59:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for calendar.default_calendar fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/vobject/base.py", line 529, in __getattr__
    return self.contents[toVName(name)][0]
KeyError: 'vevent'

Additional information

I'm using the atomic-calendar-revive in lovelace, but the stacktrace makes be believe that the core issue is in the calendar integration.

@probot-home-assistant
Copy link

caldav documentation
caldav source
(message by IssueLinks)

@github-actions github-actions bot added the stale label Aug 24, 2021
@github-actions github-actions bot closed this as completed Sep 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
0