core icon indicating copy to clipboard operation
core copied to clipboard

Remote calendar crashes the system

Open luca-angemi opened this issue 1 year ago • 15 comments

The problem

Adding a remote calendar URL from Outlook crashes the system (RPi4).

In a couple of retries it manages to add the calendar after 30+ seconds.

2025-04-01 14:08:42.066 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for calendar.work (<class 'homeassistant.components.remote_calendar.calendar.RemoteCalendarEntity'>) took 35.159 seconds. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+remote_calendar%22

although, when I try to get the events from a calendar view the system crashes again.

What version of Home Assistant Core has the issue?

2025.4.0b10

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

remote_calendar

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/remote_calendar

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?


Additional information

No response

luca-angemi avatar Apr 01 '25 12:04 luca-angemi

Hey there @thomas55555, mind taking a look at this issue as it has been labeled with an integration (remote_calendar) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of remote_calendar can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign remote_calendar Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


remote_calendar documentation remote_calendar source (message by IssueLinks)

home-assistant[bot] avatar Apr 01 '25 12:04 home-assistant[bot]

Is it a huge calendar? I saw a PR for another calendar integration, which limited the loaded event, because of performance issues. Sounds similar.

Thomas55555 avatar Apr 01 '25 16:04 Thomas55555

I can't judge if it's huge.

There are less than 30 events and the ics file is 58 Kb for approx 1200 lines.

I created an empty calendar and tried that. It was imported in less than 1 second so, yes, it seems to be related to events.

luca-angemi avatar Apr 01 '25 16:04 luca-angemi

I am observing this behaviour as well. My ICS file from Outlook is 240kb and 5145 lines when downloaded directly.

If I subscribe to the same Outlook ICS URL using a Google Account, then share the ICS link for it from Google Calendar, I can add that to Home Assistant as a Remote Calendar. It's a bit convoluted but a workaround nonetheless. :-)

neilmartin83 avatar Apr 02 '25 18:04 neilmartin83

I have this too.

My O365 calendar is probably large. The following events crash my HA:

  • Adding Remote Calendar
  • Navigating to Calendar dashboard
  • Adding calendar widget

I'm going to try and get more debug information but just wanted to make sure the issue was catalogued

fanuch avatar Apr 03 '25 11:04 fanuch

I am observing this behaviour as well. My ICS file from Outlook is 240kb and 5145 lines when downloaded directly.

If I subscribe to the same Outlook ICS URL using a Google Account, then share the ICS link for it from Google Calendar, I can add that to Home Assistant as a Remote Calendar. It's a bit convoluted but a workaround nonetheless. :-)

Nice workaround. I imported the outlook calendar into google and since I was using the Google Calendar integration I just reloaded it and it pop up smoothly. Thanks!

luca-angemi avatar Apr 03 '25 13:04 luca-angemi

Same here. Complete crash of Home Assistant (2025.4.0) when adding a Outlook ICS url as remote calendar. 68 events, 1700 lines, 57 Kb.

snozzlebert avatar Apr 04 '25 17:04 snozzlebert

Same issue is happening for me with 2025.4.1 and an O365/Exchange Online calendar. The ICS file is 206 lines at 6KB

mattenz avatar Apr 05 '25 05:04 mattenz

Experienced the same issue today with a basic free Outlook account calendar. The ICS file 46KB with 60 events.

LeiChat avatar Apr 10 '25 08:04 LeiChat

Same issue my end. Several timeouts also in other integrations when this integration was enabled. After switching it off the other stuff returned to normal operations.

picki72 avatar Apr 22 '25 08:04 picki72

Can reproduce this issue with a pretty big Outlook.com calendar.

akorb90 avatar Apr 26 '25 10:04 akorb90

Tested the fix. Now adding the integration is fine (the same calendar was added in a couple of seconds) but viewing the events in the frontend (or clicking on the entity to see the more info dialog) still crashes the system.

luca-angemi avatar May 06 '25 07:05 luca-angemi

Can you attach diagnostics information to the issue report? https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics

This will give a .json file that has information redacted which you can review before attaching to this github issue. This will give the necessary information to reproduce the problem. (as asked for in the issue template). Thanks.

allenporter avatar May 12 '25 05:05 allenporter

Thank you. These appear to be not huge calendars and the only thing potentially suspect are the VTIMEZONE entries that begin hundreds of years ago and may require iteration through the rrule. Given the redaction is aggressive, it's a little hard to get it back into a normal calendar format so may take me a little time to be able to reproduce.

By crashes the system I assume this means its causing home assistant to run out of ram or something. Anything else in the logs when this happens?

allenporter avatar May 12 '25 14:05 allenporter

Yes, the system goes out of ram from what I can see and there is nothing in the logs. In case you need, I can send you privately the link of the calendar, no problem for me about that.

luca-angemi avatar May 12 '25 14:05 luca-angemi

Not sure if that helps. But I had issues related to the automatic birthday calendar created from entries in the contacts in Outlook. Where there was an invalid date (mainly when I didn’t know the year of birth but only day and month) this caused trouble due to invalid dates when doing stuff using PowerAutomate. After giving all the contacts a valid year the issue was gone.

picki72 avatar May 12 '25 16:05 picki72

@picki72 if you want to re-open a new issue with a redacted diagnostics calendar that could be helpful. Thanks!

allenporter avatar May 13 '25 02:05 allenporter

Yes, the system goes out of ram from what I can see and there is nothing in the logs. In case you need, I can send you privately the link of the calendar, no problem for me about that.

OK that can work -- my email is my github username at gmail.com

allenporter avatar May 13 '25 02:05 allenporter