The default bug view has changed. See this FAQ.

Storage calendar events are not shown in views due to a corrupted event organizer

RESOLVED FIXED in 1.5

Status

Calendar
Provider: Local Storage
--
blocker
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mmecca, Assigned: mmecca)

Tracking

Lightning 1.4

Details

(Whiteboard: [wanted-1.2.x])

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

5 years ago
In Lightning 1.4, sometimes events from a storage calendar are not being displayed in the views, with one of the following errors logged in the error console:

Error: org.id is null
Source File: resource://calendar/modules/calProviderUtils.jsm
Line: 857

or

Error: uncaught exception: [Exception... "'[JavaScript Error: "org.id is null" {file: "resource://calendar/modules/calProviderUtils.jsm" line: 857}]' when calling method: [calISchedulingSupport::isInvitation]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://calendar/content/calendar-view-core.xml :: setCSSClasses :: line 258" data: yes]

I beleive this is a due to the same regression reported in Bug 723610 and Bug 735619, in this case an item with an organizer was moved via the event dialog to a storage calendar without an email identity configured, resulting in an item with a corrupted organizer with a null id. From my testing it appears that the fix for Bug 735619 also fixed the root cause for this issue, but corrupted storage calendar items created in Lightning 1.2 and 1.3 may continue to prevent the views from displaying other storage calendar events properly.

I was able to reproduce the error on trunk with the following STR:
1) Backout the fix for Bug 735619
2) Create an item with an organizer on a non-storage calendar, in my test I used an event on a GData provider calendar
3) Set the email identity on a storage calendar to "None"
4) Open the event created in Step 2, change the calendar property to the storage calendar, Save and Close
5) Restart Thunderbird
6) Set the email identity on the storage calendar to an email address
6) Change the view date range to contain the event created in step 2. Disable and Enable the storage calendar. Change the view date range to another period and back.

Results:
The first error appears several times, no events from the storage calendar are shown in the view until Thunderbird is restarted. Skipping the step of disabling and enabling the calendar will sometimes cause some or all events to not be shown, and sometimes cause duplicate entries to be shown in the views.

The affected item has an associated row in the cal_attendees table with is_organizer set to true but attendee_id and common_name set to null.

Setting severity as critical as this can make a storage calendar mostly unusable for affected users. The default value for the email identity on a new calendar is usually the default email account, I do not believe that users with a valid email identity configured should have been affected.
(Assignee)

Updated

5 years ago
Assignee: nobody → matthew.mecca
Status: NEW → ASSIGNED
(Assignee)

Comment 1

5 years ago
Created attachment 623460 [details] [diff] [review]
Fix v1

Skips corrupted attendees with a null id when reading items from storage, and also makes the isInvitation function more tolerant of the condition in case any other providers were affected.
Attachment #623460 - Flags: review?(mohit.kanwal)
Comment on attachment 623460 [details] [diff] [review]
Fix v1

Review of attachment 623460 [details] [diff] [review]:
-----------------------------------------------------------------

Looks okay to me. Will report once I can get the STR right. Setting + in the meanwhile.
Attachment #623460 - Flags: review?(mohit.kanwal) → review+
Severity: critical → blocker
Whiteboard: [wanted-1.2.x]
Okay I am trying to reproduce the error using the STR described above. Where do I change the calendar property of the event created ? That is step number 4. Pardon me, to sound like a n00b but I don't know the lightning components in that much detail still learning :)
(Assignee)

Comment 4

5 years ago
(In reply to Mohit Kanwal [:redDragon] from comment #3)
> Where do I change the calendar property of the event created ?

Sorry, I should have clarified: open the event in the Edit Event dialog, and change the event's calendar using the Calendar dropdown, then Save and Close to move the event to the storage calendar.
Hi Matt,

I tested the patch with Lightning 1.2 and 1.3 and was able to reproduce the STR and managed to get the item to disappear from the view. After applying the patch, the item comes back to the view. However there is one additional issue, after updating lightning with the patch (Maybe I am doing this wrong, I am using xpi to add/remove add-ons while not touching the profile folder at all) . I get this error message, and I can no longer add events to my Google Calendar. 

Error: [Exception... "'TypeError: aItem.getProperty is not a function' when calling method: [calIOperationListener::onOperationComplete]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "JS frame :: resource://calendar/modules/calProviderUtils.jsm :: cPB_notifyOperationComplete :: line 694"  data: no]


It is possible that my method (using XPIs to install/remove add ons might have caused this, i am not sure about it maybe you can shed some light. 
Also I shall update the patch to apply cleanly on the current trunk vers 
 ion.
Created attachment 626298 [details] [diff] [review]
Clean Patch to apply on trunk
(Assignee)

Comment 7

5 years ago
(In reply to Mohit Kanwal [:redDragon] from comment #5)
> issue, after updating lightning with the patch (Maybe I am doing this wrong,
> I am using xpi to add/remove add-ons while not touching the profile folder
> at all) . I get this error message, and I can no longer add events to my
> Google Calendar. 

Did you do this test with a build from comm-central? If so could you try it with the patch for Bug 757332 applied? Also, did you update the Google Calendar Provider xpi as well as Lightning?
Yup i built it from comm-central updated about the same time i submitted the previous comment. Updated Google Calendar xpi as well as Lightning. I think I will try with the fix for bug 757332 applied. It is possible it may be broken coz of that, but so far works as expected for the purpose of this bug, ignoring the null value of the attendee_id column and displaying it correctly in the view which was missing with lightning 1.3.
After applying the fix for bug 757332 and rebuilding I can write events to my Google Calendar again.

Comment 10

5 years ago
Comment on attachment 626298 [details] [diff] [review]
Clean Patch to apply on trunk

This patch looks broken because it contains multiple but different diffs for the same file.

Comment 11

5 years ago
Comment on attachment 623460 [details] [diff] [review]
Fix v1

Problem was reported from 1.4 therefore it should be considered for the upcoming 1.5 release too.
Attachment #623460 - Flags: approval-calendar-beta?
Attachment #623460 - Flags: approval-calendar-aurora?
Created attachment 626815 [details] [diff] [review]
Clean Patch to apply on trunk

Ok corrected, I think this should be the version.
Attachment #626298 - Attachment is obsolete: true
(Assignee)

Comment 13

5 years ago
Pushed to comm-central - http://hg.mozilla.org/comm-central/rev/80217824a340
Comment on attachment 623460 [details] [diff] [review]
Fix v1

Yes, go ahead.
Attachment #623460 - Flags: approval-calendar-beta?
Attachment #623460 - Flags: approval-calendar-beta+
Attachment #623460 - Flags: approval-calendar-aurora?
Attachment #623460 - Flags: approval-calendar-aurora+
(Assignee)

Comment 15

5 years ago
Pushed to comm-aurora - http://hg.mozilla.org/releases/comm-aurora/rev/29c9c656e43c
(Assignee)

Comment 16

5 years ago
Pushed to comm-beta - http://hg.mozilla.org/releases/comm-beta/rev/b1271b77793a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5
You need to log in before you can comment on or make changes to this bug.