Closed Bug 1528463 Opened 9 months ago Closed 9 months ago

Perma Tier2 [TVw] /webdriver/tests/send_alert_text/send.py | test_alert_unsupported_operation - UnknownErrorException: unknown error (500): Reached error page: about:neterror?e=fileNotFound&u=http%3A//web-platform.test%3A8000/webdriver/tests/support/authe

Categories

(Testing :: geckodriver, defect, P2)

Version 3
defect

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

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

References

Details

(Whiteboard: [stockwell needswork:owner][wptsync upstream])

Attachments

(2 files, 1 obsolete file)

#[markdown(off)]
Filed by: nbeleuzu [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=228813647&repo=autoland

https://queue.taskcluster.net/v1/task/UkJuOcRVSIyQPy3D6G8ykw/runs/0/artifacts/public/logs/live_backing.log

02:43:03 INFO - TEST-PASS | /webdriver/tests/send_alert_text/send.py | test_alert_element_not_interactable[confirm]
02:43:03 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/send_alert_text/send.py | test_alert_unsupported_operation - UnknownErrorException: unknown error (500): Reached error page: about:neterror?e=fileNotFound&u=http%3A//web-platform.test%3A8000/webdriver/tests/support/authentication.py&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20file%20at%20http%3A//web-platform.test%3A8000/webdriver/tests/support/authentication.py.
02:43:03 INFO - session = <Session aebf7d58-196c-7748-ba6c-7124a7e3cdd8>
02:43:03 INFO -
02:43:03 INFO - def test_alert_unsupported_operation(session):
02:43:03 INFO - > session.url = basic_authentication()
02:43:03 INFO -
02:43:03 INFO - session = <Session aebf7d58-196c-7748-ba6c-7124a7e3cdd8>
02:43:03 INFO -
02:43:03 INFO - tests/web-platform/tests/webdriver/tests/send_alert_text/send.py:60:
02:43:03 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
02:43:03 INFO - tests/web-platform/tests/tools/webdriver/webdriver/client.py:20: in inner
02:43:03 INFO - return func(self, *args, **kwargs)
02:43:03 INFO - tests/web-platform/tests/tools/webdriver/webdriver/client.py:521: in url
02:43:03 INFO - return self.send_session_command("POST", "url", body)
02:43:03 INFO - tests/web-platform/tests/tools/webdriver/webdriver/client.py:508: in send_session_command
02:43:03 INFO - return self.send_command(method, url, body)
02:43:03 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
02:43:03 INFO -
02:43:03 INFO - self = <Session aebf7d58-196c-7748-ba6c-7124a7e3cdd8>, method = 'POST'
02:43:03 INFO - url = 'session/aebf7d58-196c-7748-ba6c-7124a7e3cdd8/url'
02:43:03 INFO - body = {'url': 'http://web-platform.test:8000/webdriver/tests/support/authentication.py'}
02:43:03 INFO -
02:43:03 INFO - def send_command(self, method, url, body=None):
02:43:03 INFO - """
02:43:03 INFO - Send a command to the remote end and validate its success.
02:43:03 INFO -
02:43:03 INFO - :param method: HTTP method to use in request.
02:43:03 INFO - :param uri: "Command part" of the HTTP request URL,
02:43:03 INFO - e.g. `window/rect`.
02:43:03 INFO - :param body: Optional body of the HTTP request.
02:43:03 INFO -
02:43:03 INFO - :return: `None` if the HTTP response body was empty, otherwise
02:43:03 INFO - the `value` field returned after parsing the response
02:43:03 INFO - body as JSON.
02:43:03 INFO -
02:43:03 INFO - :raises error.WebDriverException: If the remote end returns
02:43:03 INFO - an error.
02:43:03 INFO - :raises ValueError: If the response body does not contain a
02:43:03 INFO - `value` key.
02:43:03 INFO - """
02:43:03 INFO - response = self.transport.send(
02:43:03 INFO - method, url, body,
02:43:03 INFO - encoder=protocol.Encoder, decoder=protocol.Decoder,
02:43:03 INFO - session=self)
02:43:03 INFO -
02:43:03 INFO - if response.status != 200:
02:43:03 INFO - err = error.from_response(response)
02:43:03 INFO -

Started when bug 1502360 landed.

Blocks: 1502360
See Also: → 1528462
Whiteboard: [stockwell needswork:owner]

Interestingly this is test-verify only. I will have a look at this failure today. It's not a regression because it is a new test.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Keywords: regression
Blocks: 1528462

I can reproduce it locally that after a lot of iterations Firefox is not able to load the basic authentication page and fails with:

about:neterror?e=fileNotFound&u=http%3A//web-platform.test%3A8000/webdriver/tests/support/authentication.py

I have never seen such a failure before. So could this be a problem with wptserve? James have you seen that anytime before?

I will try to further investigate it.

Flags: needinfo?(james)

The basic_authentication helper actually uses the identical setup logic as inline, and I actually never have seen such a failure for the latter.

https://searchfox.org/mozilla-central/source/testing/web-platform/tests/webdriver/tests/support/authentication.py

Something seems to be wrong with the response of the test page, or Firefox handles it inappropriately. Whenever I close the HTTP auth dialog, the 404 net error page is shown.

Given that this was just a copy from another example under /testing/web-platform-tests I wonder what's wrong here.

This actually looks like a bug in Firefox. When I load the same page in Chrome or Safari it works. I will do a regression test now.

Flags: needinfo?(james)
Attached file HTTP log

While dev tools show that we return a 401 Unauthorized, Firefox itself shows a 404 page after canceling the Basic HTTP Auth dialog. I attached a HTTP log which might help to see what's going on.

Valentin, would you be so kind and have a look at it? I currently don't see what's wrong with the test [1], given that also in other browsers it works fine but not in Firefox down to ESR60 at least (more I haven't tested)

To reproduce it yourself just add the following two lines at the end of the test, and rename the prefix of all other functions to tst_.

import time
time.sleep(2000)

Then you have about 60s time until the harness runs into a timeout.

Thanks a lot!

[1] https://searchfox.org/mozilla-central/rev/05d4b6962a571585bd679d2bbb0df0a5fb4e4eff/testing/web-platform/tests/webdriver/tests/send_alert_text/send.py#59

Flags: needinfo?(valentin.gosu)

I noticed that the same testcase works perfectly fine with running it as part of the Marionette unit tests. So I wondered what's different, and when checking the authentication handler in httpd.py the data is not returned but the response argument gets updated:

https://searchfox.org/mozilla-central/source/testing/marionette/harness/marionette_harness/runner/httpd.py#36

When I do the same here for webdriver tests it works all fine.

James, I wonder if other files under testing/web-platform need an update too:

https://searchfox.org/mozilla-central/search?q=authentication.py&path=

I will leave the needinfo flag for Valentin given that there is a difference between browsers which might be good to get investigated.

Flags: needinfo?(james)

Note that verify jobs would still fail because due to bug 377496 landed in Firefox 67 there is a rate limit for authentication dialogs set to 3, and verify jobs run a test 5 or more times. As such I added another commit which runs each of the tests in its own tab, which will prevent this rate limit.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=777cc4a9f8a599222be2e6880f89c7410473028b

Priority: P5 → P2
Duplicate of this bug: 1528462

To prevent possible rate limits by the browser when running the
tests in verify mode, each test should run in its own tab.

Attachment #9044880 - Attachment is obsolete: true
See Also: → 1529069
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/83a92a1a4986
[wdspec] Run each "Send Alert Text" in its own tab. r=jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/15473 for changes under testing/web-platform/tests
Whiteboard: [stockwell needswork:owner] → [stockwell needswork:owner][wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Upstream PR merged
Flags: needinfo?(valentin.gosu)
Flags: needinfo?(james)
You need to log in before you can comment on or make changes to this bug.