Intermittent /webdriver/tests/bidi/script/evaluate/evaluate.py | test_different_target_realm - webdriver.bidi.error.UnknownErrorException: unknown error (TypeError: realm is null)
Categories
(Remote Protocol :: WebDriver BiDi, defect, P5)
Tracking
(Not tracked)
People
(Reporter: intermittent-bug-filer, Unassigned)
References
Details
(Keywords: intermittent-failure)
Filed by: nfay [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=393694829&repo=mozilla-beta
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/JoJDXkClSjOR82qc1wSszg/runs/0/artifacts/public/logs/live_backing.log
[task 2022-10-19T15:51:09.204Z] 15:51:09 INFO - STDOUT: _________________________ test_different_target_realm __________________________
[task 2022-10-19T15:51:09.205Z] 15:51:09 INFO - PID 2125 | 1666194669200 mozdevice TRACE execute_host_command: << []
[task 2022-10-19T15:51:09.205Z] 15:51:09 INFO - PID 2125 | 1666194669200 mozdevice TRACE execute_host_command: >> "host-serial:emulator-5554:killforward:tcp:9222"
[task 2022-10-19T15:51:09.205Z] 15:51:09 INFO - PID 2125 | 1666194669200 mozdevice TRACE execute_host_command: << ""
[task 2022-10-19T15:51:09.206Z] 15:51:09 INFO - PID 2125 | 1666194669200 geckodriver::android DEBUG WebSocket port forward (9222 -> 9222) stopped
[task 2022-10-19T15:51:09.206Z] 15:51:09 INFO - PID 2125 | 1666194669200 webdriver::server DEBUG <- 200 OK {"value":null}
[task 2022-10-19T15:51:09.207Z] 15:51:09 INFO - STDOUT: bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fc21c0b1470>
[task 2022-10-19T15:51:09.207Z] 15:51:09 INFO - STDOUT: @pytest.mark.asyncio
[task 2022-10-19T15:51:09.208Z] 15:51:09 INFO - STDOUT: async def test_different_target_realm(bidi_session):
[task 2022-10-19T15:51:09.209Z] 15:51:09 INFO - STDOUT: await bidi_session.browsing_context.create(type_hint="tab")
[task 2022-10-19T15:51:09.209Z] 15:51:09 INFO - STDOUT:
[task 2022-10-19T15:51:09.210Z] 15:51:09 INFO - STDOUT: realms = await bidi_session.script.get_realms()
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - TEST-PASS | /webdriver/tests/bidi/script/evaluate/evaluate.py | test_eval
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - TEST-PASS | /webdriver/tests/bidi/script/evaluate/evaluate.py | test_interact_with_dom
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - TEST-PASS | /webdriver/tests/bidi/script/evaluate/evaluate.py | test_target_realm
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/bidi/script/evaluate/evaluate.py | test_different_target_realm - webdriver.bidi.error.UnknownErrorException: unknown error (TypeError: realm is null)
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fc21c0b1470>
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - @pytest.mark.asyncio
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - async def test_different_target_realm(bidi_session):
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - await bidi_session.browsing_context.create(type_hint="tab")
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - realms = await bidi_session.script.get_realms()
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - first_tab_default_realm = realms[0]["realm"]
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - second_tab_default_realm = realms[1]["realm"]
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - assert first_tab_default_realm != second_tab_default_realm
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - await bidi_session.script.evaluate(
[task 2022-10-19T15:51:09.215Z] 15:51:09 INFO - raw_result=True,
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - expression="window.foo = 3",
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - target=RealmTarget(first_tab_default_realm),
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - await_promise=True,
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - )
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - await bidi_session.script.evaluate(
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - raw_result=True,
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - expression="window.foo = 5",
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - target=RealmTarget(second_tab_default_realm),
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - > await_promise=True,
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - )
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fc21c0b1470>
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - first_tab_default_realm = '3f019292-ad11-4443-8088-b0806385edce'
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - realms = [{'context': 'c096af8d-264c-46d1-bb93-47507673a396',
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'origin': 'null',
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'realm': '3f019292-ad11-4443-8088-b0806385edce',
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'sandbox': None,
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'type': 'window'},
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - {'context': 'dec74289-d650-4a97-89dc-dad68da4141c',
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'origin': 'null',
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'realm': 'e24a9d2e-651a-451d-a7e5-e51a5fc90ec3',
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'sandbox': None,
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - 'type': 'window'}]
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - second_tab_default_realm = 'e24a9d2e-651a-451d-a7e5-e51a5fc90ec3'
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - tests/web-platform/tests/webdriver/tests/bidi/script/evaluate/evaluate.py:74:
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - self = <webdriver.bidi.modules.script.Script object at 0x7fc21c1163c8>
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - kwargs = {'await_promise': True, 'expression': 'window.foo = 5', 'target': {'realm': 'e24a9d2e-651a-451d-a7e5-e51a5fc90ec3'}}
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - raw_result = True
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - params = {'awaitPromise': True, 'expression': 'window.foo = 5', 'target': {'realm': 'e24a9d2e-651a-451d-a7e5-e51a5fc90ec3'}}
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - mod_name = 'script', cmd_name = 'script.evaluate'
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - future = <Future finished exception=UnknownErrorException(unknown error, TypeError: realm is null, #getRealmInfos/<@chrome://re...es/root/script.sys.mjs:501:9
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - #getRealmInfos@chrome://remote/content/webdriver-bidi/modules/root/script.sys.mjs:499:8
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - )>
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - @functools.wraps(params_fn)
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - async def inner(self: Any, **kwargs: Any) -> Any:
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - raw_result = kwargs.pop("raw_result", False)
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - params = params_fn(self, **kwargs)
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - # Convert the classname and the method name to a bidi command name
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - mod_name = owner.__name__[0].lower() + owner.__name__[1:]
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - if hasattr(owner, "prefix"):
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - mod_name = f"{owner.prefix}:{mod_name}"
[task 2022-10-19T15:51:09.216Z] 15:51:09 INFO - cmd_name = f"{mod_name}.{to_camelcase(name)}"
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - future = await self.session.send_command(cmd_name, params)
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - > result = await future
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - E webdriver.bidi.error.UnknownErrorException: unknown error (TypeError: realm is null)
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - E
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - E Remote-end stacktrace:
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - E
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - E #getRealmInfos/<@chrome://remote/content/webdriver-bidi/modules/root/script.sys.mjs:501:9
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - E #getRealmInfos@chrome://remote/content/webdriver-bidi/modules/root/script.sys.mjs:499:8
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - cmd_name = 'script.evaluate'
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - future = <Future finished exception=UnknownErrorException(unknown error, TypeError: realm is null, #getRealmInfos/<@chrome://remote/content/webdriver-bidi/modules/root/script.sys.mjs:501:9
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - #getRealmInfos@chrome://remote/content/webdriver-bidi/modules/root/script.sys.mjs:499:8
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - )>
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - kwargs = {'await_promise': True,
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - 'expression': 'window.foo = 5',
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - 'target': {'realm': 'e24a9d2e-651a-451d-a7e5-e51a5fc90ec3'}}
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - mod_name = 'script'
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - name = 'evaluate'
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - owner = <class 'webdriver.bidi.modules.script.Script'>
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - params = {'awaitPromise': True,
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - 'expression': 'window.foo = 5',
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - 'target': {'realm': 'e24a9d2e-651a-451d-a7e5-e51a5fc90ec3'}}
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - params_fn = <function Script.evaluate at 0x7fc21d9601e0>
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - raw_result = True
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - result_fn = <function Script._evaluate at 0x7fc21d960268>
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - self = <webdriver.bidi.modules.script.Script object at 0x7fc21c1163c8>
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO -
[task 2022-10-19T15:51:09.217Z] 15:51:09 INFO - tests/web-platform/tests/tools/webdriver/webdriver/bidi/modules/_module.py:73: UnknownErrorException
[task 2022-10-19T15:51:09.218Z] 15:51:09 INFO - TEST-OK | /webdriver/tests/bidi/script/evaluate/evaluate.py | took 5628ms
Comment hidden (Intermittent Failures Robot) |
Comment 2•3 years ago
|
||
That's an interesting failure that happens here:
https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/remote/webdriver-bidi/modules/root/script.sys.mjs#501
We map over a list of realms and as such I would expect that realm
is a valid Realm
object. So why does accessing realm.context
cause unknown error (TypeError: realm is null)
?
Lets see if that happens again.
Comment hidden (Intermittent Failures Robot) |
Comment 5•3 years ago
|
||
https://wiki.mozilla.org/Bug_Triage#Intermittent_Test_Failure_Cleanup
For more information, please visit auto_nag documentation.
Reporter | ||
Comment 6•3 years ago
|
||
treeherder |
New failure instance: https://treeherder.mozilla.org/logviewer?job_id=399489456&repo=autoland
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment 9•2 years ago
|
||
https://wiki.mozilla.org/Bug_Triage#Intermittent_Test_Failure_Cleanup
For more information, please visit auto_nag documentation.
Reporter | ||
Comment 10•2 years ago
|
||
treeherder |
New failure instance: https://treeherder.mozilla.org/logviewer?job_id=418307645&repo=mozilla-beta
Comment 11•2 years ago
|
||
We have a [16] ProgressListener No navigation detected: about:blank
right before the failure, so let's block this on Bug 1832891 as well.
Comment 12•2 years ago
|
||
Just a single failure this week. Lets wait with closing this bug until Monday next week.
Comment hidden (Intermittent Failures Robot) |
Comment 14•2 years ago
|
||
This failure is potentially fixed by bug 1838382. Given that I'm unclear I'm going to mark the bug as WFM.
Description
•