Closed Bug 474552 Opened 15 years ago Closed 15 years ago

Error: Assert failed: TypeError: logins[0].clone is not a function

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: Fallen)

Details

(Whiteboard: [needed beta][no l10n impact])

Attachments

(1 file)

Seen with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090120 Lightning/1.0pre Shredder/3.0b2pre (lightning/gdata provider of the same day):

Error: Assert failed: TypeError: logins[0].clone is not a function
2: [file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calAuthUtils.jsm:140] calPasswordManagerSave
3: [file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Ba62ef8ec-5fdc-40c2-873c-223b8a6925cc%7D/js/calGoogleUtils.js:195] passwordManagerSave
4: [file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Ba62ef8ec-5fdc-40c2-873c-223b8a6925cc%7D/js/calGoogleSession.js:437] cGS_onResult
5: [file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Ba62ef8ec-5fdc-40c2-873c-223b8a6925cc%7D/js/calGoogleRequest.js:246] cGR_fail
6: [file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Ba62ef8ec-5fdc-40c2-873c-223b8a6925cc%7D/js/calGoogleRequest.js:258] cGR_succeed
7: [file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Ba62ef8ec-5fdc-40c2-873c-223b8a6925cc%7D/js/calGoogleRequest.js:371] cGR_onStreamComplete

Source File: file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///Users/mark/Library/Thunderbird/Profiles/9uumlyqg.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calUtils.js
Line: 968

nsILoginInfo doesn't have a clone function. I'm also not sure why it is trying to re-save the password as it hasn't prompted me for one because its already saved in password manager.
Seen on Linux x86 as well:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16pre) Gecko/20080617 Lightning/0.9pre Thunderbird/2.0.0.16pre Mnenhy/0.7.5.666 (lightning/gdata provider of the same day)
Missed the ID, sorry.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16pre) Gecko/20080617 Lightning/0.9pre Thunderbird/2.0.0.16pre Mnenhy/0.7.5.666 ID:20090121030908

The error looks exactly the same on this built...
OS: Mac OS X → All
Attached patch Fix - v1 β€” β€” Splinter Review
Something is borked with my builds, they are now hanging at startup when asking for the Google Calendar password, but only until I repeatedly click on the hanging dialog until it shows up, then I can click cancel.

The log is not showing it being called more than once.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #359234 - Flags: review?(bugzilla)
Comment on attachment 359234 [details] [diff] [review]
Fix - v1

You've looked a lot into login manager, maybe you know a solution:

While saving the password with this patch works fine, if you have a gdata calendar, have not previously saved the password, then start the application, the UI thread is totally blocked and its very hard to enter a password at all.

I don't know how to fix or debug this any more than I have already.
The following messages happen in a debug build that do not happen when starting with password previously saved:

WARNING: An event was posted to a thread that will never run it (rejected): file /home/kewisch/mozilla/comm-central/mozilla/xpcom/threads/nsThread.cpp, line 359
WARNING: leaking reference to nsTimerImpl: file /home/kewisch/mozilla/comm-central/mozilla/xpcom/threads/nsTimerImpl.cpp, line 486
Note also: The almost-freeze happens on linux, but not on mac. This might be a core issue :-/
Is the regression range known? Is it possible to use older builds of Lightning/GData Provider to access ones calendars?
Does this bug also affect Google CalDAV calendars? Here's a summary of the problem:

Trunk Shredder + trunk Lightning have messed up my Google CalDAV calendars. Some calendars don't show the events. Also, I can no longer add events to the Google CalDAV calendars. I've tried deleting and re-creating some of the calendars in Lightning but that didn't fix it.

On start-up of Thunderbird, I get about 10 dialogs all asking for the master password.

NB: I *am* able to see and add-to all CalDav calendars at another PC with the released versions of Thunderbird 2.0.0.19 and Lightning 0.9.
Flags: wanted-calendar1.0?
Flags: blocking-calendar1.0?
This should affect google via provider and wcap. This is no real regression, since the bug has been in the code since it was created. We just never used the login manager before.
Flags: wanted-calendar1.0?
Flags: blocking-calendar1.0?
Flags: blocking-calendar1.0+
I think I know what caused my issue: I have 7 CalDAV calendars, each one, when it was created in Lightning, asked for a password. I must have entered a different password one of those times (typo?). Looking in the password manager revealed that I had two Google calDAV URLs and two identical usernames, but two different passwords. Once I deleted the incorrect password, the problems disappeared (full access to all my calendars, no more multiple master password prompts). :-)

This was a serious problem because users can and will enter a wrong password, and there needs to be either a warning, or a *discoverable* way to identify the cause. I hope this bug will also address this issue.
Whiteboard: [needs review]
Philipp, can you share a bit about what functionality is actually broken by this assertion?

Is this responsible for missing events in a Google Calendar, or is that rather unrelated? (I also have many errors "Error parsing XML streamReferenceError: getTimezoneService is not defined" without a link to a source.)
Nothing is really "broken", but the application hangs for a while, making it nearly impossible to enter user/password unless you are really patient and can do some guessing on where the cursor is.

I think the getTimezoneService() error was fixed in a different bug.
(In reply to comment #12)
> I think the getTimezoneService() error was fixed in a different bug.

I get the error using todays builds of Lightning and GData Provider (updated using Lightning Nightly updater)

Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE; rv:1.9.1b3pre) Gecko/20090216 Lightning/1.0pre Shredder/3.0b2pre
Whiteboard: [needs review] → [needs review][needed beta][no l10n impact]
Whiteboard: [needs review][needed beta][no l10n impact] → [needed beta][no l10n impact][needs review]
Comment on attachment 359234 [details] [diff] [review]
Fix - v1

Sorry for the delay, this looks right, though I couldn't easily trigger it. r=me.

For your startup issue, I'm currently thinking that the modal dialog is blocking some request or network activity maybe, so you might want to try calling loginAndCountinue in asyncItemRequest via a short timeout, i.e. let whatever was calling it continue on.
Attachment #359234 - Flags: review?(bugzilla) → review+
Can confirm still an issue as at time of writing:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090303 Lightning/1.0pre Shredder/3.0b3pre

If I try reloading remote calendars (I have a Google calendar linked) I see repeated:

Error: Error parsing XML streamReferenceError: getTimezoneService is not defined

messages, but nothing else, and the Google calendar events fail to show up.
(In reply to comment #15)
> Can confirm still an issue as at time of writing:
> 
> Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre)
> Gecko/20090303 Lightning/1.0pre Shredder/3.0b3pre
> 
> If I try reloading remote calendars (I have a Google calendar linked) I see
> repeated:

Google calendars are working fine here with the latest lightning & thunderbird (via latest gdata provider). I suggest you open a different bug as the problem and fix here wouldn't stop google calendars from working, and additionally the error you are seeing is completely different to the error referenced in this bug.
Well, the getTimezoneService error was brought up here before, and Philipp mentioned he thought it was fixed (comment 12) Did anyone find another bug about that error case?
Bug 474576 handled a similar but not the same issue. Please file a new bug for the new issue.
Filed as bug 481428
(In reply to comment #14)
> For your startup issue, I'm currently thinking that the modal dialog is
> blocking some request or network activity maybe, so you might want to try
> calling loginAndCountinue in asyncItemRequest via a short timeout, i.e. let
> whatever was calling it continue on.

Great tip! Works perfectly, thank you very much!

Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/80f03477ddf3>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Whiteboard: [needed beta][no l10n impact][needs review] → [needed beta][no l10n impact]
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.