Closed Bug 1495895 Opened 6 years ago Closed 6 years ago

"TypeError: bucket.findItemForAttachment is not a function" in Thunderbird mozmill runs

Categories

(Thunderbird :: Testing Infrastructure, defect)

defect
Not set
minor

Tracking

(thunderbird_esr6064+ fixed, thunderbird64 fixed)

RESOLVED FIXED
Thunderbird 64.0
Tracking Status
thunderbird_esr60 64+ fixed
thunderbird64 --- fixed

People

(Reporter: aceman, Assigned: aceman)

Details

Attachments

(1 file)

In Thunderbird's mozmill test run there are multiple errors output like this:

JavaScript error: chrome://messenger/content/messengercompose/MsgComposeCommands.js, line 1518: TypeError: bucket.findItemForAttachment is not a function

This happens mostly in cloudfile tests.
Attached patch 1495895.patchSplinter Review
I found out this happens because in the tests we add some attachments and then tear down the compose window so fast that the onStopRequest() of uploadListener in MsgComposeCommands.js is called after that and then it can no longer find the function of the bucket (XBL bindings (https://dxr.mozilla.org/comm-central/source/comm/mail/base/content/mailWidgets.xml#226) mostly apply only when the element is visible, "has a frame attached" as far as I remember).

So the patch adds some waiting until the attachments are fully uploaded/added before continuing the test.

Only for tests that add their own listener or actually depend on the upload to fail the waiting is skipped.

Before:
https://taskcluster-artifacts.net/AGyzGCxlT_uSUSpm3G4j0g/0/public/logs/live_backing.log

After:
https://taskcluster-artifacts.net/ApCJxnahTc-CVgbJN-aL9Q/0/public/logs/live_backing.log

This one is from the try run at:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&selectedJob=202952052&revision=c44685e2ccf40649f4390d65fbbc11b9e2aed444
Attachment #9013840 - Flags: review?(jorgk)
Comment on attachment 9013840 [details] [diff] [review]
1495895.patch

Looks OK, however, not out most frequent error, it was only in the log four times. More severe is bug 1495898 with 542 errors :-(
Attachment #9013840 - Flags: review?(jorgk) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/686249883a13
make adding compose attachments more robust in MozMill tests. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 64.0
(In reply to Jorg K (GMT+2) from comment #2)
> Looks OK, however, not out most frequent error, it was only in the log four
> times. More severe is bug 1495898 with 542 errors :-(

Yes, but this one is in our code. The others are of unknown origin (whether m-c bug, or something we must adapt to).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: