-
Notifications
You must be signed in to change notification settings - Fork 13
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
Cannot read property 'length' of undefined #26
Comments
I got same error every one/two days at endReadableNT (_stream_readable.js:1139:12) |
Same. Any solution? TypeError: Cannot read properties of undefined (reading 'length') |
Same problem since a couple of days now. It used to work without any problem and then without changes to the config this problem came up. TypeError: Cannot read properties of undefined (reading 'length') My config: |
Just had the same error that started on 3/1/2022 [02/03/2022, 06:54:37] TypeError: Cannot read properties of undefined (reading 'length') |
Same problem until 1st March 2022. Somebody have a tip to fix the issue? Calendar was also iCloud.com. webcal://p55-caldav.icloud.com/published/2/xxxxxxxxxxxxx [06/03/2022, 16:55:31] TypeError: Cannot read property 'length' of undefined |
Does anyone have an idea why this is happening now? Is it on the side of the calendar plugin or did Apple change something in their calendars recently? Can anybody help? Devs maybe? |
Hey guys, @boehser-enkel, @appliko, @VoWiOx, @xTrackstar04x What kind of ical-appointments are you using? I am using full-day events without start and end time. I am just curious and want to figure out what the problem might be. I forked this repository and if no dev comes back to our issue then I will try to fix it for me. Maybe it will work for you too, so please be so kind and answer my question. CU |
Hi @elvirusDE, I would prefer the homebridge calendar plugin when it was fixed. Maybe the error is in ical.js module but I am not a developer in js. Thanks in advance! |
Hey guys, Because the developers did not post any answer to this issue or even posted any message, I forked the repository and wanted to try and test if the error still exist with updated dependencies. I wanted to try and test different solutions. I published my fork as a new plugin. And as soon as I started my Raspberry, the plugin started working again! The error is currently not present anymore in my system. What about you guys? Is it working again for you too? Please tell me. I will keep an eye on this issue and come back if the error returns for some reason. But currently I am happy that it is working again. Cheers, |
@elvirusDE I will try it right now. Would you be able to share how to install your fork? I've only installed plug ins for Homebridge via the UI |
@xTrackstar04x I am so sorry, the original plugin worked for me yesterday but today it stopped working again. I was so excited because I thought the error disappeared on its own. That's so bad. CU |
@boehser-enkel, @appliko, @VoWiOx, @xTrackstar04x Hi guys, so I spent a day and a night on that issue and I have some findings: First of all, you can install my fork if you wish by searching for the plugin name "homebridge-calendar-tempfix". I have just changed a little bit of code and I will tell you more details about it in the following. First things first.
I made a pull request for the plugin to merge my changes because I think it adds to the stability and is really necessary but I don't think the devs are actively working on this plugin anymore. Ok, that's all for now. CU :) |
@elvirusDE Just installed it. Looks like it is working for me! |
👍 |
Hej @elvirusDE. I Just tried you branch and still getting this error: TypeError: Cannot read properties of undefined (reading 'forEach')
|
Hi @Thilos123! I have no idea, what is going wrong here. I will take a look at the code and try to figure out what might be the issue. Please keep in mind that I am not the original developer of that plugin so I am not deeply familiar with it. But fontunately it is not too complex so I will give it a try. Cheers, |
Hey @elvirusDE. Thanks for the fast reply! I have tested with M365 calendar before that worked perfectly. It's just a test calender containering a few events in the future. The pictures below is what the console says and the config file. |
Hello @elvirusDE . Just to give you some logs etc. Just started a new VM up with homebridge. This gives a ParserError. |
Thank you for the info. I will give it a try. |
That is totally fair! :-) Thanks for looking into it. I have actually got an cloud calender working now with this config: Can't get a Google or M365 to work still. But it seems they both uses HTTPS. So it seems the common denominator is ics from https. |
Hi @Thilos123, it seems that office365 calendars are not supported. In the readme of the library is stated that Apple (iCloud) calendars and Google calendars are supported. I am using an Apple iCloud calendar and that works for me. Other calendars which are RFC 5545 compliant should also work. From my understanding, Outlook calendars should be compliant to the standard (https://interoperability.blob.core.windows.net/files/MS-STANOICAL/%5BMS-STANOICAL%5D.pdf) but for Office365 I don't know. The parsing library used to parse the calendar data is ical.js (https://github.com/mozilla-comm/ical.js/) and they offer a parsing tool where you can test your calendar file to determine if it is able to be parsed by ical.js. You can find the validator website here: https://mozilla-comm.github.io/ical.js/validator.html If you paste your calendar data into the input field you will see that your office365 calendar file format is supported by ical.js. So no problem here. If I change my own Apple calendar URL from webcal:// to https:// it is working without problems. So you can use a https URL. But http will not work. By looking at your submitted configs:
Sorry, I have no further information at the moment. I will try to test it with an office365 calendar myself, maybe I will get some more insights. Cheers, |
Hej @elvirusDE. The reason for no sensors is that, it will add a sensor by default that is called the "Name" variable as a switch that returns 1 when there is an event and 0 when there is none, and that is all i need. I have tried with a M365 before that worked. So it seems wierd it's not working now. But. I have found a workaround for my automation. I am using an apple calendar and using a Siri Shortcut to add and remove events from my M365 calender to my Apple calendar that is working just fine. So you don't need to investigate further for my part. Thanks for looking into it! :-) |
Hej @Thilos123, thank you for the explanation of the sensors part. I did not know that. If the workaround is good for you then I am happy that you found a solution. This stuff is always asking for clever solutions. There is always some little detail problem to solve. Nice that it is working for you now. Cheers, |
Hej @Thilos123, just one more thing: And maybe it is a good idea to tell the Microsoft support about that issue. Best regards, |
Hi,
just updated to the neweset Homebridge Version. Now i get this error every night and my HB crashes:
[01/10/2020, 01:22:29] TypeError: Cannot read property 'length' of undefined at Component.getAllSubcomponents (/usr/local/lib/node_modules/homebridge-calendar/node_modules/ical.js/build/ical.js:2304:48) at new IcalExpander (/usr/local/lib/node_modules/homebridge-calendar/node_modules/ical-expander/index.js:17:34) at CalendarPoller._refreshCalendar (/usr/local/lib/node_modules/homebridge-calendar/src/CalendarPoller.js:69:26) at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-calendar/src/CalendarPoller.js:54:14) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1201:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) [01/10/2020, 01:22:29] Got SIGTERM, shutting down Homebridge... [01/10/2020, 01:22:34] [Deconz] goodbye
The text was updated successfully, but these errors were encountered: