Closed Bug 1966071 Opened 8 months ago Closed 2 months ago

Intermittent /webdriver/tests/bidi/emulation/set_geolocation_override/contexts.py | test_contexts - AssertionError: assert {'latitude': 37.41857, 'longitude': -122.08769, 'accuracy': 42} == {'code': 3}

Categories

(Remote Protocol :: WebDriver BiDi, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: intermittent-failure)

Filed by: amarc [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=507963965&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/BfjipwExSDuD2T-gaheZRQ/runs/0/artifacts/public/logs/live_backing.log


task 2025-05-13T11:42:27.091Z] 11:42:27     INFO - PID 16884 | 1747136547090	RemoteAgent	TRACE	Unregistered MessageHandler WINDOW_GLOBAL for session 1e26f6ea-54c2-44ec-8a50-6cf3847686b0
[task 2025-05-13T11:42:27.093Z] 11:42:27     INFO - PID 16884 | 1747136547093	webdriver::server	DEBUG	Teardown session
[task 2025-05-13T11:42:27.096Z] 11:42:27     INFO - PID 16884 | *** WIFI GEO: startup called.
[task 2025-05-13T11:42:27.097Z] 11:42:27     INFO - PID 16884 | *** WIFI GEO: watch called
[task 2025-05-13T11:42:27.097Z] 11:42:27     INFO - PID 16884 | *** WIFI GEO: onStatus called.wifi-timeout
[task 2025-05-13T11:42:27.098Z] 11:42:27     INFO - PID 16884 | *** WIFI GEO: Use request cache:true reason:New req. is GeoIP.
[task 2025-05-13T11:42:27.099Z] 11:42:27     INFO - PID 16884 | 1747136547097	Marionette	DEBUG	Closed connection 0
[task 2025-05-13T11:42:27.182Z] 11:42:27     INFO - PID 16884 | *** WIFI GEO: shutdown called
[task 2025-05-13T11:42:27.294Z] 11:42:27     INFO - PID 16884 | 1747136547293	geckodriver::browser	DEBUG	Browser process stopped: exit status: 0
[task 2025-05-13T11:42:27.295Z] 11:42:27     INFO - PID 16884 | 1747136547293	webdriver::server	DEBUG	<- 200 OK {"value":null}
[task 2025-05-13T11:42:27.298Z] 11:42:27     INFO - STDOUT: =================================== FAILURES ===================================
[task 2025-05-13T11:42:27.298Z] 11:42:27     INFO - STDOUT: ________________________________ test_contexts _________________________________
[task 2025-05-13T11:42:27.298Z] 11:42:27     INFO - STDOUT: bidi_session = <webdriver.bidi.client.BidiSession object at 0x7f025ad636d0>
[task 2025-05-13T11:42:27.299Z] 11:42:27     INFO - STDOUT: new_tab = {'context': '3b7dd321-cb8a-4a56-ae5c-9edec002f5eb'}
[task 2025-05-13T11:42:27.300Z] 11:42:27     INFO - STDOUT: top_context = {'children': [], 'clientWindow': '50945e51-6c1e-4100-999f-9d2018e36e22', 'context': '50c38c00-468a-4aec-8654-6889fb23e296', 'originalOpener': None, ...}
[task 2025-05-13T11:42:27.300Z] 11:42:27     INFO - STDOUT: url = <function url.<locals>.url at 0x7f025ad71790>
[task 2025-05-13T11:42:27.301Z] 11:42:27     INFO - STDOUT: get_current_geolocation = <function get_current_geolocation.<locals>.get_current_geolocation at 0x7f025ad71940>
[task 2025-05-13T11:42:27.301Z] 11:42:27     INFO - STDOUT: set_geolocation_permission = <function set_geolocation_permission.<locals>.set_geolocation_permission at 0x7f025ad71af0>
[task 2025-05-13T11:42:27.302Z] 11:42:27     INFO - STDOUT:     async def test_contexts(
[task 2025-05-13T11:42:27.302Z] 11:42:27     INFO - STDOUT:         bidi_session, new_tab, top_context, url, get_current_geolocation, set_geolocation_permission
[task 2025-05-13T11:42:27.303Z] 11:42:27     INFO - STDOUT:     ):
[task 2025-05-13T11:42:27.303Z] 11:42:27     INFO - STDOUT:         test_url = url("/common/blank.html")
[task 2025-05-13T11:42:27.304Z] 11:42:27     INFO - STDOUT:         await bidi_session.browsing_context.navigate(
[task 2025-05-13T11:42:27.304Z] 11:42:27     INFO - STDOUT:             context=new_tab["context"],
[task 2025-05-13T11:42:27.305Z] 11:42:27     INFO - STDOUT:             url=test_url,
[task 2025-05-13T11:42:27.305Z] 11:42:27     INFO - STDOUT:             wait="complete",
[task 2025-05-13T11:42:27.306Z] 11:42:27     INFO - STDOUT:         )
[task 2025-05-13T11:42:27.306Z] 11:42:27     INFO - STDOUT:         await bidi_session.browsing_context.navigate(
[task 2025-05-13T11:42:27.307Z] 11:42:27     INFO - STDOUT:             context=top_context["context"],
[task 2025-05-13T11:42:27.308Z] 11:42:27     INFO - STDOUT:             url=test_url,
[task 2025-05-13T11:42:27.308Z] 11:42:27     INFO - STDOUT:             wait="complete",
[task 2025-05-13T11:42:27.309Z] 11:42:27     INFO - STDOUT:         )
[task 2025-05-13T11:42:27.309Z] 11:42:27     INFO - STDOUT:         await set_geolocation_permission(new_tab)
[task 2025-05-13T11:42:27.310Z] 11:42:27     INFO - STDOUT:     
[task 2025-05-13T11:42:27.310Z] 11:42:27     INFO - STDOUT:         default_coordinates = await get_current_geolocation(new_tab)
[task 2025-05-13T11:42:27.311Z] 11:42:27     INFO - STDOUT:     
[task 2025-05-13T11:42:27.311Z] 11:42:27     INFO - STDOUT:         assert default_coordinates != TEST_COORDINATES
[task 2025-05-13T11:42:27.312Z] 11:42:27     INFO - STDOUT: >       assert await get_current_geolocation(top_context) == default_coordinates
[task 2025-05-13T11:42:27.312Z] 11:42:27     INFO - STDOUT: E       AssertionError: assert {'latitude': 37.41857, 'longitude': -122.08769, 'accuracy': 42} == {'code': 3}
[task 2025-05-13T11:42:27.313Z] 11:42:27     INFO - STDOUT: E         
[task 2025-05-13T11:42:27.313Z] 11:42:27     INFO - STDOUT: E         Left contains 3 more items:
[task 2025-05-13T11:42:27.314Z] 11:42:27     INFO - STDOUT: E         {'accuracy': 42, 'latitude': 37.41857, 'longitude': -122.08769}
[task 2025-05-13T11:42:27.315Z] 11:42:27     INFO - STDOUT: E         Right contains 1 more item:
[task 2025-05-13T11:42:27.315Z] 11:42:27     INFO - STDOUT: E         {'code': 3}
[task 2025-05-13T11:42:27.316Z] 11:42:27     INFO - STDOUT: E         
[task 2025-05-13T11:42:27.316Z] 11:42:27     INFO - STDOUT: E         Full diff:
[task 2025-05-13T11:42:27.316Z] 11:42:27     INFO - STDOUT: E           {
[task 2025-05-13T11:42:27.317Z] 11:42:27     INFO - STDOUT: E         -     'code': 3,
[task 2025-05-13T11:42:27.317Z] 11:42:27     INFO - STDOUT: E         +     'accuracy': 42,
[task 2025-05-13T11:42:27.318Z] 11:42:27     INFO - STDOUT: E         +     'latitude': 37.41857,
[task 2025-05-13T11:42:27.319Z] 11:42:27     INFO - STDOUT: E         +     'longitude': -122.08769,
[task 2025-05-13T11:42:27.319Z] 11:42:27     INFO - STDOUT: E           }
[task 2025-05-13T11:42:27.320Z] 11:42:27     INFO - STDOUT: bidi_session = <webdriver.bidi.client.BidiSession object at 0x7f025ad636d0>
[task 2025-05-13T11:42:27.320Z] 11:42:27     INFO - STDOUT: default_coordinates = {'code': 3}
[task 2025-05-13T11:42:27.321Z] 11:42:27     INFO - STDOUT: get_current_geolocation = <function get_current_geolocation.<locals>.get_current_geolocation at 0x7f025ad71940>
[task 2025-05-13T11:42:27.321Z] 11:42:27     INFO - STDOUT: new_tab    = {'context': '3b7dd321-cb8a-4a56-ae5c-9edec002f5eb'}
[task 2025-05-13T11:42:27.322Z] 11:42:27     INFO - STDOUT: set_geolocation_permission = <function set_geolocation_permission.<locals>.set_geolocation_permission at 0x7f025ad71af0>
[task 2025-05-13T11:42:27.322Z] 11:42:27     INFO - STDOUT: test_url   = 'https://web-platform.test:8443/common/blank.html'
[task 2025-05-13T11:42:27.323Z] 11:42:27     INFO - STDOUT: top_context = {'children': [],
[task 2025-05-13T11:42:27.323Z] 11:42:27     INFO -  'clientWindow': '50945e51-6c1e-4100-999f-9d2018e36e22',
[task 2025-05-13T11:42:27.323Z] 11:42:27     INFO -  'context': '50c38c00-468a-4aec-8654-6889fb23e296',
[task 2025-05-13T11:42:27.323Z] 11:42:27     INFO -  'originalOpener': None,
[task 2025-05-13T11:42:27.323Z] 11:42:27     INFO -  'parent': None,
[task 2025-05-13T11:42:27.323Z] 11:42:27     INFO -  'url': 'about:blank',
[task 2025-05-13T11:42:27.323Z] 11:42:27     INFO -  'userContext': 'default'}
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - 
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/bidi/emulation/set_geolocation_override/contexts.py | test_contexts - AssertionError: assert {'latitude': 37.41857, 'longitude': -122.08769, 'accuracy': 42} == {'code': 3}
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7f025ad636d0>
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - new_tab = {'context': '3b7dd321-cb8a-4a56-ae5c-9edec002f5eb'}
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - top_context = {'children': [], 'clientWindow': '50945e51-6c1e-4100-999f-9d2018e36e22', 'context': '50c38c00-468a-4aec-8654-6889fb23e296', 'originalOpener': None, ...}
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - url = <function url.<locals>.url at 0x7f025ad71790>
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - get_current_geolocation = <function get_current_geolocation.<locals>.get_current_geolocation at 0x7f025ad71940>
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - set_geolocation_permission = <function set_geolocation_permission.<locals>.set_geolocation_permission at 0x7f025ad71af0>
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO - 
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO -     async def test_contexts(
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO -         bidi_session, new_tab, top_context, url, get_current_geolocation, set_geolocation_permission
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO -     ):
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO -         test_url = url("/common/blank.html")
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO -         await bidi_session.browsing_context.navigate(
[task 2025-05-13T11:42:27.327Z] 11:42:27     INFO -             context=new_tab["context"],
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -             url=test_url,
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -             wait="complete",
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -         )
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -         await bidi_session.browsing_context.navigate(
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -             context=top_context["context"],
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -             url=test_url,
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -             wait="complete",
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -         )
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -         await set_geolocation_permission(new_tab)
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -     
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -         default_coordinates = await get_current_geolocation(new_tab)
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -     
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO -         assert default_coordinates != TEST_COORDINATES
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - >       assert await get_current_geolocation(top_context) == default_coordinates
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E       AssertionError: assert {'latitude': 37.41857, 'longitude': -122.08769, 'accuracy': 42} == {'code': 3}
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         Left contains 3 more items:
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         {'accuracy': 42, 'latitude': 37.41857, 'longitude': -122.08769}
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         Right contains 1 more item:
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         {'code': 3}
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         Full diff:
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E           {
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         -     'code': 3,
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         +     'accuracy': 42,
[task 2025-05-13T11:42:27.328Z] 11:42:27     INFO - E         +     'latitude': 37.41857,
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - E         +     'longitude': -122.08769,
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - E           }
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - 
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7f025ad636d0>
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - default_coordinates = {'code': 3}
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - get_current_geolocation = <function get_current_geolocation.<locals>.get_current_geolocation at 0x7f025ad71940>
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - new_tab    = {'context': '3b7dd321-cb8a-4a56-ae5c-9edec002f5eb'}
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - set_geolocation_permission = <function set_geolocation_permission.<locals>.set_geolocation_permission at 0x7f025ad71af0>
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - test_url   = 'https://web-platform.test:8443/common/blank.html'
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - top_context = {'children': [],
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO -  'clientWindow': '50945e51-6c1e-4100-999f-9d2018e36e22',
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO -  'context': '50c38c00-468a-4aec-8654-6889fb23e296',
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO -  'originalOpener': None,
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO -  'parent': None,
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO -  'url': 'about:blank',
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO -  'userContext': 'default'}
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - url        = <function url.<locals>.url at 0x7f025ad71790>
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - 
[task 2025-05-13T11:42:27.329Z] 11:42:27     INFO - tests/web-platform/tests/webdriver/tests/bidi/emulation/set_geolocation_override/contexts.py:30: AssertionError
[task 2025-05-13T11:42:27.330Z] 11:42:27     INFO - .
[task 2025-05-13T11:42:27.330Z] 11:42:27     INFO - TEST-OK | /webdriver/tests/bidi/emulation/set_geolocation_override/contexts.py | took 3021ms
[task 2025-05-13T11:42:27.383Z] 11:42:27     INFO - STDOUT: url        = <function url.<locals>.url at 0x7f025ad71790>
[task 2025-05-13T11:42:27.384Z] 11:42:27     INFO - STDOUT: tests/web-platform/tests/webdriver/tests/bidi/emulation/set_geolocation_override/contexts.py
[task 2025-05-13T11:42:27.384Z] 11:42:27     INFO - STDOUT: :30: AssertionError
[task 2025-05-13T11:42:27.385Z] 11:42:27     INFO - STDOUT: =========================== short test summary info ============================

Here is the excerpt from the log when this happened:
https://treeherder.mozilla.org/logviewer?job_id=507963965&repo=mozilla-central&lineNumber=41145-41154

[task 2025-05-13T11:42:25.727Z] 11:42:25     INFO - PID 16884 | 1747136545724	RemoteAgent	DEBUG	WebDriverBiDiConnection 4f0f414b-7d16-4b40-8c32-869017f19a89 -> {"id":8,"method":"script.callFunction","params":{"functionDeclaration":"(multiplier) =>\n                new Promise(\n                    resolve => window.navigator.geolocation.getCurrentPosition(\n ...     error => resolve({code: error.code}),\n                        {timeout: 500 * multiplier}\n                ))\n            ","target":{"context":"3b7dd321-cb8a-4a56-ae5c-9edec002f5eb"},"awaitPromise":true,"arguments":[{"type":"number","value":1}]}}
[task 2025-05-13T11:42:25.727Z] 11:42:25     INFO - PID 16884 | 1747136545725	RemoteAgent	TRACE	Received command script.callFunction for destination ROOT
[task 2025-05-13T11:42:25.728Z] 11:42:25     INFO - PID 16884 | 1747136545725	RemoteAgent	TRACE	Received command script.callFunctionDeclaration for destination WINDOW_GLOBAL
[task 2025-05-13T11:42:26.339Z] 11:42:26     INFO - PID 16884 | *** WIFI GEO: startup called.
[task 2025-05-13T11:42:26.340Z] 11:42:26     INFO - PID 16884 | *** WIFI GEO: watch called
[task 2025-05-13T11:42:26.341Z] 11:42:26     INFO - PID 16884 | *** WIFI GEO: onStatus called.wifi-timeout
[task 2025-05-13T11:42:26.342Z] 11:42:26     INFO - PID 16884 | *** WIFI GEO: Use request cache:false reason:No cached data
[task 2025-05-13T11:42:26.342Z] 11:42:26     INFO - PID 16884 | *** WIFI GEO: Sending request
[task 2025-05-13T11:42:26.343Z] 11:42:26     INFO - PID 16884 | *** WIFI GEO: onStatus called.xhr-start
[task 2025-05-13T11:42:26.347Z] 11:42:26     INFO - PID 16884 | 1747136546343	RemoteAgent	DEBUG	WebDriverBiDiConnection 4f0f414b-7d16-4b40-8c32-869017f19a89 <- {"type":"success","id":8,"result":{"realm":"d36f35cd-b960-4304-a36f-6ea6e37246bf","type":"success","result":{"type":"object","value":[["code",{"type":"number","value":3}]]}}}

Sasha, could you please check what this actually means? At least to get an understanding - the failure rate is still low. Thanks.

Flags: needinfo?(aborovova)

It means that request to get original geolocation coordinates failed. Looks type 3 means timeout.

Flags: needinfo?(aborovova)

(In reply to Alexandra Borovova [:Sasha] from comment #2)

It means that request to get original geolocation coordinates failed. Looks type 3 means timeout.

All these failures here actually happen for shippable or opt builds so I wonder why we are timing out on Linux only. The failure rate is not that high yet but it might be good to keep an eye on it. CC'ing Kagami in case for additional ideas why this is happening.

Summary: Intermittent /webdriver/tests/bidi/emulation/set_geolocation_override/contexts.py | test_contexts - AssertionError: assert {'latitude': 37.41857, 'longitude': -122.08769, 'accuracy': 42} == {'code': 3} | single tracking bug → Intermittent /webdriver/tests/bidi/emulation/set_geolocation_override/contexts.py | test_contexts - AssertionError: assert {'latitude': 37.41857, 'longitude': -122.08769, 'accuracy': 42} == {'code': 3}
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.