Closed Bug 1588979 Opened 5 years ago Closed 5 years ago

Intermittent comm/mailnews/compose/test/unit/test_autoReply.js, test_sendMessageLater2.js, comm/mailnews/local/test/unit/test_pop3PasswordFailure2.js, test_pop3PasswordFailure3.js, comm/mailnews/news/test/unit/test_nntpPasswordFailure.js

Categories

(Thunderbird :: General, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 71.0

People

(Reporter: intermittent-bug-filer, Assigned: jorgk-bmo)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [Thunderbird-testfailure: X all][Thunderbird-disabled-test])

Attachments

(2 files, 2 obsolete files)

M-C range: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8aa8bbbf0bee82ac6dfeac05da5ee15a1e497d07&tochange=e3dc5cfd4d368d281ff8938f5a232f0bf9

That failure wasn't present on the Daily run and wouldn't have been caused by the wpt stuff pushed at dcedbb1d3fd9d1b85e90c359d569daca6bc5beb7 and a backout at 8aa8bbbf0bee82ac6dfeac05da5ee15a1e497d07.

But yes, probably bug 1567196.

Running this locally, I see: ReferenceError: reference to undefined property "timeCreated".

The test uses setupForPassword("signons-mailnews1.8.json"); and the data comes from that JSON file, which, BTW, is in need of pretty-priting. Other tests do the same:
https://searchfox.org/comm-central/search?q=setupForPassword&case=true&regexp=false&path=

Attached patch 1588979-pretty-print.patch (obsolete) — Splinter Review

Pretty-printed using https://jsonformatter.curiousconcept.com/.

Looks like those times can be decoded at https://www.epochconverter.com/.

Assignee: nobody → jorgk

I can't really see where our dates are invalid, but backing out bug 1567196 fixes the test.

Looking at the debug a bit better:
0:01.23 pid:5096 JavaScript strict warning: resource://gre/modules/LoginManager.jsm, line 295: ReferenceError: reference to undefined property "timeCreated"
which is this:
https://hg.mozilla.org/mozilla-central/rev/7f08c34e544b#l1.32

+
+    for (let pname of ["timeCreated", "timeLastUsed", "timePasswordChanged"]) {
+      // Invalid dates
+      if (login[pname] > MAX_DATE_MS) {  <=== 295
+        throw new Error("Can't add a login with invalid date properties.");
+      }
+    }

which strange since we do supply those values.

Now with newlines at the end of the files.

Attachment #9101481 - Attachment is obsolete: true
Regressed by: 1567196
Attached patch 1588979-m-c-part.patch (obsolete) — Splinter Review

Hi Sam, a few of our tests fail after bug 1567196 since our test framework detects "JavaScript strict warning" like
JavaScript strict warning: resource://gre/modules/LoginManager.jsm, line 295: ReferenceError: reference to undefined property "timeCreated"
JavaScript strict warning: resource://gre/modules/LoginStore.jsm, line 112: ReferenceError: reference to undefined property "version"

So this patch avoids those warnings. We'd like to understand how they come about in the first place since the data we supply at:
https://searchfox.org/comm-central/rev/02095fd65039dcb8e7b82d60bf222883b7ff9af6/mailnews/test/resources/passwordStorage.js#17
provides both version and timeCreated as you can see in the other patch where I pretty-printed our input data.

If you agree with the patch, I'll turn it into a Phab patch.

Attachment #9101497 - Flags: feedback?(sfoster)
Keywords: leave-open

BTW, I'm surprised only 5 tests fail since we used this technique in many more tests:
https://searchfox.org/comm-central/search?q=setupForPassword&case=true&regexp=false&path=

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/60814bffc06c
Pretty-print signons-mailnews*.json. rs=white-space-only
https://hg.mozilla.org/comm-central/rev/2b47dfda3484
Switch off failing tests. rs=bustage-fix DONTBUILD
Whiteboard: [Thunderbird-testfailure: X all][Thunderbird-disabled-test]
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/7bfa8f3905a0
Switch off failing tests, take 2. rs=bustage-fix DONTBUILD
Comment on attachment 9101497 [details] [diff] [review]
1588979-m-c-part.patch

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

Please address the comments add submit on Phabricator.

::: toolkit/components/passwordmgr/LoginManager.jsm
@@ +291,5 @@
>      }
>  
>      for (let pname of ["timeCreated", "timeLastUsed", "timePasswordChanged"]) {
>        // Invalid dates
> +      if ("pname" in login && login[pname] > MAX_DATE_MS) {

The underlying cause is probably due to a missing `.QueryInterface(Ci.nsILoginMetaInfo);` on the login.

::: toolkit/components/passwordmgr/LoginStore.jsm
@@ +108,5 @@
>      data.dismissedBreachAlertsByLoginGUID = {};
>    }
>  
>    // sanitize dates in logins
> +  if ("version" in data && data.version < 3) {

This is incorrect as we would want to migrate if data.version wasn't set
Attachment #9101497 - Flags: feedback?(sfoster)
Comment on attachment 9101497 [details] [diff] [review]
1588979-m-c-part.patch

Thanks for your comments, Matthew, they were spot on. Phab patch coming.
Attachment #9101497 - Attachment is obsolete: true
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/integration/autoland/rev/024c8c2242d6
Add missing QI in LoginManager.jsm and fix version check in LoginStore.jsm. r=MattN
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/d52e12d6ec79
Backed out 2 changesets to re-enable tests. a=backout
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 71.0
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: