Closed Bug 1352984 Opened 7 years ago Closed 7 years ago

Missing window handle in _check_and_fix_leaked_handles()

Categories

(Remote Protocol :: Marionette, defect)

Version 3
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: whimboo, Unassigned)

References

Details

(Keywords: pi-marionette-firefox-puppeteer, regression)

Looks like we got a couple of recently new test failures all about the same area of code. Whenever a test runs tearDown the `_check_and_fix_leaked_handles()` method fails to switch to a window (tab) as retrieved in an `execute_script()` call right before:

https://treeherder.mozilla.org/logviewer.html#?job_id=87417847&repo=mozilla-inbound&lineNumber=16717

[task 2017-03-29T23:11:52.464098Z] 23:11:52     INFO -  1490829112461	Marionette	TRACE	2 -> [0,114,"executeScript",{"scriptTimeout":null,"newSandbox":true,"args":[{"element-6066-11e4-a52e-4f735466cecf":"d711b2e3-6745-4e11-b33e-38e09f6bf148","ELEMENT":"d711b2e3-6745-4e11-b33e-38e09f6bf148"}],"filename":"tabbar.py","script":"\n          let win = arguments[0].linkedBrowser;\n          if (!win) {\n            return null;\n          }\n          return win.outerWindowID.toString();\n        ","sandbox":"default","line":202}]
[task 2017-03-29T23:11:52.471034Z] 23:11:52     INFO -  1490829112467	Marionette	TRACE	2 <- [1,114,null,{"value":"4294967297"}]
[task 2017-03-29T23:11:52.471724Z] 23:11:52     INFO -  1490829112468	Marionette	TRACE	2 -> [0,115,"switchToWindow",{"focus":true,"name":"4294967297"}]
[task 2017-03-29T23:11:52.472881Z] 23:11:52     INFO -  1490829112470	Marionette	TRACE	2 <- [1,115,{"error":"no such window","message":"Unable to locate window: 4294967297","stacktrace":"WebDriverError@chrome://marionette/content/error.js:211:5\nNoSuchWindowError@chrome://marionette/content/error.js:413:5\nGeckoDriver.prototype.switchToWindow@chrome://marionette/content/driver.js:1427:11\nTaskImpl_run@resource://gre/modules/Task.jsm:319:42\nTaskImpl@resource://gre/modules/Task.jsm:277:3\nasyncFunction@resource://gre/modules/Task.jsm:252:14\nTask_spawn@resource://gre/modules/Task.jsm:166:12\nTaskImpl_handleResultValue@resource://gre/modules/Task.jsm:389:16\nTaskImpl_run@resource://gre/modules/Task.jsm:327:15\nTaskImpl@resource://gre/modules/Task.jsm:277:3\nasyncFunction@resource://gre/modules/Task.jsm:252:14\nTask_spawn@resource://gre/modules/Task.jsm:166:12\nexecute@chrome://marionette/content/server.js:495:15\nonPacket@chrome://marionette/content/server.js:466:7\n_onJSONObjectReady/<@chrome://marionette/content/server.js -> resource://devtools/shared/transport/transport.js:483:11\nexports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14\nexports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14\n"},null]
Blocks: 1351977
Blocks: 1352255
Blocks: 1351940
Hm, this failure didn't appear anymore. I wonder what caused it.
John, as I can remember you were seeing this problem? So is it still present for you for latest mozilla-central commits?
Flags: needinfo?(jdorlus)
This particular issue does not show up anymore. In 1351940, the test passes.
Flags: needinfo?(jdorlus)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.