Closed Bug 1665022 Opened 5 years ago Closed 2 years ago

Intermittent testing/marionette/harness/marionette_harness/tests/unit/test_click.py TestLegacyClick.<test> | NoSuchElementException: Unable to locate element: <random>

Categories

(Testing :: Marionette Client and Harness, defect, P5)

defect

Tracking

(firefox82 wontfix)

RESOLVED INCOMPLETE
Tracking Status
firefox82 --- wontfix

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure)

Filed by: ncsoregi [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=315724124&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/IRhMtyYfSROSASBzPVSoZw/runs/0/artifacts/public/logs/live_backing.log


>[task 2020-09-15T09:09:40.613Z] 09:09:40     INFO - TEST-UNEXPECTED-ERROR | testing/marionette/harness/marionette_harness/tests/unit/test_click.py TestLegacyClick.test_clicking_on_a_multiline_link | NoSuchElementException: Unable to locate element: testDiv
[task 2020-09-15T09:09:40.613Z] 09:09:40     INFO - stacktrace:
[task 2020-09-15T09:09:40.613Z] 09:09:40     INFO - 	WebDriverError@chrome://marionette/content/error.js:181:5
[task 2020-09-15T09:09:40.613Z] 09:09:40     INFO - 	NoSuchElementError@chrome://marionette/content/error.js:393:5
[task 2020-09-15T09:09:40.614Z] 09:09:40     INFO - 	element.find/</<@chrome://marionette/content/element.js:332:16
[task 2020-09-15T09:09:40.615Z] 09:09:40     INFO - Traceback (most recent call last):
[task 2020-09-15T09:09:40.615Z] 09:09:40     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 196, in run
[task 2020-09-15T09:09:40.616Z] 09:09:40     INFO -     testMethod()
[task 2020-09-15T09:09:40.616Z] 09:09:40     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/testing/marionette/harness/marionette_harness/tests/unit/test_click.py", line 119, in test_clicking_on_a_multiline_link
[task 2020-09-15T09:09:40.616Z] 09:09:40     INFO -     self.marionette.find_element(By.ID, "testDiv")
[task 2020-09-15T09:09:40.616Z] 09:09:40     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 1690, in find_element
[task 2020-09-15T09:09:40.617Z] 09:09:40     INFO -     body, key="value")
[task 2020-09-15T09:09:40.617Z] 09:09:40     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 26, in _
[task 2020-09-15T09:09:40.617Z] 09:09:40     INFO -     return func(*args, **kwargs)
[task 2020-09-15T09:09:40.618Z] 09:09:40     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 602, in _send_message
[task 2020-09-15T09:09:40.618Z] 09:09:40     INFO -     self._handle_error(err)
[task 2020-09-15T09:09:40.619Z] 09:09:40     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 622, in _handle_error
[task 2020-09-15T09:09:40.619Z] 09:09:40     INFO -     raise errors.lookup(error)(message, stacktrace=stacktrace)
[task 2020-09-15T09:09:40.619Z] 09:09:40     INFO - TEST-INFO took 628ms

*[task 2020-09-15T09:09:39.953Z] 09:09:39     INFO - TEST-START | testing/marionette/harness/marionette_harness/tests/unit/test_click.py TestLegacyClick.test_clicking_on_a_multiline_link*```

The click onto the overflow element didn't cause a navigation to test.html:

[task 2020-09-15T09:09:40.128Z] 09:09:40     INFO -  1600160980123	Marionette	DEBUG	222 -> [0,4,"WebDriver:ElementClick",{"id":"5c65038e-bbd5-438c-86c8-a68292fad244"}]
[task 2020-09-15T09:09:40.130Z] 09:09:40     INFO -  1600160980129	Marionette	TRACE	Using browsing context 52
[task 2020-09-15T09:09:40.346Z] 09:09:40     INFO -  1600160980340	Marionette	TRACE	Canceled page load listener because no navigation has been detected
[task 2020-09-15T09:09:40.348Z] 09:09:40     INFO -  1600160980340	Marionette	DEBUG	222 <- [1,4,null,{"value":null}]

Maybe a side-effect of my changes from bug 1612831. Lets observe how often it happens.

Summary: Intermittent testing/marionette/harness/marionette_harness/tests/unit/test_click.py TestLegacyClick.test_clicking_on_a_multiline_link | NoSuchElementException: Unable to locate element: testDiv → Intermittent testing/marionette/harness/marionette_harness/tests/unit/test_click.py TestLegacyClick.<test> | NoSuchElementException: Unable to locate element: <random>

Checking the log again this is most likely a problem with a delayed click due to the synchronous capabilities update with the parent process. This has been removed with the patch on bug 1394354, and as such this failure should no longer happen.

Depends on: 1394354

Most recent failure:

[task 2020-10-24T11:57:55.209Z] 11:57:55     INFO -  1603540675207	Marionette	DEBUG	194 -> [0,16,"WebDriver:ElementClick",{"id":"98865d91-fab2-4389-b4c1-8902d0b1135d"}]
[task 2020-10-24T11:57:55.211Z] 11:57:55     INFO -  1603540675209	Marionette	TRACE	[149] Frame script unloaded
[task 2020-10-24T11:57:55.216Z] 11:57:55     INFO -  1603540675214	Marionette	TRACE	Received DOM event click for javascript:window.close();
[task 2020-10-24T11:57:55.216Z] 11:57:55     INFO -  1603540675215	Marionette	TRACE	Received message pagehide for about:blank
[..]
[task 2020-10-24T12:02:55.214Z] 12:02:55     INFO -  1603540975209	Marionette	DEBUG	194 <- [1,16,{"error":"timeout","message":"","stacktrace":"WebDriverError@chrome://marionette/content/error.js:181:5\nTimeoutError@chrome://marionette/content/error.js:450:5\nbail@chrome://marionette/content/sync.js:220:19\n"},null]

Even we see that the frame script gets unloaded we do not return from the wait for navigation listener, and as such end-up in the timeout. Interesting is that the click event comes in after the frame has been unloaded.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 5 years ago4 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 4 years ago3 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → INCOMPLETE
Product: Testing → Remote Protocol
Moving bug to Testing::Marionette Client and Harness component per bug 1815831.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.