出现未知错误:Chrome无法启动:异常退出.(未知错误:DevToolsActivePort文件不存在) [英] Getting unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist)

查看:161
本文介绍了出现未知错误:Chrome无法启动:异常退出.(未知错误:DevToolsActivePort文件不存在)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过带有standalone-chrome映像的docker容器运行TestNG脚本,在容器级别,chrome无法在Linux计算机上启动.

Running TestNG scripts through docker container with standlone-chrome image, at the container level chrome fails to start in Linux machine.

功能还包括:-disable-dev-shm-usage,-no-sandbox,-headless.

我尝试更新chrome驱动程序,但仍然无法正常工作.

I tried updating the chrome driver but still didn't worked.

org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

推荐答案

此处的StackOverflow新手.共享讨论中的Chrome/ChromeDriver版本会有所帮助.无论如何,我们都将其降级到了Chrome 78(+驱动程序),这个问题就消失了.似乎在较晚的版本中引入了此错误"DevToolsActivePort文件不存在".

StackOverflow newbie here. Sharing the version of Chrome/ChromeDriver under discussion would help. In any case, we back-leveled to Chrome 78 (+ Driver), and this problem went away. It appears this error "DevToolsActivePort file doesn't exist" was introduced in late builds.

一些陷阱:

  • 查找较旧的发行版可能会遇到问题;我们在此处找到了它们适用于我们的版本是Linux_x64_693954_chrome-linux.zip
  • chrome-wrapper脚本应重命名为google-chrome
  • 必须将chrome_sandbox可执行文件重命名为chrome-sandbox并更改为4755
  • 安装匹配的Chromedriver版本78(chromedriver_78.0.3904.105)
  • Finding an older release may be problematic; we found them here the version that worked for us is Linux_x64_693954_chrome-linux.zip
  • The chrome-wrapper script should be renamed to google-chrome
  • The chrome_sandbox executable must be renamed chrome-sandbox and chmodded 4755
  • Install the matching Chromedriver version 78 (chromedriver_78.0.3904.105)

这篇关于出现未知错误:Chrome无法启动:异常退出.(未知错误:DevToolsActivePort文件不存在)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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