cozy-calendar icon indicating copy to clipboard operation
cozy-calendar copied to clipboard

Application crash on invalid rrule

Open clochix opened this issue 8 years ago • 11 comments

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"

clochix avatar Jun 06 '16 13:06 clochix

I'm available to test the fix.

Arnros avatar Jun 06 '16 13:06 Arnros

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).

gregorylegarec avatar Jun 23 '16 16:06 gregorylegarec

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)

Arnros avatar Jun 23 '16 16:06 Arnros

Hi @gregorylegarec,

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

clochix avatar Jun 24 '16 08:06 clochix

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.

gregorylegarec avatar Jun 27 '16 14:06 gregorylegarec

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

Arnros avatar Jun 27 '16 14:06 Arnros

Ok thanks :)

gregorylegarec avatar Jun 27 '16 14:06 gregorylegarec

Hi @gregorylegarec,

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

clochix avatar Jul 27 '16 10:07 clochix

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.

gregorylegarec avatar Aug 02 '16 16:08 gregorylegarec

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

clochix avatar Oct 17 '16 09:10 clochix

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.

gregorylegarec avatar Oct 19 '16 08:10 gregorylegarec