Calendar: Calendar loads endlessly: Uncaught (in promise) TypeError: Cannot read property 'hasProperty' of undefined at app.js:4069

Created on 2 Jun 2017  Â·  24Comments  Â·  Source: nextcloud/calendar

Unfortunately, I don't know exactly how to reproduce the bug.

I have nextcloud-12 and calendar-1.5.3 and php7.0. I'm using the web interface of the calendar.

Looking at the month of May, everything is fine.
Looking at the month of June, I see spinning wheels in the left bar forever and this javascript
error shows up:

Uncaught (in promise) TypeError: Cannot read property 'hasProperty' of undefined
    at app.js:4069

image

June

The endless spinning wheel

image

May

Everything is fine

image

Shall I provide more infos?

1 - to develop bug

Most helpful comment

Any news about this issue ? We have been very nice users ;-) giving all the help we can (code fix, broken ics ...)
A fix for christmas would be such a nice thing to do ;-)

All 24 comments

It looks like this is triggered by some broken ics data. (although an error in one event is obviously not supposed to break the entire calendar)

vevent is absolutely not supposed to be undefined.

  • Can you check how many elements the vevents array has?
  • Can you evaluate context.comp.toString()?

Apparently this catch doesn't actually catch the type error and the promise remains rejected.
https://github.com/nextcloud/calendar/blob/master/js/app/models/calendarmodel.js#L83

Therefore Promise.all down here fails and then is never executed.
https://github.com/nextcloud/calendar/blob/master/js/app/models/calendarmodel.js#L91

I'll have a look at it.

I made a copy of my nextcloud instance a couple of days ago. This copy doesn't have the error.

I'll do this:

  1. Provide the info you requested
  2. Try to figure out what's different between the two instances. I expect just a couple of calendar events...

Best regards, Uli

Am 02.06.2017 um 17:13 schrieb Georg Ehrke:

Can you check how many elements the vevents array has?

I think it has one element: vevents:Array(1)

Can you evaluate context.comp.toString()?

How do I do this? I'm not a javascript expert, I have to admit...

Best regards, Uli

I think I know now which calendar invitation caused the error. I accepted it via thunderbird and thunderbird syncs this with nextcloud. Is it of any benefit if I'd provide the ICS file?

I imported the ICS file now directly into nextcloud and this works fine, no issue at all.
I guess I'll compare the records within oc_calendarobjects and oc_calendarobjects_props.
Seems like there is some issue related to thunderbird, isn't it?

Is it of any benefit if I'd provide the ICS file?

Yes, that would be great :)
the ics format is text-based, so you can just open it in a text editor and strip everything personal

ticket-495.zip

I attached a zip file. It contains these:

  1. The ICS file
  2. The content of some nextcloud tables when accepting the ICS within
    thunderbird ("ko")
  3. The content of some nextcloud tables when importing the ICS directly
    into nextcloud ("ok")

Hopefully, I stripped most of the personal information.

Thanks for your support!

@uli-heller You can't upload attachments to GitHub by attaching them to a mail, you have to use website ;)

If Github doesn't accept zip, just paste the raw text please

image

@georgehrke: I can see a link to the zip file and clicking on it downloads the file. What do you mean by "If Github doesn't accept zip, just paste the raw text please"? Can you access the file?

I received a warning message from github (... maybe, or I just checked the ticket on the web site) and attached the zip via the web site a couple of minutes after responding via mail. I'm hoping the content of the zip doesn't show up on google (... in case I missed some fields when doing the anonymization).

Ah, I didn't see that. Thanks.

I'm hoping the content of the zip doesn't show up on google (... in case I missed some fields when doing the anonymization).

Not sure about that, but i wasn't able to find anything private in there :)

Any news on this issue ? Already a month whithout my web calendar because of this ...

Having this same issue in August !

@rebeccaformfx Please don't comment when you can't add anything new. Use Github Reactions instead. :)

If this issue was fixed, this ticket would be closed.

OK... then perhaps I will try and add something new.
Having the same issue with a Google Calendar sync, and when I download the ics file from the More button on the Calendar app, the document has lots of "SUMMARY: Busy" entries.

Not sure if this is a Google issue of NextCloud.

Summary: Busy is probably caused the fact that it's in a shared calendar, right?

Same issue here (with Office365 ics file). Did work with 1.4.

I have the same problem. I had a quick look - vevent is undefined in some cases. A possible source is that I accepted changes to recurring events in Thunderbird in the month where it was not working.

To make the calendar visible again I used this quick fix:
replacing

                        if (!vevent.hasProperty('dtstart')) {
                        resolve([]);
                    }

with

                    if (!vevent || !vevent.hasProperty('dtstart')) {
                        resolve([]);
                        return;
                    }

I can reproduce the problem by creating a recurring task in Evolution, copying it and pasting it on another day.

Thank you so much for this fix !!!
In my case I needed an additional check to make it work:

                                        if (typeof vevent == 'undefined') {
                                                        resolve([]);
                                                        return;
                                                }
                                        if (!vevent || !vevent.hasProperty('dtstart')) {
                                                        resolve([]);
                                                        return;
                                                }

I like the nextcloud project very much but waiting for 5 months for a blocking issue to be fixed in a major app is very difficult to understand from my user point of view.

Thx for digging into this!

@rstrietzel @j0s Can one of u please provide a broken ics file that can be used to reproduce the bug? :) THX!

Just a minimal ics file (renamed to txt) that reproduces the issue (using the j0s method in evolution).
test-2017-11-12.ics.txt

Any news about this issue ? We have been very nice users ;-) giving all the help we can (code fix, broken ics ...)
A fix for christmas would be such a nice thing to do ;-)

I will close this as duplicate of #722, because it contains more technical details what the issue actually is and how we should address it.
When I opened #722 i wasn't aware that it's the same issue as this one.

And don't worry, #722 is assigned to the same milestone as this bug ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andre5tz picture andre5tz  Â·  3Comments

georgehrke picture georgehrke  Â·  3Comments

ad1rie1 picture ad1rie1  Â·  3Comments

gschenck picture gschenck  Â·  4Comments

mauritslamers picture mauritslamers  Â·  4Comments