Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WebDriverException exception is not properly captured #27751

Closed
WeizhongX opened this issue Feb 23, 2021 · 1 comment
Closed

WebDriverException exception is not properly captured #27751

WeizhongX opened this issue Feb 23, 2021 · 1 comment
Labels

Comments

@WeizhongX
Copy link
Contributor

When running test case: /screen-wake-lock/wakelock-enabled-by-feature-policy-attribute.https.sub.html, we met WebDriverException, and this exception is not properly captured, cause the main loop to abort early, and all test cases after that is not run.

Logs:

0:37.38 TEST_START: /screen-wake-lock/wakelock-enabled-by-feature-policy-attribute.https.sub.html
0:37.38 pid:3300609 [1614104122.962][INFO]: [d2a93f97a8acbdfdccb46bad4f73c2db] COMMAND SwitchToWindow {
0:37.38 pid:3300609 "handle": "CDwindow-7EFA0DB8D15F02AD220F368A30931715"
0:37.38 pid:3300609 }
0:37.38 pid:3300609 [1614104122.962][DEBUG]: DevTools HTTP Request: http://localhost:39447/json/list
0:37.39 pid:3300609 [1614104122.971][DEBUG]: DevTools HTTP Response: [ {
0:37.39 pid:3300609 "description": "",
0:37.39 pid:3300609 "devtoolsFrontendUrl": "https://chrome-devtools-frontend.appspot.com/serve_rev/@3eab414df490b409c19eb7da9348809b4cc9169f/inspector.html?ws=localhost:39447/devtools/page/7EFA0DB8D15F02AD220F368A30931715",
0:37.39 pid:3300609 "id": "7EFA0DB8D15F02AD220F368A30931715",
0:37.39 pid:3300609 "title": "web-platform.test:8000/testharness_runner.html",
0:37.39 pid:3300609 "type": "page",
0:37.39 pid:3300609 "url": "http://web-platform.test:8000/testharness_runner.html",
0:37.39 pid:3300609 "webSocketDebuggerUrl": "ws://localhost:39447/devtools/page/7EFA0DB8D15F02AD220F368A30931715"
0:37.39 pid:3300609 } ]
0:37.39 pid:3300609
0:37.39 pid:3300609 [1614104122.971][DEBUG]: DevTools HTTP Request: http://localhost:39447/json/activate/7EFA0DB8D15F02AD220F368A30931715
0:37.41 DEBUG Got command: u'log'
0:37.41 DEBUG Loading https://web-platform.test:8443/testharness_runner.html
0:37.41 pid:3300609 [1614104122.991][DEBUG]: DevTools HTTP Response: Target activated
0:37.41 pid:3300609 [1614104122.991][INFO]: [d2a93f97a8acbdfdccb46bad4f73c2db] RESPONSE SwitchToWindow
0:37.41 pid:3300609 [1614104122.993][INFO]: [d2a93f97a8acbdfdccb46bad4f73c2db] COMMAND Navigate {
0:37.41 pid:3300609 "url": "https://web-platform.test:8443/testharness_runner.html"
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Event: DOM.childNodeCountUpdated 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609 "childNodeCount": 2,
0:37.41 pid:3300609 "nodeId": 3
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Event: Page.loadEventFired 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609 "timestamp": 497283.055573
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Event: Page.frameStoppedLoading 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609 "frameId": "7EFA0DB8D15F02AD220F368A30931715"
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Event: DOM.documentUpdated 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Command: DOM.getDocument (id=17) 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Event: Page.domContentEventFired 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609 "timestamp": 497283.06283
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Event: Log.entryAdded 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609 "entry": {
0:37.41 pid:3300609 "level": "error",
0:37.41 pid:3300609 "networkRequestId": "9037.2",
0:37.41 pid:3300609 "source": "network",
0:37.41 pid:3300609 "text": "Failed to load resource: the server responded with a status of 404 (Not Found)",
0:37.41 pid:3300609 "timestamp": 1.614104117596569e+12,
0:37.41 pid:3300609 "url": "http://web-platform.test:8000/favicon.ico"
0:37.41 pid:3300609 }
0:37.41 pid:3300609 }
0:37.41 pid:3300609 [1614104122.993][INFO]: Waiting for pending navigations...
0:37.41 pid:3300609 [1614104122.993][INFO]: Done waiting for pending navigations. Status: ok
0:37.41 pid:3300609 [1614104122.993][DEBUG]: DevTools WebSocket Command: Page.stopLoading (id=18) 7EFA0DB8D15F02AD220F368A30931715 {
0:37.41 pid:3300609
0:37.41 pid:3300609 }
0:37.90 pid:3300609 [1614104123.466][SEVERE]: Unable to receive message from renderer
0:37.91 pid:3300609 [1614104123.494][INFO]: Waiting for pending navigations...
0:37.93 pid:3300609 [1614104123.508][INFO]: Done waiting for pending navigations. Status: disconnected: not connected to DevTools
0:37.93 pid:3300609 [1614104123.508][DEBUG]: DevTools HTTP Request: http://localhost:39447/json/list
0:37.95 pid:3300609 [1614104123.524][DEBUG]: DevTools HTTP Request failed
0:37.95 pid:3300609 [1614104123.533][INFO]: [d2a93f97a8acbdfdccb46bad4f73c2db] RESPONSE Navigate
0:37.95 pid:3300609 [1614104123.534][INFO]: [d2a93f97a8acbdfdccb46bad4f73c2db] COMMAND GetWindow {
0:37.95 pid:3300609
0:37.95 pid:3300609 }
0:37.95 pid:3300609 [1614104123.535][INFO]: resolved localhost to ["127.0.0.1"]
0:37.97 pid:3300609 [1614104123.544][DEBUG]: DevTools HTTP Request: http://localhost:39447/json/list
0:37.97 pid:3300609 [1614104123.549][DEBUG]: DevTools HTTP Request failed
0:37.98 pid:3300609 [1614104123.558][INFO]: [d2a93f97a8acbdfdccb46bad4f73c2db] RESPONSE GetWindow ERROR chrome not reachable
0:37.98 pid:3300609 (Session info: chrome=90.0.4412.0)
0:37.98 DEBUG Got command: u'log'
0:37.98 ERROR Traceback (most recent call last):
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testrunner.py", line 131, in run_test
return self.executor.run_test(test)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/base.py", line 291, in run_test
self.on_environment_change(test.environment)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/executorwebdriver.py", line 419, in on_environment_change
self.protocol.testharness.load_runner(new_environment["protocol"])
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/executorwebdriver.py", line 109, in load_runner
self.runner_handle = self.webdriver.window_handle
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 19, in inner
return func(self, *args, **kwargs)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 663, in window_handle
return self.send_session_command("GET", "window")
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 616, in send_session_command
return self.send_command(method, url, body, timeout)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 580, in send_command
raise err
WebDriverException: chrome not reachable (500): chrome not reachable
(Session info: chrome=90.0.4412.0)
 
Remote-end stacktrace:
 
#0 0x556022f5b849 base::debug::CollectStackTrace()
#1 0x556022efd1a3 base::debug::StackTrace::StackTrace()
#2 0x556022c3c1d2 Status::Status()
#3 0x556022c2cc14 DevToolsHttpClient::GetWebViewsInfo()
#4 0x556022c2d565 DevToolsHttpClient::CloseFrontends()
#5 0x556022c2edf2 base::internal::Invoker<>::Run()
#6 0x556022c28298 DevToolsClientImpl::ConnectIfNecessary()
#7 0x556022c3dad3 WebViewImpl::ConnectIfNecessary()
#8 0x556022c91dcc ExecuteGetCurrentWindowHandle()
#9 0x556022c8ba88 base::internal::Invoker<>::Run()
#10 0x556022c65216 (anonymous namespace)::ExecuteSessionCommandOnSessionThread()
#11 0x556022c66169 base::internal::Invoker<>::RunOnce()
#12 0x556022f26a46 base::TaskAnnotator::RunTask()
#13 0x556022f365ad base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#14 0x556022f3627a base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#15 0x556022f275ea base::MessagePumpDefault::Run()
#16 0x556022f36e4b base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#17 0x556022f1cb7b base::RunLoop::Run()
#18 0x556022f4d138 base::Thread::Run()
#19 0x556022f4d304 base::Thread::ThreadMain()
#20 0x556022f67b4f base::(anonymous namespace)::ThreadFunc()
#21 0x7f6ffe518ea7 start_thread
#22 0x7f6ffdfc2def clone
 
 
0:37.98 DEBUG Got command: u'error'
0:37.98 ERROR Error running command run_test with arguments (<wptrunner.wpttest.TestharnessTest /screen-wake-lock/wakelock-enabled-by-feature-policy-attribute.https.sub.html>,):
Traceback (most recent call last):
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testrunner.py", line 114, in run
rv = commandscommand
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testrunner.py", line 131, in run_test
return self.executor.run_test(test)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/base.py", line 291, in run_test
self.on_environment_change(test.environment)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/executorwebdriver.py", line 419, in on_environment_change
self.protocol.testharness.load_runner(new_environment["protocol"])
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/executorwebdriver.py", line 109, in load_runner
self.runner_handle = self.webdriver.window_handle
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 19, in inner
return func(self, *args, **kwargs)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 663, in window_handle
return self.send_session_command("GET", "window")
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 616, in send_session_command
return self.send_command(method, url, body, timeout)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py", line 580, in send_command
raise err
WebDriverException: chrome not reachable (500): chrome not reachable
(Session info: chrome=90.0.4412.0)
 
Remote-end stacktrace:
 
#0 0x556022f5b849 base::debug::CollectStackTrace()
#1 0x556022efd1a3 base::debug::StackTrace::StackTrace()
#2 0x556022c3c1d2 Status::Status()
#3 0x556022c2cc14 DevToolsHttpClient::GetWebViewsInfo()
#4 0x556022c2d565 DevToolsHttpClient::CloseFrontends()
#5 0x556022c2edf2 base::internal::Invoker<>::Run()
#6 0x556022c28298 DevToolsClientImpl::ConnectIfNecessary()
#7 0x556022c3dad3 WebViewImpl::ConnectIfNecessary()
#8 0x556022c91dcc ExecuteGetCurrentWindowHandle()
#9 0x556022c8ba88 base::internal::Invoker<>::Run()
#10 0x556022c65216 (anonymous namespace)::ExecuteSessionCommandOnSessionThread()
#11 0x556022c66169 base::internal::Invoker<>::RunOnce()
#12 0x556022f26a46 base::TaskAnnotator::RunTask()
#13 0x556022f365ad base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#14 0x556022f3627a base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#15 0x556022f275ea base::MessagePumpDefault::Run()
#16 0x556022f36e4b base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#17 0x556022f1cb7b base::RunLoop::Run()
#18 0x556022f4d138 base::Thread::Run()
#19 0x556022f4d304 base::Thread::ThreadMain()
#20 0x556022f67b4f base::(anonymous namespace)::ThreadFunc()
#21 0x7f6ffe518ea7 start_thread
#22 0x7f6ffdfc2def clone
 
(state=running)
0:37.98 ERROR Traceback (most recent call last):
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testrunner.py", line 398, in run
new_state = self.wait_event()
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testrunner.py", line 473, in wait_event
return f(*data)
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testrunner.py", line 752, in error
self.restart_runner()
File "/usr/local/google/code/chromium/src/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testrunner.py", line 730, in restart_runner
assert isinstance(self.state, RunnerManagerState.restarting)
AssertionError

@LukeZielinski
Copy link
Contributor

I think this was fixed by #27752, closing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants