Open Bug 1551085 Opened 6 years ago Updated 3 years ago

JavaScript Error: "right-hand side of 'in' should be an object, got null" in ical.js

Categories

(Calendar :: ICAL.js Integration, defect)

Lightning 68
defect

Tracking

(Not tracked)

People

(Reporter: ssitter, Unassigned)

Details

Attachments

(1 file)

Thunderbird 68.0a1 (Build ID 20190511222002) with Lightning 7.0a1

History:
I created an repeating event. Than I opened the event and when prompted I choose to edit only the single occurrence. Without further modifications I pressed the X icon to close the edit event dialog. I got prompted if I want to save or don't save the event.

Error:
I changed nothing. Should there be a prompt to save?
And in the background multiple errors were logged into Console:

Lightning: failed to set LOCATION to null: [Exception... "[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]'[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]' when calling method: [calIIcalProperty::value]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource://calendar/calendar-js/calEvent.js :: get icalComponent :: line 105" data: yes]
calEvent.js:125

Lightning: failed to set DURATION to null: [Exception... "[JavaScript Error: "invalid duration value: Not enough duration components in "null"" {file: "resource://calendar/modules/ical.js" line: 4116}]'[JavaScript Error: "invalid duration value: Not enough duration components in "null"" {file: "resource://calendar/modules/ical.js" line: 4116}]' when calling method: [calIIcalProperty::value]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource://calendar/calendar-js/calEvent.js :: get icalComponent :: line 105" data: yes]
calEvent.js:125

Lightning: failed to set DESCRIPTION to null: [Exception... "[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]'[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]' when calling method: [calIIcalProperty::value]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource://calendar/calendar-js/calEvent.js :: get icalComponent :: line 105" data: yes]
calEvent.js:125

Lightning: failed to set CLASS to null: [Exception... "[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]'[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]' when calling method: [calIIcalProperty::value]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource://calendar/calendar-js/calEvent.js :: get icalComponent :: line 105" data: yes]
calEvent.js:125

Lightning: failed to set DESCRIPTION to null: [Exception... "[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]'[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]' when calling method: [calIIcalProperty::value]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource://calendar/calendar-js/calEvent.js :: get icalComponent :: line 105" data: yes]
calEvent.js:125

TypeError: right-hand side of 'in' should be an object, got null ical.js:3139:11

Error: invalid duration value: Not enough duration components in "null" ical.js:4116:13

TypeError: right-hand side of 'in' should be an object, got null 3 ical.js:3139:11

There are hundreds of these in Mozmill logs (and I was about to file a duplicate):
[task 2019-08-03T12:21:20.715Z] 12:21:20 INFO - failed to set CLASS to null: [Exception... "[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]'[JavaScript Error: "right-hand side of 'in' should be an object, got null" {file: "resource://calendar/modules/ical.js" line: 3139}]' when calling method: [calIIcalProperty::value]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource://calendar/calendar-js/calEvent.js :: get icalComponent :: line 105" data: yes]

https://taskcluster-artifacts.net/YX3o_cLoQJ2jHLB3fuil_Q/0/public/logs/live_backing.log

Maybe time to fix that although this is ical.js which is not used in production.

Flags: needinfo?(geoff)

I think the prompt to save and the error message are unrelated. The error message is reporting a caught exception. I get the same prompt using libical.

Flags: needinfo?(geoff)

I'm not sure how an event ends up with null properties. But let's just ignore them. I guess the setValue function in ICAL.js should be able to respond to a null value somehow too, but I don't know what the correct response is.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9083220 - Flags: review?(philipp)
Comment on attachment 9083220 [details] [diff] [review] 1551085-ical-properties-1.diff Review of attachment 9083220 [details] [diff] [review]: ----------------------------------------------------------------- I think it would be vital to find out why there are null values and how they got there, this is likely an underlying problem in ical.js. If we do want to fix it in this way, I think we'll need some more tests to cover it. I'm concerned that we'd be removing property values from remote ICS data and then removing the whole property when saving. Also possible this would regress the ask-to-close function in the event dialog if there are such properties.
Attachment #9083220 - Flags: review?(philipp) → review-
Assignee: geoff → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: