nextOcc bug: Events don't load due to js error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Exchange Data Provider for Lightning |
Confirmed
|
High
|
Unassigned |
Bug Description
I just installed this addon, as webdav support for my exchange server was terminated, and I have been having problems getting the events to come up. The error I get is due to the following line (369) in soapin.js
aItem.
nextRem.
I get the error that nextOcc is null.
I had originally supposed this was due to some older items which had not been correctly dismissed or something like that, but I have now completely removed old items and still no luck.
Essentially, no calendar entries show up and ones I add in the thunderbird do not show up either. If I comment out this particular line of code everything works fine.
--
Windows 7 x64
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2
Changed in lightning-exchange-provider: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → 0.11 |
Changed in lightning-exchange-provider: | |
milestone: | 0.11 → 0.12 |
summary: |
- Events don't load due to js error + nextOcc bug: Events don't load due to js error |
Hi,
Think this is calendar content dependent. It doesn't happen if it's "Day" view and you press the "today" - but in all other views in my calendar it happens.
Looked at the code around the offending line in soapin.js bit closer -
The nextOccurrence is calculated from the previousOccurrence if there's a difference. There are cases when there's no PrevisousOccurrence available thus the code is ending up w/ a nextOcc==null.
Could it be that the nextOccAlarm. compare call does only return "0" or "1" - and not "-1" or "0" or "1" ??
At least there isn't a check if a previous occurrence does exist at all.
Adding a "if (nextOcc === null) { }" the call to aItem.setproperty avoids the error and make things work better.
Not sure if that's really the root cause here, but maybe a point to start looking further into it.
--------- code from soapin.js - readDismissSnoo zeState proc-----------
let alarmDiff = nextOccAlarm. compare( nextRem) ; "readDismissSno ozeState: alarmDiff>0\n"); eInfo.getPrevio usOccurrence( nextRem) ;
if (alarmDiff > 0) {
sdbg(
/*
* The alarm of the next item will happen after
* the remider time. This means we did snooze
* a previous alarm.
*/
nextOcc = aItem.recurrenc
}
if (nextOcc === null) { "readDismissSno ozeState: dkipping Set X-MOZ-SNOOZE- TIME\n" ); setProperty( 'X-MOZ- SNOOZE- TIME-' + nextOcc. recurrenceId. nativeTime, nextRem. icalString) ;
// would lead to an error otherwise
sdbg(
return
} else {
aItem.
}