簡體   English   中英

selenium.common.exceptions.WebDriverException:消息:未知錯誤:無法使用鎵和Docker殺死Chrome錯誤

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

在每個方案運行之后,我們的測試將在遠程Webdriver上執行.quit()-

 Quits the driver and closes every associated window.

在Docker容器中運行測試( Selenium Hub和Selenium- chrome版本3.14.0-gallium

由於存在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)

這可以追溯到

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

Chromedriver和chrome版本應該按照說明文件兼容。

此錯誤消息...

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

...暗示Chrome瀏覽器進程並未被徹底終止


分析

根據帶有chrome:59的Zombie docker容器,這個問題在selenoidDocker中非常明顯。

@IvanKrutov進一步確認:

Docker中仍然存在一些與容器刪除有關的問題。

即使試圖通過docker rm -f終止僵屍容器的地方似乎也不起作用,並且被確認是Docker問題。


刪除容器的唯一方法是卸載文件系統,即刪除/var/lib/aufs and restart docker


TL;博士

從另一個角度看,由於仍在后台運行的Chrome.exe,Chrome在關閉時將不會重新啟動

  • 關閉Chrome后,Chrome沒有重新啟動。
  • 據觀察, chrome.exe仍在任務管理器中作為進程運行。
  • 強制關閉Chrome.exe將允許Chrome重新啟動,否則Chrome將無法啟動。
  • 自從發布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 在 Mac 上給出“selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary” selenium.common.exceptions.WebDriverException:消息:未知錯誤:無法在 localhost:8733 \\\\ 連接到 chrome 怎么回事? selenium.common.exceptions.WebDriverException:消息:未知錯誤:無法使用 ChromeDriver Chrome Selenium 創建 Chrome 進程錯誤 selenium.common.exceptions.WebDriverException:消息:未知錯誤:Chrome無法以Selenium和RaspberryPi上的Chrome啟動 selenium.common.exceptions.WebDriverException:消息:未知錯誤:Chrome無法啟動:使用ChromeDriver Chrome和Selenium異常退出 selenium.common.exceptions.WebDriverException:消息:未知錯誤:無法使用帶有Selenium Python的ChromeDriver Chrome創建Chrome進程 raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException:消息:未知錯誤:找不到 Chrome 二進制文件 selenium.common.exceptions.WebDriverException:消息:未知錯誤:Chrome 無法啟動:在 Python 中使用 ChromeDriver 和 Selenium 崩潰 selenium.common.exceptions.WebDriverException:消息:未知錯誤:無法使用 OperaDriver Selenium 和 Python 找到 Opera 二進制文件
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM