简体   繁体   English

未知错误:通过 Selenium 使用 ChromeDriver Chrome 在 Jenkins 上尝试 Maven 测试时找不到 Chrome 二进制文件

[英]unknown error: cannot find Chrome binary while attempting Maven test on Jenkins using ChromeDriver Chrome through Selenium

Had been trying to configure and have met with a lot of trouble, tried a lot of attempt but failed.一直在尝试配置,遇到了很多麻烦,尝试了很多尝试但都失败了。

  • chromedriver=2.30.477691铬驱动程序= 2.30.477691
  • Chrome 59.0.3071.115铬 59.0.3071.115
  • Build info: version: '3.14.0'构建信息:版本:'3.14.0'
  • Selenium 3.4硒 3.4
  • java.version: '1.8.0_121' java.version: '1.8.0_121'
  • Linux 3.10.0-229.4.2.el7.x86_64 x86_64 Linux 3.10.0-229.4.2.el7.x86_64 x86_64

Error:错误:

unknown error: cannot find Chrome binary   (Driver info: chromedriver=2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57),platform=Linux 3.10.0-229.4.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 59 milliseconds Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' System info: host: '8f5b40c32460', ip: 'x', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-229.4.2.el7.x86_64', java.version: '1.8.0_121' Driver info: driver.version: ChromeDriver

This error message...这个错误信息...

unknown error: cannot find Chrome binary   (Driver info: chromedriver=2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57),platform=Linux 3.10.0-229.4.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 59 milliseconds Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' System info: host: '8f5b40c32460', ip: 'x', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-229.4.2.el7.x86_64', java.version: '1.8.0_121' Driver info: driver.version: ChromeDriver

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context ie Chrome Browser session. ...暗示ChromeDriver无法启动/生成新的浏览上下文,Chrome 浏览器会话。

Your main issue is the incompatibility between the version of the binaries you are using as follows:您的主要问题是您使用的二进制文件版本之间的不兼容,如下所示:

  • You are using chromedriver=2.30您正在使用chromedriver=2.30
  • Release Notes of chromedriver=2.30 clearly mentions the following : chromedriver=2.30 的发行说明清楚地提到了以下内容:

Supports Chrome v58-60支持Chrome v58-60

  • You are using chrome=59.0您正在使用chrome=59.0
  • Your Selenium Client version is 3.14.0 of 2018-08-02T20:19:58.91Z which is almost 2.5 years older.您的Selenium Client版本是2018-08-02T20 :19:58.91Z 的 3.14.0它早了将近2.5年。
  • Your JDK version is 1.8.0_121 which is pretty ancient.您的JDK 版本1.8.0_121 ,这是非常古老的。

So there is a clear mismatch between JDK v8u121 , Selenium Client v3.14.1 , ChromeDriver v2.30 and the Chrome Browser v59.0因此, JDK v8u121Selenium Client v3.14.1ChromeDriver v2.30Chrome Browser v59.0之间存在明显的不匹配


Solution解决方案

Ensure that:确保这件事:

  • JDK is upgraded to current levels JDK 8u232 . JDK升级到当前级别JDK 8u232
  • Selenium is upgraded to current levels Version 3.141.59 . Selenium升级到当前级别Version 3.141.59
  • ChromeDriver is updated to current ChromeDriver v79.0.3945.36 level. ChromeDriver更新到当前ChromeDriver v79.0.3945.36级别。
  • Chrome is updated to current Chrome Version 79.0 level. Chrome已更新到当前Chrome 版本 79.0级别。 (as per ChromeDriver v79.0 release notes ) (根据ChromeDriver v79.0 发行说明
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.通过IDE清理项目工作区并仅使用所需的依赖项重建项目。
  • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client .如果您的基本Web Client版本太旧,请通过Revo Uninstaller卸载它并安装最新的 GA 和发布版本的Web Client
  • Take a System Reboot .进行系统重启
  • Execute your @Test as non-root user.非 root用户身份执行@Test
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.始终在tearDown(){}方法中调用driver.quit()以优雅地关闭和销毁WebDriverWeb Client实例。

暂无
暂无

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

相关问题 WebDriverException:消息:未知错误:Chrome 无法启动:在 Amazon Linux 上通过 Selenium Python 使用 ChromeDriver Chrome 出现崩溃错误 - WebDriverException: Message: unknown error: Chrome failed to start: crashed error using ChromeDriver Chrome through Selenium Python on Amazon Linux 如何在Amazon Linux上使用带有chrome驱动程序的selenium。 错误:Selenium :: WebDriver :: Error :: UnknownError:未知错误:找不到Chrome二进制文件 - How to use selenium with chrome driver on Amazon Linux. error: Selenium::WebDriver::Error::UnknownError: unknown error: cannot find Chrome binary 在heroku上使用chrome驱动程序运行selenium:`找不到Chrome二进制文件 - run selenium with chrome driver on heroku: `cannot find Chrome binary` 使用chromedriver 2.20和Selenium Server 2.48.2,测试失败,并显示错误“ Chrome无法启动:异常退出” - Using chromedriver 2.20 and selenium server 2.48.2, test fails with error “Chrome failed to start: exited abnormally” 在 Python 中通过 chromedriver 设置 chrome 浏览器二进制文件 - Set chrome browser binary through chromedriver in Python E2E 测试失败错误:在 Linux 中找不到 chrome 二进制文件 - E2E test fail error: cannot find chrome binary in Linux selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome 无法启动:Chromedriver 2.26 异常退出错误 Selenium - selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally error with Chromedriver 2.26 Selenium 无法通过詹金斯打开Chrome浏览器-未知错误:Chrome无法启动:崩溃 - Not able to open the Chrome Browser through jenkins — unknown error: Chrome failed to start: crashed 在Linux平台上无法通过Jenkins中的Selenium启动Chrome浏览器 - Unable to launch Chrome browser through Selenium in Jenkins on Linux platform Python:Selenium-消息:未知错误:Chrome无法启动:异常退出 - Python : Selenium - Message: unknown error: Chrome failed to start: exited abnormally
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM