• <legend id='H77BE'><style id='H77BE'><dir id='H77BE'><q id='H77BE'></q></dir></style></legend>
    <tfoot id='H77BE'></tfoot>

    1. <small id='H77BE'></small><noframes id='H77BE'>

        • <bdo id='H77BE'></bdo><ul id='H77BE'></ul>

        <i id='H77BE'><tr id='H77BE'><dt id='H77BE'><q id='H77BE'><span id='H77BE'><b id='H77BE'><form id='H77BE'><ins id='H77BE'></ins><ul id='H77BE'></ul><sub id='H77BE'></sub></form><legend id='H77BE'></legend><bdo id='H77BE'><pre id='H77BE'><center id='H77BE'></center></pre></bdo></b><th id='H77BE'></th></span></q></dt></tr></i><div id='H77BE'><tfoot id='H77BE'></tfoot><dl id='H77BE'><fieldset id='H77BE'></fieldset></dl></div>
      1. WebDriverException:消息:未知错误:Chrome 无法启动:在 debian 服务器上使用 Chrom

        时间:2023-11-08
        <i id='DA0Zg'><tr id='DA0Zg'><dt id='DA0Zg'><q id='DA0Zg'><span id='DA0Zg'><b id='DA0Zg'><form id='DA0Zg'><ins id='DA0Zg'></ins><ul id='DA0Zg'></ul><sub id='DA0Zg'></sub></form><legend id='DA0Zg'></legend><bdo id='DA0Zg'><pre id='DA0Zg'><center id='DA0Zg'></center></pre></bdo></b><th id='DA0Zg'></th></span></q></dt></tr></i><div id='DA0Zg'><tfoot id='DA0Zg'></tfoot><dl id='DA0Zg'><fieldset id='DA0Zg'></fieldset></dl></div>
          <legend id='DA0Zg'><style id='DA0Zg'><dir id='DA0Zg'><q id='DA0Zg'></q></dir></style></legend>

          <small id='DA0Zg'></small><noframes id='DA0Zg'>

                • <bdo id='DA0Zg'></bdo><ul id='DA0Zg'></ul>
                • <tfoot id='DA0Zg'></tfoot>
                    <tbody id='DA0Zg'></tbody>
                  本文介绍了WebDriverException:消息:未知错误:Chrome 无法启动:在 debian 服务器上使用 ChromeDriver Chrome 和 Selenium 异常退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我尝试在 debian 服务器 8.11 上运行 selenium webdriver 并收到错误.

                  i try to run the selenium webdriver on a debian server 8.11 and get an error.

                  Java:java 版本1.7.0_221",OpenJDK 运行时环境(IcedTea 2.6.18)

                  Java: java version "1.7.0_221", OpenJDK Runtime Environment (IcedTea 2.6.18)

                  网络驱动程序:ChromeDriver (v2.9.248304)

                  Webdriver: ChromeDriver (v2.9.248304)

                  源码:

                  from selenium import webdriver
                  from pyvirtualdisplay import Display
                  
                  display = Display(visible=0, size=(800, 800))
                  display.start()
                  co = webdriver.ChromeOptions()
                  co.add_argument("--user-data-dir=profile")
                  browser = webdriver.Chrome('/usr/local/bin/chromedriver', options=co)
                  browser.get('example.com')
                  browser.quit()
                  display.close()
                  

                  我收到此错误:

                  Traceback (most recent call last):
                    File "/bin/selenium", line 11, in <module>
                      browser = webdriver.Chrome('/usr/local/bin/chromedriver', options=co)
                    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
                      desired_capabilities=desired_capabilities)
                    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
                      self.start_session(capabilities, browser_profile)
                    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
                      response = self.execute(Command.NEW_SESSION, parameters)
                    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
                      self.error_handler.check_response(response)
                    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
                      raise exception_class(message, screen, stacktrace)
                  selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
                    (Driver info: chromedriver=2.9.248304,platform=Linux 4.9.0-0.bpo.9-amd64 x86_64)
                  

                  我尝试了几种解决方案,但没有任何效果...

                  I try several solutions but nothing works...

                  推荐答案

                  这个错误信息...

                  selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
                    (Driver info: chromedriver=2.9.248304,platform=Linux 4.9.0-0.bpo.9-amd64 x86_64)
                  

                  ...暗示 ChromeDriver 无法启动/生成新的 WebBrowserChrome 浏览器 会话.

                  ...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

                  您的主要问题是您使用的二进制文件版本之间的不兼容性,如下所示:

                  Your main issue is the incompatibility between the version of the binaries you are using as follows:

                  • 您正在使用 chromedriver=2.9
                  • chromedriver=2.9 的发行说明明确提及以下内容:

                  支持 Chrome v31-34

                  • 大概你正在使用 chrome= 76.0
                  • ChromeDriver v76.0的发行说明/a> 明确提及以下内容:
                    • Presumably you are using chrome= 76.0
                    • Release Notes of ChromeDriver v76.0 clearly mentions the following :
                    • 支持Chrome 76版

                      • 您的 Selenium 客户端 版本对我们来说是未知.
                      • 您提到JDK 版本 是1.7.0_221,相当古老.
                        • Your Selenium Client version is unknown to us.
                        • You mentioned about JDK version is 1.7.0_221 which is pretty ancient.
                        • 所以 ChromeDriver v2.9Chrome 浏览器 v76.0

                          确保:

                          • Selenium 已升级到当前级别版本 3.141.59.
                          • ChromeDriver 已更新为当前 ChromeDriver v76.0 级别.
                          • Chrome 已更新至当前 Chrome 版本 76.0 级别.(根据 ChromeDriver v76.0 发行说明)
                          • 清理你的项目工作区通过你的IDE重建你的项目只需要依赖.
                          • 如果您的基础 Web Client 版本太旧,请通过 卸载它Revo Uninstaller 并安装最新的 GA 和发布版本的 Web Client.
                          • 进行一次系统重启.
                          • 非 root 用户身份执行您的 @Test.
                          • 总是在 tearDown(){} 方法中调用 driver.quit() 来关闭 &优雅地销毁 WebDriverWeb Client 实例.
                          • Selenium is upgraded to current levels Version 3.141.59.
                          • ChromeDriver is updated to current ChromeDriver v76.0 level.
                          • Chrome is updated to current Chrome Version 76.0 level. (as per ChromeDriver v76.0 release notes)
                          • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
                          • 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.
                          • Take a System Reboot.
                          • Execute your @Test as non-root user.
                          • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

                          您可以在以下位置找到一些相关讨论:

                          You can find a couple of relevant discussions in:

                          • 消息:未知错误:Chrome 无法启动:在 AWS Cloud9 上使用 Linux 4.9.85-38.58.amzn1.x86_64 x86_64 异常退出
                          • WebDriverException:消息:未知错误:Chrome 无法启动:在 VPS 上通过 Python 使用 ChromeDriver Chrome 和 Selenium 异常退出
                          • WebDriverException:消息:未知错误:Chrome 无法启动:在 VPS 上通过 Python 使用 ChromeDriver Chrome 和 Selenium 异常退出

                          这篇关于WebDriverException:消息:未知错误:Chrome 无法启动:在 debian 服务器上使用 ChromeDriver Chrome 和 Selenium 异常退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:有没有办法判断 python 是否使用“--with-threads --enable-shared"进行配置 下一篇:如何以正确的方式将一列拆分为 2?

                  相关文章

                • <legend id='L08Cv'><style id='L08Cv'><dir id='L08Cv'><q id='L08Cv'></q></dir></style></legend>

                    1. <tfoot id='L08Cv'></tfoot>
                        <bdo id='L08Cv'></bdo><ul id='L08Cv'></ul>
                    2. <small id='L08Cv'></small><noframes id='L08Cv'>

                    3. <i id='L08Cv'><tr id='L08Cv'><dt id='L08Cv'><q id='L08Cv'><span id='L08Cv'><b id='L08Cv'><form id='L08Cv'><ins id='L08Cv'></ins><ul id='L08Cv'></ul><sub id='L08Cv'></sub></form><legend id='L08Cv'></legend><bdo id='L08Cv'><pre id='L08Cv'><center id='L08Cv'></center></pre></bdo></b><th id='L08Cv'></th></span></q></dt></tr></i><div id='L08Cv'><tfoot id='L08Cv'></tfoot><dl id='L08Cv'><fieldset id='L08Cv'></fieldset></dl></div>