cozy / cozy-calendar

An application to manage your events
https://demo.cozycloud.cc/#apps/calendar/
GNU Affero General Public License v3.0
66 stars 39 forks source link

Application crash on invalid rrule #543

Open clochix opened 8 years ago

clochix commented 8 years ago

Error in browser console:

app.js:796 Error: Unknown RRULE property ''
     at Function.RRule.parseString (https://cozy.TOTO.com/apps/calendar/javascripts/vendor.js:23241:23)
     at Event.module.exports.ScheduleItem.generateRecurrentInstancesBetween (https://cozy.TOTO.com/apps/calendar/javascripts/app.js:6269:21)
     at Event.module.exports.ScheduleItem.getRecurrentFCEventBetween (https://cozy.TOTO.com/apps/calendar/javascripts/app.js:6299:17)

This is the same error as in cozy/cozy-ical#40 so we should probably port the fix to the client-side rrule library. (we could also try to display an error but don't crash)

Here's the value of the wrong rrule:

"TZID=Europe/Paris:20151030T190000,20151127T190000,20151225T190000,20160401T190000,20160624T190000"
Arnros commented 8 years ago

I'm available to test the fix.

gregorylegarec commented 8 years ago

Hi @clochix and @Arnros, at which moment the application crashes? I am not able to reproduce (but I actuallly got an error in my console).

Arnros commented 8 years ago

Hi @gregorylegarec, I have this error in the browser console when I create a new event. (I have the latest version of APP and Cozy).

app.js:796 Error: Unknown RRULE property '' at Function.RRule.parseString (https://cozy.TOTO.com/apps/calendar/javascripts/vendor.js:23243:9) at Event.module.exports.ScheduleItem.generateRecurrentInstancesBetween (https://cozy.TOTO.com/apps/calendar/javascripts/app.js:6269:21) at Event.module.exports.ScheduleItem.getRecurrentFCEventBetween (https://cozy.TOTO.com/apps/calendar/javascripts/app.js:6299:17) at https://cozy.TOTO.com/apps/calendar/javascripts/app.js:793:66 at Array.forEach (native) at Function..each..forEach (https://cozy.TOTO.com/apps/calendar/javascripts/vendor.js:18728:11) at ScheduleItemsCollection.Collection.(anonymous function) as each at l. (https://cozy.TOTO.com/apps/calendar/javascripts/app.js:786:15) at o (https://cozy.TOTO.com/apps/calendar/javascripts/vendor.js:27539:8403) at r (https://cozy.TOTO.com/apps/calendar/javascripts/vendor.js:27539:8050)

clochix commented 8 years ago

Hi @gregorylegarec,

I think you can reproduce this issue by importing an .ics file containing "TZID=Europe/Paris:20151030T190000,20151127T190000,20151225T190000,20160401T190000,20160624T190000"

gregorylegarec commented 8 years ago

Thanks, I am able to reproduce the error by setting directly the rrule property in my CouchDB. My question was about the fact that the application crashes, i.e. you cannot do anything after the error. On my environment, I can still use the application after the error, so I am not sure to precisely reproduce the issue.

Arnros commented 8 years ago

Yes I can use the application after the error. I think you are in the same status.

gregorylegarec commented 8 years ago

Ok thanks :)

clochix commented 8 years ago

Hi @gregorylegarec,

What's the status of this one? Another user hit the same issue after importing events from Google (error report by email)

gregorylegarec commented 8 years ago

Hello,

Sorry for the late response. This issue is partially fixed. The fix implies to fix other issues to get the whole calendar to work. As we will need some time to fix all the issues, it has been delayed for now, but it is still high in calendar's priorities.

clochix commented 8 years ago

Another user is reporting that he's unable to go to the list view. Having a look at its logs, this error message show up every time he tries to open this view. Here's a temporary patch in order not to crash on invalid RRULE

gregorylegarec commented 8 years ago

Thanks @clochix, so in list view the app was actually crashing.

I still have a fix for this issue in one of my branches, but it leads to another painful issues which I have not solved yet.