Closed
Bug 1399018
Opened 8 years ago
Closed 8 years ago
Intermittent test_expected.py TestExpected.test_element_displayed_when_stale_element | UnknownException: TypeError: el is null
Categories
(Testing :: Marionette Client and Harness, defect, P5)
Tracking
(firefox56 unaffected, firefox57 fix-optional)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | unaffected |
| firefox57 | --- | fix-optional |
People
(Reporter: intermittent-bug-filer, Unassigned)
References
Details
(Keywords: intermittent-failure, regression)
Comment 1•8 years ago
|
||
Here the failing test:
https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/testing/marionette/harness/marionette_harness/tests/unit/test_expected.py#146-151
The JS error stack looks like:
05:52:51 INFO - element.isStale@chrome://marionette/content/element.js:636:7
05:52:51 INFO - get@chrome://marionette/content/element.js:181:9
05:52:51 INFO - isElementDisplayed@chrome://marionette/content/listener.js:1431:12
05:52:51 INFO - dispatch/</req<@chrome://marionette/content/listener.js:515:16
05:52:51 INFO - async*dispatch/<@chrome://marionette/content/listener.js:513:16
It means that we have to caught the `TypeError` and let `isStale` return false, but that doesn't happen:
https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/testing/marionette/element.js#635-643
It's a regression from the changes on bug 1394881. Andreas, can you please have a look?
Blocks: 1394881
status-firefox56:
--- → unaffected
status-firefox57:
--- → affected
Flags: needinfo?(ato)
Keywords: regression
Comment 2•8 years ago
|
||
Unable to reproduce this, but the only thing I can think of from the
element.Store is that el.get(), is that it fails when unpacking the
weak reference of the element:
> get(uuid) {
> let el = this.els[uuid];
> if (!el) {
> throw new NoSuchElementError("Element reference not seen before: " + uuid);
> }
>
> try {
> el = el.get();
> } catch (e) {
> el = null;
> delete this.els[uuid];
> }
>
> if (element.isStale(el)) {
> throw new StaleElementReferenceError(
> pprint`The element reference of ${el} stale; ` +
> "either the element is no longer attached to the DOM " +
> "or the document has been refreshed");
> }
>
> return el;
> }
Arguably we should error when el.get() throws and the weak reference
is deleted from the cache.
Flags: needinfo?(ato)
Comment 3•8 years ago
|
||
(In reply to Andreas Tolfsen ‹:ato› from comment #2)
> Arguably we should error when el.get() throws and the weak
> reference is deleted from the cache.
Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1399076 to take
care of this.
Comment 4•8 years ago
|
||
based on priority
Comment 5•8 years ago
|
||
appears to have been fixed by bug 1399076
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Testing → Remote Protocol
Comment 6•3 years ago
|
||
Moving bug to Testing::Marionette Client and Harness component per bug 1815831.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in
before you can comment on or make changes to this bug.
Description
•