Closed Bug 1671370 Opened 4 years ago Closed 4 years ago

(actors) Perma Fis Wd | <test-name> - Failed: DID NOT RAISE <class 'webdriver.error.StaleElementReferenceException'>

Categories

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

defect

Tracking

(Fission Milestone:M7, firefox-esr78 unaffected, firefox82 unaffected, firefox83 disabled, firefox84 fixed)

RESOLVED FIXED
84 Branch
Fission Milestone M7
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- unaffected
firefox83 --- disabled
firefox84 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: impossibus)

References

(Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [marionette-fission-mvp][simple])

Attachments

(2 files)

I assume that this is simple, and that we just fail to set the correct browsing context for the content process.

Summary: Intermittent /webdriver/tests/switch_to_parent_frame/switch.py | test_stale_element_from_iframe - Failed: DID NOT RAISE <class 'webdriver.error.StaleElementReferenceException'> → Perma Fis /webdriver/tests/switch_to_parent_frame/switch.py | test_stale_element_from_iframe - Failed: DID NOT RAISE <class 'webdriver.error.StaleElementReferenceException'>
Whiteboard: [marionette-fission-mvp][simple]
Summary: Perma Fis /webdriver/tests/switch_to_parent_frame/switch.py | test_stale_element_from_iframe - Failed: DID NOT RAISE <class 'webdriver.error.StaleElementReferenceException'> → Perma Fis Wd | <test-name> - Failed: DID NOT RAISE <class 'webdriver.error.StaleElementReferenceException'>

Tracking marionette-fission-mvp bugs for Fission Beta milestone (M7)

Fission Milestone: --- → M7

Switch to parent frame seems to have succeeded, but we can still access the element as retrieved in the sub frame:

[task 2020-10-15T09:49:27.938Z] 09:49:27     INFO - PID 2196 | 1602755367935	Marionette	DEBUG	0 -> [0,105,"WebDriver:FindElement",{"using":"css selector","value":"p"}]
[task 2020-10-15T09:49:27.939Z] 09:49:27     INFO - PID 2196 | 1602755367936	Marionette	DEBUG	0 <- [1,105,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"3bf1d451-6c4a-494f-8294-39575f94abcd"}}]
[task 2020-10-15T09:49:27.958Z] 09:49:27     INFO - PID 2196 | 1602755367942	webdriver::server	DEBUG	<- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"3bf1d451-6c4a-494f-8294-39575f94abcd"}}
[task 2020-10-15T09:49:27.958Z] 09:49:27     INFO - PID 2196 | 1602755367943	webdriver::server	DEBUG	-> POST /session/0a58d181-3478-4608-8184-ae7be3f45af3/frame/parent {}
[task 2020-10-15T09:49:27.958Z] 09:49:27     INFO - PID 2196 | 1602755367944	Marionette	DEBUG	0 -> [0,106,"WebDriver:SwitchToParentFrame",{}]
[task 2020-10-15T09:49:27.958Z] 09:49:27     INFO - PID 2196 | 1602755367945	Marionette	DEBUG	0 <- [1,106,null,{"value":null}]
[task 2020-10-15T09:49:27.958Z] 09:49:27     INFO - PID 2196 | 1602755367945	webdriver::server	DEBUG	<- 200 OK {"value":null}
[task 2020-10-15T09:49:27.959Z] 09:49:27     INFO - PID 2196 | 1602755367946	webdriver::server	DEBUG	-> GET /session/0a58d181-3478-4608-8184-ae7be3f45af3/element/3bf1d451-6c4a-494f-8294-39575f94abcd/text
[task 2020-10-15T09:49:27.959Z] 09:49:27     INFO - PID 2196 | 1602755367947	Marionette	DEBUG	0 -> [0,107,"WebDriver:GetElementText",{"id":"3bf1d451-6c4a-494f-8294-39575f94abcd"}]
[task 2020-10-15T09:49:27.968Z] 09:49:27     INFO - PID 2196 | 1602755367963	Marionette	DEBUG	0 <- [1,107,null,{"value":"foo"}]
[task 2020-10-15T09:49:27.968Z] 09:49:27     INFO - PID 2196 | 1602755367962	webdriver::server	DEBUG	<- 200 OK {"value":"foo"}

Note that this failure is a result when using the JSWindowActor implementation, and the ReferenceStore.

Summary: Perma Fis Wd | <test-name> - Failed: DID NOT RAISE <class 'webdriver.error.StaleElementReferenceException'> → (actors) Perma Fis Wd | <test-name> - Failed: DID NOT RAISE <class 'webdriver.error.StaleElementReferenceException'>

Maja, could you have a look at this failure given that it is ReferenceStore related? It can be reproduced with testing/web-platform/tests/webdriver/tests/switch_to_parent_frame/switch.py:test_stale_element_from_iframe.

We clearly have a different browsing context id here, and basically should fail:

0:10.51 pid:80858 1602856755574	Marionette	DEBUG	0 -> [0,7,"WebDriver:FindElement",{"using":"css selector","value":"p"}]
 0:10.51 pid:80858 1602856755574	Marionette	TRACE	** browsing context: 2147483649
 0:10.51 pid:80858 1602856755574	Marionette	TRACE	** browsing context: 2147483649
 0:10.51 pid:80858 1602856755575	Marionette	DEBUG	0 <- [1,7,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"88545e8e-e219-2043-b5fc-cd8dbbdcff2e"}}]
 0:10.51 pid:80858 1602856755576	webdriver::server	DEBUG	<- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"88545e8e-e219-2043-b5fc-cd8dbbdcff2e"}}
 0:10.52 pid:80858 1602856755578	webdriver::server	DEBUG	-> POST /session/beba83cc-64cb-d549-9a9e-cdc3a40ffd7a/frame/parent {}
 0:10.52 pid:80858 1602856755579	Marionette	DEBUG	0 -> [0,8,"WebDriver:SwitchToParentFrame",{}]
 0:10.52 pid:80858 1602856755579	Marionette	TRACE	** browsing context: 2147483649
 0:10.52 pid:80858 1602856755579	Marionette	DEBUG	0 <- [1,8,null,{"value":null}]
 0:10.52 pid:80858 1602856755580	webdriver::server	DEBUG	<- 200 OK {"value":null}
 0:10.52 pid:80858 1602856755582	webdriver::server	DEBUG	-> GET /session/beba83cc-64cb-d549-9a9e-cdc3a40ffd7a/element/88545e8e-e219-2043-b5fc-cd8dbbdcff2e/text
 0:10.52 pid:80858 1602856755583	Marionette	DEBUG	0 -> [0,9,"WebDriver:GetElementText",{"id":"88545e8e-e219-2043-b5fc-cd8dbbdcff2e"}]
 0:10.52 pid:80858 1602856755583	Marionette	TRACE	** browsing context: 10
 0:10.52 pid:80858 1602856755583	Marionette	TRACE	** browsing context: 10
 0:10.54 pid:80858 1602856755596	Marionette	DEBUG	0 <- [1,9,null,{"value":"foo"}]
 0:10.54 pid:80858 1602856755596	webdriver::server	DEBUG	<- 200 OK {"value":"foo"}
Flags: needinfo?(mjzffr)
Priority: P5 → P2
Assignee: nobody → mjzffr
Status: NEW → ASSIGNED
Flags: needinfo?(mjzffr)

Thanks for highlighting a reproducible failure, Henrik.

I worked on ReferenceStore clean-up first in Bug 1671725, and my WIP for that didn't fix test_stale_element_from_iframe so I'll focus on this case next.

Priority: P2 → P1
Regressed by: 1662460
No longer regressed by: 1654513
Pushed by mjzffr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/341526d13eb8
[marionette] Provide current Window when checking stale element r=marionette-reviewers,whimboo
https://hg.mozilla.org/integration/autoland/rev/70e2b6b0b177
[marionette] Clarify use of current window global in |element| docstrings r=marionette-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: