chrome-driver 83 与 Ubuntu 的兼容性 [英] chrome-driver 83 compatibility with Ubuntu

查看:35
本文介绍了chrome-driver 83 与 Ubuntu 的兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 Ubuntu 18.04.1 LTS 并成功使用稳定版本的 Google Chrome v81 和兼容的 chrome-driver v81.将 google-chrome-stable 重新安装到 83.0.4103.61 并将 chrome-driver 更新到 83.0.4103.39 后.根据官方页面,它们完全兼容.但是在这些更新之后,我收到错误 unable to connect to renderer.

I'm running Ubuntu 18.04.1 LTS and used stable versions of Google Chrome v81 and compatible chrome-driver v81 for a long time successfully. After reinstalling google-chrome-stable up to 83.0.4103.61 and updating chrome-driver up to 83.0.4103.39. According to the official page they are fully compatible. But after these updates I'm getting error unable to connect to renderer.

我的能力保持不变:

  capabilities: {
    browserName: 'chrome',
    chromeOptions: {
      args: [
        '--headless',
        '--disable-gpu',
        '--no-sandbox',
        '--remote-debugging-port=9222',
        '--ignore-certificate-errors',
        '--allow-insecure-localhost'
      ]
    }
  }

完整的错误信息如下:

[11:07:05] E/launcher - session not created
from disconnected: unable to connect to renderer
  (Session info: headless chrome=83.0.4103.61)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '******', ip: '******', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-38-generic', java.version: '10.0.2'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5633488fb579 <unknown>

我的 webdriver-manager 状态:

My webdriver-manager status:

[11:24:59] I/status - selenium standalone version available: 3.141.59 [last]
[11:24:59] I/status - chromedriver version available: 83.0.4103.39 [last]
[11:24:59] I/status - geckodriver version available: v0.26.0 [last]
[11:24:59] I/status - android-sdk is not present
[11:24:59] I/status - appium is not present

有没有人遇到过同样的问题并且知道如何解决它或正确回滚到 v81?任何建议将不胜感激.

Does anybody faced the same issue and knowing how to solve it or rollback to v81 correctly? Any suggestions will be appreciated.

附言1) 相同的配置在最新的 MacOS 本地运行良好 2) 我没有成功启动带有驱动程序 v81 的 chromium-browser v81,可能以错误的方式进行了回滚.

P.S. 1) the same config works well locally on the latest MacOS 2) I didn't succeed to launch chromium-browser v81 with driver v81, probably did the rollback in a wrong way.

推荐答案

问题已解决.问题是我使用了参数 --remote-debugging-port=9222.但有一天 google-chrome 进程被卡住了并占用了端口.因此,当 chromedriver 启动 google-chrome 时,它​​无法访问繁忙的端口以进行调试,而只是无错误地退出.这就是 chromedriver 无法访问 google-chrome 并发送 unable to connect to renderer 错误的原因.解决办法是:

The issue is resolved. The problem was that I was using argument --remote-debugging-port=9222. But someday google-chrome process got stuck deadly and occupied the port. So, when the chromedriver starts the google-chrome it can't get access to busy port for debugging purposes and simply exits with no errors. That's why the chromedriver can't get access to google-chrome and sends unable to connect to renderer error. The solution is:

  • 杀死占用端口的冻结进程
  • 在你真正需要的时候使用调试端口
  • 使用与 chromedriver 的直接连接减少了层数",从而提高了整体稳定性

这篇关于chrome-driver 83 与 Ubuntu 的兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆