Closed Bug 682474 Opened 13 years ago Closed 6 years ago

Lightning hides Thunderbird master password prompt + multiple password prompts

Categories

(Calendar :: General, defect)

Lightning 1.3
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
6.2.2.1

People

(Reporter: cgiraud, Assigned: Fallen)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.20) Gecko/20110803 Firefox/3.6.20 (.NET CLR 3.5.30729)
Build ID: 20110803131630

Steps to reproduce:

This bug had different forms from Thunderbird 3.1.10 / Lightning 1.0b2 Linux and WinXP to Thunderbird 6.0 / Lightning 1.0b5 Linux and Win7.
Multi-password prompt have been partially fixed https://bugzilla.mozilla.org/show_bug.cgi?id=349641 in normal usage condition, but password prompt is still hidden by main window, and multiple password prompts still occurs if master password haven't been entered quickly.

Steps to reproduce several aspects of the bug:
* TB 6.0 install (from .bzip under Linux Ubuntu 11.04 x86 32 bits)
* one e-mail imap account creation (or pop) with authentication + remember
* set master password
* Addon Lightning 1.0b5 install + 1st TB restart
* 2 network CalDAV calendar creation, with authentication + remember (in my case, the 2 calendars are on the same DAViCal LAN Server, and can be accessed with the same authentication, but this bug have been reported with different configurations)
* 2nd TB restart
* 3rd TB restart + long wait (> 10 minutes, default IMAP refresh, but can be set to 1 minute to speed up tests: Edit - Account Settings - Server Settings - Check for new message every 1 minutes)
* switch Calendars Off (right click on calendar + properties + uncheck "switch this calendar on", for each calendar) and 4th TB restart
* switch each calendars on + refresh every minute
* if modified set email check for new message back to 10 minutes
* 5th TB restart + long wait (2min 30sec)
* switch each calendar off
* set email check for new message to 1 minute
* 6th TB restart + long wait (2min 30sec)




Actual results:

Observed:
* 1st TB restart (1 imap + 0 calendar): main TB window displayed + 1 master password prompt on top of screen, only one TB windows in task bar  --> OK
* 2nd TB restart (1 imap + 2 network calendars): 1 master password prompt immediately hidden by main TB window, 2  TB windows in task bar --> inbox is not refreshed and calendars are empty --> need to click on task bar to bring master password prompt on top, then type it, then ok.
* 3rd TB restart (same as 2nd TB restart, but don't enter master password, just wait) --> 10 minutes later, a new master password prompt appears in front of main TB window (for IMAP refresh). Enter master password in this new window. Click on background master password window and enter twice.
* 2 calendar passwords are successively prompted, even if remember is asked.
* 4th TB restart (same as 1st TB restart) --> main TB window displayed + 1 master password prompt on top of screen --> OK
* 5th TB restart (same as 3rd TB restart, don't enter master password, just wait) --> 1min later, no new master prompt, wait 1min 30sec more, Click on background master password window and enter it. --> 4 successive calendar password prompts are asked to you, even if you check remember, and even if you have entered a correct master password.
* 6th TB restart (same as 1st restart: main TB window displayed + 1 master password prompt on top of screen, only one TB windows in task bar, ok but don't enter master password, just wait) --> 1 minute later, a 2nd Master password prompt rises (seems a pure Thunderbird bug), wait 2 more minutes, no other Master password prompt. --> enter master password in top window, cancel (or enter) the other master password window --> all finally ok.



Expected results:

Expected:
* no specific Master password prompt window in task bar, Master password prompt is always asked from main TB window what ever password firstly required by TB or Lightning.
* no other Master password prompt, even if master password is not entered quickly (< IMAP Refresh or < calendar refresh) in first prompt.
* no other calendar specific password prompt, even if master password is not entered quickly (<calendar Refresh) in first prompt.

This bug might be linked with https://bugzilla.mozilla.org/show_bug.cgi?id=612591

This bug also happens with only one network calendar, but please, consider testing any fix with 2 network calendars set to prevent any regression with multiple master password prompt in normal conditions!

Enjoy! :-]
For such a small, this one sure is annoying. Been having this problem for ages and now with TB 6.01 + Lightning 1.0b5
Can confirm the problem of multiple master password requests when starting thunderbird with lightning addon installed using thunderbird 7.0.1 on linux. 

My personal workaround is to use an addon (Startupmaster) that only asks once for the master  password but such a workaround should of course not be needed.  

Rainer
This affects me as well.   I have multiple calendars to load using lightening, and I'm prompted with the master password for each one, as well as one for the login to the IMAP server.  Canceling the input breaks the login.

I'm also using the Startupmaster addon as a workaround.

Versions:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Lightning/1.0b2 Thunderbird/3.1.15
@Calendar team: I am confirming this behavior in comm-central, please mark as "NEW" and triage (and update version).

With the current Thunderbird and Lightning nightlies for 64-bit Linux, I can reproduce all of the behavior described in comment 1, both with and without FIPS mode, except that the master password prompt always appears in front of the Thunderbird window.

Mozilla/5.0 (X11; Linux x86_64; rv:11.0a1) Gecko/20111126 Lightning/1.3a1 Thunderbird/11.0a1
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Lightning 1.0b5 → Lightning 1.3
Blocks: 612591
I've been seeing this for a long time now on linux with Gnome 3.  An additional aggravation is that frequently one of the password dialogs appears under the main thunderbird window.  (I think it might be getting displayed before the main window, so the window manager can't put it in the right place?)  Sometimes there are two separate master password dialogs and sometimes one appears as a regular framed window and the other appears attached to its title like other Gnome dialogs.

I've also encountered a sporadic problem where several password and reminder dialogs appear when thunderbird starts, and one of them is modal, but it's hidden under another dialog.  You can't type in any of the others or dismiss them until you figure out which one is modal and handle it.
And here we are at the summer of 2012, and STILL this 7 year old bug is alive!
StartupMaster is a solution, but a bloody stupid one!
If we can fix this with an AddOn, why not fix the problem instead?
Clearly there is some concensus to simply ignore this bug, but why??
I had this problem when using Lightning with Google Calendar. However, the problem was solved by NOT using the "Provider for Google Calendar" plugin. Instead, use Caldav as recommended by Google. (http://support.google.com/calendar/bin/answer.py?hl=en&answer=99358#sunbird)
Even StartupMaster isn't fixing the problem for me.  Fedora 17 / Thunderbird 13.0.1 / Lightning 1.5
I think I just fixed my problem.  The problem is that I'm subscribed to a bunch of caldav calendars using urls which include my username, e.g. https://noahf@foo.bar.com/caldav/... and even though I have a saved password entry for user noahf on https://foo.bar.com, lightning isn't using it without confirmation because the urls don't match.

I used the SavedPasswords editing extension to modify the site url to https://noahf@foo.bar.com and now everything's working perfectly.

So, why is the password manager stripping usernames out of the site url?  I realize it's partly redundant, but it produces a profoundly annoying result because I have to confirm every login.
Agreed with comment #7.

While one calendar was loading correctly bizarrely one was always disabled when I started thunderbird. Using caldav seemed to be quicker, removed the need for the google provider and actually worked ;-)
Note that original bug report was with CalDav protocol, TB + Lightning addon only, but a lot of calendars.
In my case, each additional MP request depends on one more calendar used through "Provider for Google Calendar" plugin.
I also reject the thought of using an extension for the most sensible part of my Thunderbird setup. That's just not an option.

But throwing away the Google Calendar provider and using CalDav instead solved the problem for me, too.

This is Thunderbird 17.0.5 with Lightning 1.9.1 under Win 7 64bit.
I seem to have this issue as well on both Linux(Fedora 64) and Windows 7(64).
(In reply to nemo from comment #13)
> But throwing away the Google Calendar provider and using CalDav instead
> solved the problem for me, too.
> 
> This is Thunderbird 17.0.5 with Lightning 1.9.1 under Win 7 64bit.

Same configuration on Linux, but using CalDAV for Google calendar *still* causes a second password popup :-(
Depends on: 643265
Same for me.
- Win7 64
- Thunderbird 24.2.0

I think the problem is also with Lightning and shared calenders e.g. google or exchange.
I used Exchange EWS Provider Plugin to provide the exchange function.

With Lightning, Google and exchange calender i got 5 logins :-(
I've can confirm that I've got the same problem here even with CalDav.
Ok if you remove the Google Provider for Google Agenda and use CalDAV urls like that:

https://www.google.com/calendar/dav/<calendarID@something.com>/events

It seams to work.
This is not completely right.
But it brings me to the right way.

I uninstalled also the Google Provider Addon and created a new calender like that:

https://apidata.googleusercontent.com/caldav/v2/<calid>/events
<calid> = Your calender id e.g. mycalendar@domain.de

After this everything works fine.

You can read about this at following site.
https://developers.google.com/google-apps/calendar/caldav/v2/guide

Another useful ressource but german only.
http://www.thunderbird-mail.de/forum/viewtopic.php?f=47&t=64106
http://www.thunderbird-mail.de/forum/viewtopic.php?f=47&t=63846
(In reply to Niels Tiedt from comment #21)

Thank you Niels so much, solved the issue for me right away!
(In reply to Niels Tiedt from comment #21)
> After this everything works fine.

Can confirm, thank you so f***ing much, this has bugged me for years (litterally)!
Attached patch Fix - v1 (obsolete) (deleted) — Splinter Review
Requires bug 1176399, but should fix this case.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #8813918 - Flags: review?(makemyday)
Depends on: 1176399
I guess this patch will change also when you pick up the r- patch from bug 1176399 - or is it good for review still?
It is still good to review, I just needed to change one line in bug 1176399. If you want to test there is a try run at

https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=28d2d61cb151fdbb400fad592fddca6c81a7dd58
Comment on attachment 8813918 [details] [diff] [review]
Fix - v1

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

Sorry it took some time to get to this review. Please check the var naming as mentioned below. r+ with that checked.

::: calendar/providers/caldav/calDavCalendar.js
@@ +1554,5 @@
>      //
>      // Helper functions
>      //
>  
> +    oauthConnect: function(authSuccess, authFailure, aRefresh=false) {

Can you append Cb to the first two arguments here?

@@ +1562,5 @@
> +                self.oauth.connect(() => {
> +                    authSuccess();
> +                    callback.onAuthResult(true);
> +                }, () => {
> +                    authFailed();

should that be authFailure resp. authFailureCb instead?

@@ +1568,5 @@
> +                }, true, aRefresh);
> +            },
> +
> +            onPromptAuthAvailable: authSuccess,
> +            onPromptCanceled: authFailed,

same here.
Attachment #8813918 - Flags: review?(makemyday) → review+
Attached patch Fix - v2 (deleted) — Splinter Review
Patch with nits fixed, thanks for catching those!
Attachment #8813918 - Attachment is obsolete: true
Attachment #8841219 - Flags: review+
What's happening here? This looks like it's ready for landing. What are we waiting for? Or does this depend on bug 1176399?
Flags: needinfo?(philipp)
Yes, waiting on bug 1176399
Flags: needinfo?(philipp)
bug 1176399 is now checkin-needed, so this one should be ready to go together with it.
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/5a9983b82898ad03268862080953083e0b626be0
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 5.7
Comment on attachment 8841219 [details] [diff] [review]
Fix - v2

Jörg, if you need a calendar uplift just go ahead and request it via the flags. Once it is approved (as is now), you can do the push at your convenience.
Attachment #8841219 - Flags: approval-calendar-beta+
Attachment #8841219 - Flags: approval-calendar-aurora+
Aurora (TB 54, Calendar 5.6):
https://hg.mozilla.org/releases/comm-aurora/rev/f3570179a3683f82ed9725ef81daaa88f5cd5454

Beta (TB 53, Calendar 5.5):
https://hg.mozilla.org/releases/comm-beta/rev/974a3d485ef9a61bcf6697fedc9ca9744ed56815

(In reply to Philipp Kewisch [:Fallen] from comment #33)
> Jörg, if you need a calendar uplift just go ahead and request it via the
> flags. Once it is approved (as is now), you can do the push at your
> convenience.
The developer or code manager requests the uplift, not the sheriff, which I am in this case since I'm not managing Calendar.
Target Milestone: 5.7 → 5.5
Depends on: 1359967
Attachment #8841219 - Flags: approval-calendar-esr?(philipp)
Attachment #8841219 - Flags: approval-calendar-esr?(philipp) → approval-calendar-esr+
TB 52 ESR, Calendar 5.4.x:
https://hg.mozilla.org/releases/comm-esr52/rev/819e836ed566
Target Milestone: 5.5 → 5.4.2
Beta (TB 55, Calendar 5.7) backout:
https://hg.mozilla.org/releases/comm-beta/rev/f10d21100843eb0430a0f5ee4cd6f715cc037b21
Target Milestone: 5.5 → 5.8
Backout from trunk:
https://hg.mozilla.org/comm-central/rev/be85d704dbcc2b9c3040835fba6798bd0cf3a9cb

Sorry, I had to back this out since the next merge date is coming and I can't continue to back it out from all the betas we ship.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 5.8 → ---
Geoff, can you please rebase the patch, if necessary, and merge with bug 1359967 so it can be relanded.
Flags: needinfo?(geoff)
This had the same flaw as I found in the master password bug, so I've fixed it here too.
Flags: needinfo?(geoff)
Attachment #9002367 - Flags: review?(makemyday)
Comment on attachment 9002367 [details] [diff] [review]
682474-master-password-lightning-1.diff

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

Codewise this looks good, but I would like you to smoke test this with the provider before landing to avoid another backout if something is still failing.

For the record, comment 41 is referring to bug 1176399.
Attachment #9002367 - Flags: review?(makemyday) → review+
Comment on attachment 9002367 [details] [diff] [review]
682474-master-password-lightning-1.diff

You want to ship this together with bug 1176399 which is already uplifted to TB 60 beta 11, TB 60.1 ESR? Then is needs approval/uplift quickly.

Note that the patch already got included in TB 52. Now Geoff only fixed an issue detected in bug 1176399. Only that bug had caused the Gmail re-download. So in summary: It shouldn't be too risky ;-)
Attachment #9002367 - Flags: approval-calendar-esr?(philipp)
Attachment #9002367 - Flags: approval-calendar-beta?(philipp)
Everything looks good here.
ok, then let's take it. Philipp, do you take care of the approvals?
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/c14d141e43e6
Lightning hides Thunderbird master password prompt + multiple password prompts. r=MakeMyDay DONTBUILD
Status: REOPENED → RESOLVED
Closed: 7 years ago6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.5
Attachment #9002367 - Flags: approval-calendar-esr?(philipp)
Attachment #9002367 - Flags: approval-calendar-esr+
Attachment #9002367 - Flags: approval-calendar-beta?(philipp)
Attachment #9002367 - Flags: approval-calendar-beta+
Geoff, can you please provide a comm-esr60 patch, this one doesn't apply. Also incorporate the linting fix I'm about to land.
Flags: needinfo?(geoff)
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/fb37006d3c59
Follow-up: Fix linting indentation problem. rs=white-space-only
It does apply. My machine didn't complain, anyway.
Flags: needinfo?(geoff)
Sorry, tried to apply the old patch :-(
Target Milestone: 6.2 → 6.2.1
Target Milestone: 6.2.1 → 6.2.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: