chrome-driver 83 compatibility with Ubuntu

拟墨画扇 提交于 2020-06-17 04:44:19

问题


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.

My capabilities remains the same:

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

And full error message is the following:

[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>

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

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

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.


回答1:


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:

  • kill frozen processes that occupy ports
  • use debugging-port when you really need it
  • using direct connection to the chromedriver reduces "layers" so the overall stability was improved


来源:https://stackoverflow.com/questions/62039900/chrome-driver-83-compatibility-with-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!