Perma late beta webdriver/tests/bidi/network/continue_with_auth/action.py | test_provideCredentials - AssertionError when Gecko 122 merges to Late Beta on 2024-01-05
Categories
(Remote Protocol :: WebDriver BiDi, defect, P1)
Tracking
(firefox-esr115 unaffected, firefox121 unaffected, firefox122+ fixed, firefox123+ fixed)
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox121 | --- | unaffected |
firefox122 | + | fixed |
firefox123 | + | fixed |
People
(Reporter: noemi_erli, Assigned: jdescottes)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [webdriver:m9])
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
Central-as-beta simulation:
How to run these simulations:
Failure log
[task 2023-12-19T12:15:18.728Z] 12:15:18 INFO - TEST-PASS | /webdriver/tests/bidi/network/continue_with_auth/action.py | test_default
[task 2023-12-19T12:15:18.729Z] 12:15:18 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/bidi/network/continue_with_auth/action.py | test_provideCredentials - AssertionError
[task 2023-12-19T12:15:18.729Z] 12:15:18 INFO - setup_blocked_request = <function setup_blocked_request.<locals>.setup_blocked_request at 0x7f83f77ac310>
[task 2023-12-19T12:15:18.730Z] 12:15:18 INFO - subscribe_events = <function subscribe_events.<locals>.subscribe_events at 0x7f83f77acb80>
[task 2023-12-19T12:15:18.730Z] 12:15:18 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7f83f77d7130>
[task 2023-12-19T12:15:18.730Z] 12:15:18 INFO - url = <function url.<locals>.url at 0x7f83f77ac040>
[task 2023-12-19T12:15:18.731Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.731Z] 12:15:18 INFO - async def test_provideCredentials(
[task 2023-12-19T12:15:18.731Z] 12:15:18 INFO - setup_blocked_request, subscribe_events, bidi_session, url
[task 2023-12-19T12:15:18.731Z] 12:15:18 INFO - ):
[task 2023-12-19T12:15:18.731Z] 12:15:18 INFO - # Setup unique username / password because browsers cache credentials.
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - username = "test_provideCredentials"
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - password = "test_provideCredentials_password"
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - request = await setup_blocked_request("authRequired", username=username, password=password)
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - # Additionally subscribe to network.responseCompleted
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - await subscribe_events(events=[RESPONSE_COMPLETED_EVENT])
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - # Track all received network.responseCompleted events in the events array
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - events = []
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - async def on_event(method, data):
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO - events.append(data)
[task 2023-12-19T12:15:18.732Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO - remove_listener = bidi_session.add_event_listener(
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO - RESPONSE_COMPLETED_EVENT, on_event
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO - )
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO - credentials = AuthCredentials(username=username, password=password)
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO - await bidi_session.network.continue_with_auth(
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO - request=request, action="provideCredentials", credentials=credentials
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO - )
[task 2023-12-19T12:15:18.733Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - wait = AsyncPoll(bidi_session, message="Didn't receive response completed events")
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - await wait.until(lambda _: len(events) >= 2)
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - assert len(events) == 2
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO -
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - > assert_response_event(
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - events[0],
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - expected_response={
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - "status": 401,
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - "statusText": "Unauthorized",
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - },
[task 2023-12-19T12:15:18.734Z] 12:15:18 INFO - )
[task 2023-12-19T12:15:18.735Z] 12:15:18 INFO -
Julian, could you please take a look at this?
Thanks.
![]() |
||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
This might be related to network.auth.use_redirect_for_retries which is only true for early beta or earlier: https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml#11333-11337
![]() |
||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
I confirm this comes from the pref mentioned above. We always get the expected number of "network.responseCompleted" events, but the status differs depending on the preference.
With the pref enabled the failed attempts have a 401 status, and only the final one has a 200 status code. With the pref disabled, all responseCompleted events have a 200 status.
This reminds me that the spec actually expects a single responseCompleted event, which might have to change in the future (see https://bugzilla.mozilla.org/show_bug.cgi?id=1826196#c2)
So I think for now I should relax the test to only wait until we get at least 1 responseCompleted event with status OK, and stop asserting the number of events and the status of previous responseCompleted events.
Comment 3•1 year ago
|
||
Set release status flags based on info from the regressing bug 1826196
Assignee | ||
Comment 4•1 year ago
|
||
Assignee | ||
Comment 5•1 year ago
|
||
Regular try push: https://treeherder.mozilla.org/jobs?repo=try&revision=7d0a81ddabcf9c9c2d52ef90aa607cb6042da26c (no idea why all xpcshell tests are orange)
Late beta simulation: https://treeherder.mozilla.org/jobs?repo=try&revision=398efdd32ec2b11954236e515432e73876685aea
Assignee | ||
Comment 6•1 year ago
|
||
Comment on attachment 9369426 [details]
Bug 1870816 - [wdspec] Do not assert each responseCompleted event in continue with auth tests
Beta/Release Uplift Approval Request
- User impact if declined: Fixes permafailure for late beta
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Test-only change
- String changes made/needed:
- Is Android affected?: No
Comment 9•1 year ago
|
||
bugherder |
Comment 11•1 year ago
|
||
Comment on attachment 9369426 [details]
Bug 1870816 - [wdspec] Do not assert each responseCompleted event in continue with auth tests
Approved for 122.0b3
Comment 12•1 year ago
|
||
uplift |
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Verified fixed in today's beta simulation
Comment 14•1 year ago
|
||
(In reply to Atila Butkovits from comment #13)
Verified fixed in today's beta simulation
Please disregard comment 13.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•