Closed Bug 999357 Opened 7 years ago Closed 6 years ago

Test failure "Context menu has been opened." in testSessionStore\testUndoTab.js

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect, P1)

Version 1
x86_64
All
defect

Tracking

(firefox35 fixed, firefox36 fixed, firefox37 fixed, firefox38 fixed, firefox-esr31 fixed)

RESOLVED FIXED
Tracking Status
firefox35 --- fixed
firefox36 --- fixed
firefox37 --- fixed
firefox38 --- fixed
firefox-esr31 --- fixed

People

(Reporter: danisielm, Assigned: cosmin-malutan)

References

()

Details

(Keywords: intermittent-failure, Whiteboard: [mozmill-test-failure][sprint])

Attachments

(2 files, 1 obsolete file)

This failed today on Firefox 31.0a1 en-US on mm-win-7-32-4 (20140419030204)

Report:
http://mozmill-daily.blargon7.com/#/functional/report/872552204e6358484b0c94623a8c063e
In the console log we also see this:

06:41:59 *************************
06:41:59 A coding exception was thrown in a Promise resolution callback.
06:41:59 
06:41:59 Full message: TypeError: this.options is undefined
06:41:59 See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
06:41:59 Full stack: Capture.prototype.start@resource://gre/modules/BackgroundPageThumbs.jsm:286:19
06:41:59 BackgroundPageThumbs._processCaptureQueue@resource://gre/modules/BackgroundPageThumbs.jsm:219:5
06:41:59 BackgroundPageThumbs.capture@resource://gre/modules/BackgroundPageThumbs.jsm:70:5
06:41:59 BackgroundPageThumbs.captureIfMissing/<@resource://gre/modules/BackgroundPageThumbs.jsm:91:7
06:41:59 Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:863:11
06:41:59 this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:742:7
06:41:59 sleep@resource://mozmill/stdlib/utils.js:223:5
06:41:59 MozMillElement.prototype.mouseEvent@resource://mozmill/driver/mozelement.js:395:3
06:41:59 MozMillElement.prototype.click@resource://mozmill/driver/mozelement.js:408:5
06:41:59 MozMillController.prototype.click@resource://mozmill/driver/controller.js:1077:3
06:41:59 tabBrowser.prototype.selectedIndex@resource://mozmill/stdlib/securable-module.js -> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/firefox/lib/tabs.js:485:5
06:41:59 testUndoTabViaShortcut@resource://mozmill/modules/frame.js -> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/firefox/tests/functional/testSessionStore/testUndoTab.js:91:3
06:41:59 Runner.prototype.execFunction@resource://mozmill/modules/frame.js:752:5
06:41:59 Runner.prototype.runTestModule@resource://mozmill/modules/frame.js:706:9
06:41:59 Runner.prototype.runTestFile@resource://mozmill/modules/frame.js:690:3
06:41:59 runTestFile@resource://mozmill/modules/frame.js:775:3
06:41:59 Bridge.prototype._execFunction@resource://jsbridge/modules/Bridge.jsm:140:3
06:41:59 Bridge.prototype.execFunction@resource://jsbridge/modules/Bridge.jsm:147:1
06:41:59 @resource://jsbridge/modules/Server.jsm:32:1
06:41:59 Server.Session/<@resource://jsbridge/modules/Server.jsm:32:5
06:41:59 Sockets.Client.prototype.onMessage/event.notify@resource://jsbridge/modules/Sockets.jsm:40:11
06:41:59 
06:41:59 *************************
Whiteboard: [mozmill-test-failure]
What are we doing here?

06:41:59 testUndoTabViaShortcut@resource://mozmill/modules/frame.js -> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/firefox/tests/functional/testSessionStore/testUndoTab.js:91:3

I don't see why we issue a click() event for a shortcut test.
Failed again with Aurora en-US on Vista x86 (mm-win-vista-32-3):
http://mozmill-daily.blargon7.com/#/functional/report/44e0169acb64b68a44c1ad880b107cbe
Failed again today with Aurora zh-CN on Vista x86 (mm-win-vista-32-4).
http://mozmill-daily.blargon7.com/#/functional/report/7a69d3e8424ecf8642bb6566e46a639f

This failed 7 times on Vista & once on Windows 7 in the last month.
Priority: -- → P3
Duplicate of this bug: 1021725
OS: Linux → All
Priority: P3 → P2
Failed 5 times this week, on OS X and Windows, with de and zh-cn locales. Daniel, please look into comment 2 when you have the time. Thanks!
Hmm, looked into this and I have some thoughts on this failure. I think that most likely it's something similar with bug 998253.

Steps we do in the test:

1. Open firefox (opens with 2 tabs opened).
2. Call 'closeAllTabs()' in setupModule 
3. Closes the *1st Tab* so the *2nd Tab* animates from right to left.
4. While the animation is happening we access 'about:blank' and wait for it to be loaded (but this could happen very fast).
5. Right click on the tab to open the contextMenu (here the tab may be still animating (right to left)) and it may fail to open the context menu.

This failure is intermitend and I couldn't reproduce it.
This is just an assumption, but I would suggest to improve our 'closeTab()' method for the case we are closing a tab that's not the last one (to wait for all possible events may occur).
(In reply to Henrik Skupin (:whimboo) [away 07/19 - 08/01] from comment #2)
> What are we doing here?
> 
> 06:41:59 testUndoTabViaShortcut@resource://mozmill/modules/frame.js ->
> file:///c:/jenkins/workspace/mozilla-central_functional/data/mozmill-tests/
> firefox/tests/functional/testSessionStore/testUndoTab.js:91:3
> 
> I don't see why we issue a click() event for a shortcut test.

We select the 1st tab by clicking on it there.
Maybe bug 1047312 will fix this issue.
Failed once again : 1 failure in the last 6 days, on Aurora en-Us ... Windows 8 x64
We had 6 failures today with this on Win & OSX, with the latest beta (33).
My best guess is that we issue a click on the first tab but given that that's still animateing, it may fail to select sometimes.
Failed 9 times today on Win 8.1 mainly, one Win 7 and one OSX 10.9, with beta, different locales:

http://mozmill-release.blargon7.com/#/functional/failure?app=Firefox&branch=All&platform=All&from=2014-09-19&to=&test=%2FtestSessionStore%2FtestUndoTab.js&func=testUndoTabFromContextMenu

I'll have a look later today.
Assignee: nobody → andreea.matei
Status: NEW → ASSIGNED
10 other failures with the latest beta on different locales. Check the link from Comment 19 to see.

Once I have time I will get to bug 1047312 and investigate on the events we should wait when we close a tab. Maybe that will fix this.
15 failures this beta cycle again
Whiteboard: [mozmill-test-failure] → [mozmill-test-failure][sprint]
Attached patch skiptestundotab.patch (obsolete) — Splinter Review
Attachment #8512608 - Flags: review?(andrei.eftimie)
Attachment #8512608 - Flags: review?(andreea.matei)
Comment on attachment 8512608 [details] [diff] [review]
skiptestundotab.patch

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

::: firefox/tests/functional/testSessionStore/manifest.ini
@@ +1,4 @@
>  [parent:../manifest.ini]
>  
>  [testUndoTab.js]
> +disabled = Bug 999357 - Test failure "Context menu has been opened." in testSessionStore\testUndoTab.js
\ No newline at end of file

Please remove the test name from here as we already know which one is from the line above. Lets keep just the failure message.
Attachment #8512608 - Flags: review?(andrei.eftimie)
Attachment #8512608 - Flags: review?(andreea.matei)
Attachment #8512608 - Flags: review-
Attachment #8512608 - Attachment is obsolete: true
Attachment #8512618 - Flags: review?(andrei.eftimie)
Attachment #8512618 - Flags: review?(andreea.matei)
Comment on attachment 8512618 [details] [diff] [review]
skiptestundotab.patch

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

Disabled:
remote:   https://hg.mozilla.org/qa/mozmill-tests/rev/782729183545 (default)
remote:   https://hg.mozilla.org/qa/mozmill-tests/rev/0159b19ab960 (mozilla-aurora)
remote:   https://hg.mozilla.org/qa/mozmill-tests/rev/88b54a8d5563 (mozilla-beta)
remote:   https://hg.mozilla.org/qa/mozmill-tests/rev/8256dc26c029 (mozilla-release)
Attachment #8512618 - Flags: review?(andrei.eftimie)
Attachment #8512618 - Flags: review?(andreea.matei)
Attachment #8512618 - Flags: review+
Attachment #8512618 - Flags: checkin+
Assignee: andreea.matei → daniela.domnici
I`ll tried to reproduce it using Ubuntu 13.10 Staging Machine and Windows 8.1 staging machine.It didn`t fail  at all.Here are the results:
Nightly:http://mozmill-crowd.blargon7.com/#/functional/report/946d3cd70aaf19c33a8878f8c4e6632e ;
Beta : http://mozmill-crowd.blargon7.com/#/functional/report/946d3cd70aaf19c33a8878f8c4e789f9 ;
This was failing intermittently, but quite often in a few days. Please do multiple testruns (30-40), we want to be sure.
And also please keep in mind fixes in bug 1108077, if it helps.
What I've done to investigate this:
I added a try/catch on the failing line, with an sleep in catch to see what actually happens. 
The menu was opened, but on a closer look, it was the wrong one, we opened the "toolbar-context-menu" instead of "tabContextMenu". Under what circumstances can this happen? If we right click on toolbar instead of tab. At the line we open the context menu, we clearly give as the context the tab node and not the toolbar, so the only thing that could happen is that we don't wait for animation correctly, and the tab still animates at the time we dispatch the right-click event.
http://hg.mozilla.org/qa/mozmill-tests/file/18126d037e8b962551c220d3fcfc88559665043a/firefox/tests/functional/testSessionStore/testUndoTab.js#l45

I dumped again the transition events when we open an tab and we don't have only one but three, and they distinguishes by diffrent propertyName("visibility", "min-width", "max-width"). I suggest in lib/tabs.js/_waitForTabOpened method we wait for all of them, this seems to fix the issue. Henrik do you agree?
Assignee: daniela.domnici → cosmin.malutan
Attachment #8544457 - Flags: feedback?(hskupin)
Comment on attachment 8544457 [details]
Screenshot from 2015-01-06 10:36:39.png

I don't see why I have to give feedback on a screenshot. Needinfo would be the appropriate flag. Anyway...

That's interesting because I have seen something similar on bug 1112601. I think we should use that other bug to bring the code for handling open/close tabs up-to-date. Cosmin, would you mind taking that one, given that you already investigated a lot here?
Attachment #8544457 - Flags: feedback?(hskupin)
Depends on: 1112601
With the latest patch from bug 1112601 landed the test doesn't fail anymore.
http://mozmill-crowd.blargon7.com/#/functional/reports?app=All&branch=38&platform=Win&from=2015-02-02&to=2015-02-02

Andreea, could you backout the skip from default please?
Flags: needinfo?(andreea.matei)
Ran well on default, let's backport it to Aurora.
Flags: needinfo?(andreea.matei)
No failure since it was re-enabled, Andreea could you backout the skip from beta and release and close the bug?
Flags: needinfo?(andreea.matei)
https://hg.mozilla.org/qa/mozmill-tests/rev/245f9e6709a4 (beta)
https://hg.mozilla.org/qa/mozmill-tests/rev/1594b8ea825e (release)
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(andreea.matei)
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.