简体   繁体   English

selenium.common.exceptions.WebDriverException:消息:未知错误:无法使用镓和Docker杀死Chrome错误

[英]selenium.common.exceptions.WebDriverException: Message: unknown error: cannot kill Chrome error with gallium and Docker

After each scenario run our tests will do .quit() on the remote webdriver - 在每个方案运行之后,我们的测试将在远程Webdriver上执行.quit()-

 Quits the driver and closes every associated window.

Running tests in docker containers (selenium hub and selenium-chrome version 3.14.0-gallium 在Docker容器中运行测试( Selenium Hub和Selenium- chrome版本3.14.0-gallium

All of the tests are passing am getting a false negative because there are WebDriver Exceptions. 由于存在WebDriver异常,因此所有测试通过均得到假阴性。

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot kill Chrome
  (Session info: chrome=69.0.3497.100)
  (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.14.67-coreos x86_64)

this is traced back to 这可以追溯到

python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 606, in quit
    self.execute(Command.QUIT)

the Chromedriver and chrome version are supposed to be compatible per documentation. Chromedriver和chrome版本应该按照说明文件兼容。

This error message... 此错误消息...

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot kill Chrome

...implies that the Chrome Browser process was not cleanly killed . ...暗示Chrome浏览器进程并未被彻底终止


Analysis 分析

As per Zombie docker containers with chrome:59 this issue was pretty much evident with selenoid and Docker . 根据带有chrome:59的Zombie docker容器,这个问题在selenoidDocker中非常明显。

@IvanKrutov further confirmed that: @IvanKrutov进一步确认:

Some issues with container removal still exist in Docker. Docker中仍然存在一些与容器删除有关的问题。

Where even trying to terminate a zombie container via docker rm -f doesn't seem to work and is confirmed to be a Docker issue. 即使试图通过docker rm -f终止僵尸容器的地方似乎也不起作用,并且被确认是Docker问题。


Solution

The only way to remove containers is to unmount filesystems, ie remove /var/lib/aufs and restart docker . 删除容器的唯一方法是卸载文件系统,即删除/var/lib/aufs and restart docker


tl;dr TL;博士

From another perspective, as per Chrome.exe still running in background, Chrome will not relaunch upon closing : 从另一个角度看,由于仍在后台运行的Chrome.exe,Chrome在关闭时将不会重新启动

  • Chrome was not relaunching after closing Chrome. 关闭Chrome后,Chrome没有重新启动。
  • It was observed that chrome.exe is still running as a process in the Task Manager . 据观察, chrome.exe仍在任务管理器中作为进程运行。
  • Force closing Chrome.exe will allow Chrome to launch again, but otherwise Chrome will not launch. 强制关闭Chrome.exe将允许Chrome重新启动,否则Chrome将无法启动。
  • This issue seems to have re-surfaced again since Google Chrome Version 69.0.3497.100 (Official Build) (64-bit) was released and is still continues to occur with Google Chrome Version 70.x which was recently pushed. 自从发布Google Chrome版本69.0.3497.100(正式版本)(64位)以来,这个问题似乎再次浮出水面,而最近推出的Google Chrome版本70.x仍然存在。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Selenium.common.exceptions.WebDriverException:消息:未知错误:没有 chrome 二进制文件 - Selenium.common.exceptions.WebDriverException: Message: unknown error: no chrome binary Selenium 在 Mac 上给出“selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” - Selenium gives "selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary" on Mac selenium.common.exceptions.WebDriverException:消息:未知错误:无法在 localhost:8733 \\\\ 连接到 chrome 怎么回事? - selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at localhost:8733 \\\\ What's going on? selenium.common.exceptions.WebDriverException:消息:未知错误:无法使用 ChromeDriver Chrome Selenium 创建 Chrome 进程错误 - selenium.common.exceptions.WebDriverException: Message: unknown error: Failed to create a Chrome process error with ChromeDriver Chrome Selenium selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome无法以Selenium和RaspberryPi上的Chrome启动 - selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start with Selenium and Chrome on RaspberryPi selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome无法启动:使用ChromeDriver Chrome和Selenium异常退出 - selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally with ChromeDriver Chrome and Selenium selenium.common.exceptions.WebDriverException:消息:未知错误:无法使用带有Selenium Python的ChromeDriver Chrome创建Chrome进程 - selenium.common.exceptions.WebDriverException: Message: unknown error: Failed to create Chrome process with ChromeDriver Chrome with Selenium Python raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException:消息:未知错误:找不到 Chrome 二进制文件 - raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome 无法启动:在 Python 中使用 ChromeDriver 和 Selenium 崩溃 - selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed with ChromeDriver and Selenium in Python selenium.common.exceptions.WebDriverException:消息:未知错误:无法使用 OperaDriver Selenium 和 Python 找到 Opera 二进制文件 - selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Opera binary with OperaDriver Selenium and Python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM