简体   繁体   English

jenkins 和 Ubuntu 18.04.3 上的 chrome 崩溃错误

[英]chrome crashed error on jenkins and Ubuntu 18.04.3

unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'QA-Ubuntu-Droplet', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-66-generic', java.version: '1.8.0_252'
Driver info: driver.version: ChromeDriver
remote stacktrace: #0 0x5585ac7a25b9 <unknown>

My Code for chrome:我的 chrome 代码:

            ChromeOptions options = new ChromeOptions();
            options.setExperimentalOption("prefs", chromePrefs);
            DesiredCapabilities cap = DesiredCapabilities.chrome();
            cap.setJavascriptEnabled(true);
            cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
            cap.setCapability(ChromeOptions.CAPABILITY, options);
            System.setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
            options.addArguments("--start-maximized");
            options.addArguments("--headless");
            options.addArguments("--window-size=1366,768");
            options.addArguments("--no-sandbox");
            driver = new ChromeDriver(options);

I have also run command chmod +x chromedriver and chmod +x google-chrome .我还运行了命令chmod +x chromedriverchmod +x google-chrome

Have look at lot of different answers and applied all the possible solutions but still error persists.查看了许多不同的答案并应用了所有可能的解决方案,但仍然存在错误。

Try with adding additional arguments:尝试添加额外的 arguments:

--disable-dev-shm-usage
--disable-gpu

暂无
暂无

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

相关问题 org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed using ChromeDriver Selenium in Jenkins on Ubuntu 18.04 - org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed using ChromeDriver Selenium in Jenkins on Ubuntu 18.04 Jenkins:WebDriver连接被拒绝(Firefox)/ Chrome无法启动:崩溃(Chrome) - Jenkins: WebDriver connection refused (Firefox) / Chrome failed to start: crashed (Chrome) Ubuntu Slave Node(Jenkins)错误 - Ubuntu Slave Node (Jenkins) Error 未知错误:Chrome无法启动:崩溃(硒,无头模式) - unknown error: Chrome failed to start: crashed(selenium ,headless mode) 您可以在 GCP 上使用 OpenJDK 在 Ubuntu 18.04.3“仿生”上将 rundeck 从 3.0.22 直接升级到 3.2.1 吗? - Can you upgrade rundeck straight from 3.0.22 to 3.2.1 on Ubuntu 18.04.3 "bionic" with OpenJDK on GCP? org.openqa.selenium.WebDriverException:未知错误:Chrome无法启动:崩溃(无头Chrome) - org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed (headless chrome) Jenkins 未知错误:找不到 Chrome 二进制文件 - Jenkins unknown error: cannot find Chrome binary Jenkins:管道错误 - 找不到 Chrome 二进制文件 - Jenkins : pipeline error - cannot find Chrome binary Mac Java崩溃错误 - Mac Java Crashed Error hs_err_pid1966.log文件总是出现在我在ubuntu18.04.3上的$Home目录下,谁能帮帮我? - The file “hs_err_pid1966.log” always occurs in my $Home directory on ubuntu18.04.3,who can help me?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM