Closed Bug 1344068 Opened 7 years ago Closed 7 years ago

alarmLastAck is not taken from parent item in alarm service


(Calendar :: Alarms, defect, P1)



(Not tracked)



(Reporter: Fallen, Assigned: Fallen)


(Blocks 1 open bug)



(1 file, 1 obsolete file)

Today was the day where I got so annoyed by not being able to dismiss alarms that spent time debugging it.

I have an alarm where the master item has an X-MOZ-LASTACK value, correctly set from the server. When the alarm service expands this event into occurrences, some of the occurrences have an alarmLastAck value, while others don't.

While the alarm service checks occurrence alarmLastAck and then falls back to the parent item, dismissing alarms always sets the parent alarmLastAck.

I think we should make the alarm service only take parent item alarmLastAck into account, ignoring anything that is set on occurrences. In addition, it might make sense to have the alarmLastAck getter/setter also always return/modify the parent item's alarmLastAck. If caller really wants the occurrence value it can be done via getProperty(), but since we consider the parent item value to be the authoritative one this should be the right thing.

The patch for that is almost ready, I'd like to add a test and figure out why my occurrences have differing alarmLastAck values set.

This bug should fix various "can't dismiss alarm on meeting/recurring event/etc" type bugs and even if late it might make sense to push for this for TB52.
Priority: -- → P1
Attached patch Fix - v1 (obsolete) β€” β€” Splinter Review
Attachment #8863161 - Flags: review?(Mozilla)
Philipp, remember to change the titles of the events, otherwise there will be misunderstanding with the next test ("addTestItems Test 6") which is involved in failures of bug 1244818 and part of Bug 1315520. :)
Attached patch Fix - v2 β€” β€” Splinter Review
Thanks for the hint, you are right :) Do you want to continue the review while you are at it? Let me know if you are short on time.
Attachment #8863161 - Attachment is obsolete: true
Attachment #8863161 - Flags: review?(Mozilla)
Attachment #8863249 - Flags: review?(bv1578)
Thanks for looking at this once more.  It was a problem some time ago, then it was resolved.  Now it's come up again. Very annoying!  I have to minimize the notifications window.

Oddly, I have tbird at home, same set-up, but with gContactSync as well, and it's not having the problem.

For giggles, I installed it at work, but it didn't have any effect.
Any word on when there might be a patch or workaround for this?  I now have the same 2 repeating events listed 6 times each, and I can not dismiss the alert box.  Now, I just minimize it.  The problem is that my REAL notifications are not seen because I keep the box minimized, and don't pay attention to the alert sounds any more because of the 12 stale notifications.

If this were my home machine, it'd be no big deal.  But working fine at home, but my work computer is exhibiting the behavior.

I donated my $10 because I can't live without Google Calendars in Thunderbird, but losing the notifications is a major problem!

Please advise!
Flags: needinfo?(philipp)
There is a patch on this bug waiting for review.
Flags: needinfo?(philipp)
(In reply to Philipp Kewisch [:Fallen] from comment #9)
> There is a patch on this bug waiting for review.

I'm sorry - when it comes to application development, I'm pretty much an end user.  By "needs review" do you mean it needs to be tested?  I'll be happy to apply it, and give feedback.  But my programming skills are pretty much limited to scripting and databases.

Can I help?
Flags: needinfo?(philipp)
"needs review" means code review. You are welcome to test the patch and provide feedback. Applying it may not be straightforward, if you need help and the internet does not provide a solution please stop by on #maildev.
Flags: needinfo?(philipp)
I have the same problem. I would be glad to test the patch.

Where could I find it?

I am having this trouble with TB 52.1.1 (64) on a Linux install (kubuntu 16.04).
Seriously, it is on this bug! I'm glad to hear everyone is willing to test this patch, but I can't provide help in applying or finding the patch.
Comment on attachment 8863249 [details] [diff] [review]
Fix - v2

Sorry for the delay Philipp.

For the cases that I can reproduce, the patch works fine and the test too, verified locally.
I haven't found a failure or a way to reproduce that is not fixed, but alarmLastAck is also set in many other places, is it possible that we need to do the same somewhere else (I mean to consider the parent item instead of the item)?
Attachment #8863249 - Flags: review?(bv1578) → review+
Attachment #8863249 - Flags: approval-calendar-esr?(philipp)
Attachment #8863249 - Flags: approval-calendar-beta?(philipp)
Thanks for testing! I considered also doing this in other places (mainly calItemBase), but given at the item level they are still separate properties it should be fine. I saw some code in calendar-dialog-utils that may be worth changing, but lets go with what we have for now.
Keywords: checkin-needed
Attachment #8863249 - Flags: approval-calendar-esr?(philipp)
Attachment #8863249 - Flags: approval-calendar-esr+
Attachment #8863249 - Flags: approval-calendar-beta?(philipp)
Attachment #8863249 - Flags: approval-calendar-beta+
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 5.7
Beta (TB 54, Calendar 5.6):

Patch didn't quite apply, compare the surrounding lines of the last hunk, they are very different.
Target Milestone: 5.7 → 5.6
Sorry to be a pest, but this bug is driving me nuts.  It looks like the patch failed 2 weeks ago, and no update from Philipp.  All I know is that I'm running 5.4 of Lightning, and 3.3 of provider.  Does Jorg's note mean that there is no chance of seeing this problem go away until Lightning 5.6 comes out?  Where can I get a timeline for that?

Thanks all, I really appreciate the work that goes into this, and I realize most of the people who work on it do so pro bono.  I just want to use the product like I have been for years.


- J.
Flags: needinfo?(philipp)
This will be shipped in TB 52.3 in a few weeks. The current TB 54 beta should be compatible with Lightning 5.6 which you can get from here: Note that TB 54 beta contains Lightning 5.6 with the bug *not* fixed, hence the link.
Thanks for the links!  I downloaded TB 54.0b3 and, as Jorg said, the version of Lightning was not any better.  The Lightning 5.6a2 xpi will NOT install on 54.0b3.  I modified the max version in the app.ini and install.rdf files to 56.0 and it installed.  

(For those reading in posterity, if you download the add-on, change the .xpi to .zip, it becomes a normal zip file.  You can extract it, modify the files you want, then drag the modified files back into the zip file, and change it back to .xpi.)

Anyway, TB 54.0b3, Lightning 5.6a2, and Provider 3.5a2 are now loaded.  I'm running on Windows 10 Pro.

I have 2 Google accounts attached, and they both wanted me to reauth, but the NEXT button was unresponsive.  My email was in the field, but I couldn't put in my password.  I dismissed the auth windows, and I was able to proceed, and my calendars were visible.  However, the repeating event reminders are still there!  Clicking Dismiss All does nothing.  I tried quitting out of TB completely, and getting back in, hoping it would have me try to auth again, but I'm getting the same result.

I had a few other add-ons loaded.  I disabled them and restarted again - no joy.

What else can I do?

Flags: needinfo?(jorgk)
Out of desperation, I tried deleting the add-ons completely, and re-installing them.  No help - still stuck on authentication.

Next, I deleted all my calendar subscriptions, and tried to re-add the Google calendar.  Again, I got stuck, not being able to hit next, to type my password.

Here is the Error Console Output:

Use of Mutation Events is deprecated. Use MutationObserver instead.  calendar-widgets.xml:507:18
SyntaxError: delete is an invalid identifier  imcontact.xml:160:9
TypeError: is not a function[Learn More]  imgroup.xml:78:9
401 - {"errors":[{"code":32,"message":"Could not authenticate you."}]}  twitter.js:725
[calGoogleSession] Authentication failure: undefined  gdataSession.jsm:268:21
[Exception... "null"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gdata-provider/modules/gdataSession.jsm :: login/authFailed< :: line 270"  data: no]  (unknown)
	login/authFailed< resource://gdata-provider/modules/gdataSession.jsm:270:33
	bound  self-hosted:911:17
	login/connect</onPromptStartAsync/< resource://gdata-provider/modules/gdataSession.jsm:282:29
	onAuthorizationFailed resource://gdata-provider/modules/OAuth2.jsm:202:9
	cancelled resource://gdata-provider/modules/OAuth2.jsm:109:17
	reportUserClosed chrome://gdata-provider/content/browserRequest.js:93:3
	onclose chrome://gdata-provider/content/browserRequest.xul:1:1
	openCalendarWizard chrome://calendar/content/calUtils.js:361:5
	doCommand chrome://calendar/content/calendar-common-sets.js:358:17
	goDoCommand chrome://global/content/globalOverlay.js:93:7
	oncommand chrome://messenger/content/messenger.xul:1:1

Hope that helps!
Oh - and now I have NO calendars!  Argh!  I'll hope to see an update here when I get in tomorrow.  Otherwise, I'll uninstall, and reinstall the release versions of everything.

Thanks again...

- J.
One unrelated remark: If you use 7Zip, you can open the .xpi file directly and replace files.

Other than that, looks like you got yourself into a nice version knot. The next button not working is bug 1359297, and that should be fixed in TB 54 beta. Oh, for for the Gdata add-on that was bug 1359383. But the version suggested in comment #19 may not have those fixes.

For the time being, please go back to TB 52.2.1 and wait for the fix here in TB 52.3.

Or, since you want through so much trouble already, try an unofficial TB 55 beta build from here:
Flags: needinfo?(philipp)
Flags: needinfo?(jorgk)
Oh cool - I didn't realize 7zip could do that!

I rolled back to TB 52.2.1, Lightning 5.4, and Provider 3.3, and and most of the events that were getting stuck are gone.  But, there is one repeating event that does keep coming up.  :(

I will continue to wait, I guess.  Too many bugs for me in betaland.

Thanks for all your help, Jorg!
Jorg, can you please land this on esr as the approval states?
Flags: needinfo?(jorgk)
Sure, in due course. It comes up in my query and it will get uplifted when I next uplift patches for TB 52.3 around the beginning of August. Or is there any reason to do it earlier?
Flags: needinfo?(jorgk)
Jay, TB 55 beta 2 has been released now. It comes bundled with a version of Lightning with this bug fixed.
Just tried this with v56.0b2.  Problem still exists, cannot dismiss backdated CalDAV entries, either individually OR as "dismiss all"
i tried this with TB v56.0b2 and v57.0a1 and the problem still exists. We have more than 10.000 workstations with TB. We work with Thunderbird - Horde Groupware (Kronolith). Cannot dismiss any CalDAV reminders.
Flags: needinfo?(philipp)
When a calendar alarm is triggered, you cannot dismiss/snooze the  
alarm for an event/task. In the lightning/Thunderbird  reminder  window, the dismiss buttons have no effect, and the same events, which are now past, are reminded every time.

Steps to Reproduce:
1. Create an event/task with an alarm
3. Wait for the alarm to be triggered
4. Try to dismiss or snooze the item that triggered the alarm

TB v56.0b2 | TB v57.0a1
Server Side: Horde Groupware 5.2.22 + Kronolith.

Many thanks
Please file a new issue referencing this one if you have further issues, as it has already been closed with a patch. Please also include logging from the error console.
Flags: needinfo?(philipp)
There are so many bugs attached to this problem, I don't even know where it should be posted.

Just tried re-activating Lightning in Thunderbird again, and it still fails on this defect.  Thunderbird 60.2.1, Lightning  If I have Lightning enabled, it pops up ALL reminders from the past month or two.  "Dismiss" will (often) close the dialogue, but then next time I start TBird the very same reminders come back up again.  The only solution is to disable Lightning completely, and have my calendar up in Google Chrome (which I despise).
(In reply to James E. LaBarre from comment #34)

> The only solution is to disable Lightning completely,
> and have my calendar up in Google Chrome (which I despise).

What I've noticed is that it only happens on events that are reoccuring and that have notifications. What you can do is log into Google Calendar and disable notifications on the events in the Thunderbird list and it will stop notifying you. Keep in mind you should only have to do this for Events that reoccur.
>If I have Lightning enabled, it pops up ALL reminders from the past month or two.  "Dismiss" will (often) close the dialogue, but then next time I start TBird the very same reminders come back up again.

Unchecking Preferences->Calendar->Reminders->Show missed reminders for writable calendars

might resolve that.
You need to log in before you can comment on or make changes to this bug.