Closed Bug 1658384 Opened 5 years ago Closed 5 years ago

Intermittent /webdriver/tests/get_named_cookie/get.py | test_get_cookie_with_same_site_flag[capabilities0-Lax] - InsecureCertificateException: insecure certificate (400):

Categories

(Remote Protocol :: Marionette, defect, P5)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure)

Filed by: rmaries [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=312628701&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/bFiP6ll4R66jdtI40U5dNg/runs/0/artifacts/public/logs/live_backing.log


[task 2020-08-10T18:38:05.310Z] 18:38:05 INFO - TEST-START | /webdriver/tests/get_named_cookie/get.py
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - TEST-PASS | /webdriver/tests/get_named_cookie/get.py | test_get_cookie_with_same_site_flag[capabilities0-None]
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/get_named_cookie/get.py | test_get_cookie_with_same_site_flag[capabilities0-Lax] - InsecureCertificateException: insecure certificate (400):
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - session = <Session 745d6392-4d9e-4312-b4dd-2a418e9d4884>
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - url = <function url at 0x7fa88f278dd0>, same_site = 'Lax'
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO -
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - @pytest.mark.parametrize("same_site", ["None", "Lax", "Strict"])
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - @pytest.mark.capabilities({"acceptInsecureCerts": True})
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - def test_get_cookie_with_same_site_flag(session, url, same_site):
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO - > session.url = url("/common/blank.html", protocol="https")
[task 2020-08-10T18:38:14.474Z] 18:38:14 INFO -
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - same_site = 'Lax'
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - session = <Session 745d6392-4d9e-4312-b4dd-2a418e9d4884>
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - url = <function url at 0x7fa88f278dd0>
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO -
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - tests/web-platform/tests/webdriver/tests/get_named_cookie/get.py:124:
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - tests/web-platform/tests/tools/webdriver/webdriver/client.py:19: in inner
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - return func(self, *args, **kwargs)
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - tests/web-platform/tests/tools/webdriver/webdriver/client.py:536: in url
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - return self.send_session_command("POST", "url", body)
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - tests/web-platform/tests/tools/webdriver/webdriver/client.py:523: in send_session_command
[task 2020-08-10T18:38:14.475Z] 18:38:14 INFO - return self.send_command(method, url, body, timeout)

By default we accept insecure certificates, so not sure why this load failed. Lets observe for some days.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Here the failing lines from a debug build:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=313504662&repo=autoland&lineNumber=37765-37773

In cases when it fails we make use of port 8443:

1597885713367   Marionette  DEBUG   6 -> [0,38,"WebDriver:Navigate",{"url":"https://web-platform.test:8443/common/blank.html"}]
1597885713375   Marionette  TRACE   [17] Received DOM event beforeunload for about:certerror?e=nssBadCert&u=https%3A//web-platform.test%3A8443/common/blank.html&c=UTF-8&d=%20
1597885713394   Marionette  TRACE   [17] Received DOM event beforeunload for about:certerror?e=nssBadCert&u=https%3A//web-platform.test%3A8443/common/blank.html&c=UTF-8&d=%20
1597885713410   Marionette  TRACE   [17] Received DOM event pagehide for about:certerror?e=nssBadCert&u=https%3A//web-platform.test%3A8443/common/blank.html&c=UTF-8&d=%20
1597885713412   Marionette  TRACE   [17] Received DOM event unload for about:certerror?e=nssBadCert&u=https%3A//web-platform.test%3A8443/common/blank.html&c=UTF-8&d=%20
[Child 12889, Main Thread] WARNING: Scrolled rect smaller than scrollport?: file /builds/worker/checkouts/gecko/layout/generic/nsGfxScrollFrame.cpp, line 6820
1597885713488   Marionette  TRACE   [17] Received DOM event DOMContentLoaded for about:certerror?e=nssBadCert&u=https%3A//web-platform.test%3A8443/common/blank.html&c=UTF-8&d=%20
1597885713492   Marionette  DEBUG   6 <- [1,38,{"error":"insecure certificate","message":"","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nI ... adyState@chrome://marionette/content/listener.js:295:21\nhandleEvent@chrome://marionette/content/listener.js:266:14\n"},null]
1597885713492   webdriver::server   DEBUG   <- 400 Bad Request {"value":{"error":"insecure certificate","message":"","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nInsecureCertificateError@chrome://marionette/content/error.js:296:5\nhandleReadyState@chrome://marionette/content/listener.js:295:21\nhandleEvent@chrome://marionette/content/listener.js:266:14\n"}}

Whereby when it passes, port 8000 is used:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=313504662&repo=autoland&lineNumber=37133-37138

1597885702929   Marionette  DEBUG   1 -> [0,70,"WebDriver:Navigate",{"url":"http://web-platform.test:8000/webdriver/tests/support/inline.py?doc=%3C%21doctype+html%3E% ... 7hello%3Dnewworld%3B+domain%3Dweb-platform.test%3B+path%3D%2F%27%3B%0A++++++%3C%2Fscript%3E&charset=UTF-8&mime=text%2Fhtml"}]
1597885702937   Marionette  TRACE   [17] Received DOM event beforeunload for http://web-platform.test:8000/common/blank.html
1597885702960   Marionette  TRACE   [17] Received DOM event pagehide for http://web-platform.test:8000/common/blank.html
1597885702978   Marionette  TRACE   [17] Received DOM event DOMContentLoaded for http://web-platform.test:8000/webdriver/tests/support/inline.py?doc=%3C%21doctype+html%3E%0A%3Cmeta+charset%3DUTF-8%3E%0A%0A+ ... +%27hello%3Dnewworld%3B+domain%3Dweb-platform.test%3B+path%3D%2F%27%3B%0A++++++%3C%2Fscript%3E&charset=UTF-8&mime=text%2Fhtml
1597885703009   Marionette  TRACE   [17] Received DOM event pageshow for http://web-platform.test:8000/webdriver/tests/support/inline.py?doc=%3C%21doctype+html%3E%0A%3Cmeta+charset%3DUTF-8%3E%0A%0A+ ... +%27hello%3Dnewworld%3B+domain%3Dweb-platform.test%3B+path%3D%2F%27%3B%0A++++++%3C%2Fscript%3E&charset=UTF-8&mime=text%2Fhtml
1597885703010   Marionette  DEBUG   1 <- [1,70,null,{"value":null}]

The URL is constructed via:

url("/common/blank.html", protocol="https")

Also the test sets acceptInsecureCerts to true so I would expect to not see such a failure at all.

In the full log I can see at the beginning:

[task 2020-08-20T01:02:05.975Z] 01:02:05     INFO - Starting https server on 127.0.0.1:8444
[task 2020-08-20T01:02:05.975Z] 01:02:05     INFO - Starting https server on 127.0.0.1:8443

So SSL clearly runs on port 8443.

So maybe our certOverrideService doesn't work correctly in Marionette? Maybe even the same as we see on bug 1582736.

Depends on: 1582736

With bug 1582736 we only modified the test. Awaiting more details on that bug if more investigation needs to be done. Will do a follow-up bug if needed. Otherwise we can continue here.

No longer depends on: 1582736
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Moving bug to Remote Protocol::Marionette component per bug 1815831.
Component: geckodriver → Marionette
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.