简体   繁体   English

“ Chrome无法启动:异常退出”

[英]“Chrome failed to start: exited abnormally”

I am trying to run a simple selenium case on Ubuntu 16.4 to check my updated ChromeDriver version. 我正在尝试在Ubuntu 16.4上运行一个简单的硒箱,以检查更新的ChromeDriver版本。 Here is my settings information: 这是我的设置信息:

OS: Ubuntu 16.04
Chromium: 69.0.3497.81, Built on Ubuntu , 
Chromedriver: v2.8.240825
jdk: openjdk version "1.8.0_181"

And here is my simple java code: 这是我简单的Java代码:

public static void main(String[] args) throws IOException, InterruptedException {
        System.setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
        System.setProperty("webdriver.chrome.logfile", "/tmp/chromedriver.log");
        System.setProperty("webdriver.chrome.verboseLogging", "true");

        ChromeOptions chromeOptions = new ChromeOptions();
        chromeOptions.addArguments("--headless", "window-size=1024,768", "--no-sandbox");
        WebDriver driver = new ChromeDriver(chromeOptions);
        driver.get("https://google.com");
        System.out.println("Title is " + driver.getTitle());

        if (driver.getPageSource().contains("I'm Feeling Lucky")) {
            System.out.println("Pass");
        } else {
            System.out.println("Fail");
        }
        driver.quit();
    }

But during the runtime, I'm keep getting "Chrome failed to start: exited abnormally" , with such in the log file: 但是在运行时期间,我一直在日志文件中看到“ Chrome无法启动:异常退出”的信息

 "
....
    [0.317][INFO]: Launching chrome: /usr/bin/chromium-browser --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-hang-monitor --disable-prompt-on-repost --dis
    able-web-resources --enable-logging --full-memory-crash-report --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.GO6lAd/internal --logging-level=1 --metrics-recording-only --no-first-run --password-store=basic --re
    mote-debugging-port=12811 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.uTbJHO data:,
    [0.317][DEBUG]: DevTools request: http://127.0.0.1:12811/json/version
    [0.319][WARNING]: PAC support disabled because there is no system implementation
    [0.390][DEBUG]: DevTools request failed
    [0.440][DEBUG]: DevTools request: http://127.0.0.1:12811/json/version
    [0.441][DEBUG]: DevTools request failed
    "

But if I was to downgradethe the ChromeDriver to version 2.4, same code runs perfectly. 但是,如果我要将ChromeDriver降级到2.4版,则相同的代码可以完美运行。 Does anyone know why ? 有人知道为什么吗? The reason why I need the latest one, is because there is some other feature I need to use. 之所以需要最新的功能,是因为我还需要使用其他一些功能。

The failure was actually with older Chrome-driver, of version 2.9, 2.8. 失败实际上是由版本2.9、2.8的旧版Chrome驱动程序引起的。 etc. The very latest ones, 2.38, or 2.42 does not have such behavior. 等等。最新的2.38或2.42没有这种行为。

暂无
暂无

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

相关问题 Selenium 'Chrome 启动失败:异常退出'错误 - Selenium 'Chrome failed to start: exited abnormally' error Jenkins 云:Chrome 启动失败:异常退出 - Jenkins cloud : Chrome failed to start: exited abnormally Selenium:Chrome无法启动:异常退出 - Selenium: Chrome failed to start: exited abnormally chrome启动失败:macos上docker容器异常退出 - chrome failed to start: exited abnormally in docker container on macos Selenium WebDriverException:未知错误:Chrome 无法启动:异常退出 - Selenium WebDriverException: unknown error: Chrome failed to start: exited abnormally WebDriverError:未知错误:Chrome 无法启动:异常退出 - WebDriverError: unknown error: Chrome failed to start: exited abnormally WebDriverException:消息:未知错误:Chrome 无法启动:通过 VPS 上的 Python 使用 ChromeDriver Chrome 和 Selenium 异常退出 - WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally with ChromeDriver Chrome and Selenium through Python on VPS WebDriverException:消息:未知错误:Chrome 无法启动:使用 ChromeDriver Chrome 和 Selenium Python 异常退出错误 - WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally error using ChromeDriver Chrome and Selenium Python 设置 selenium 与 headless chrome 错误:WebDriverException:消息:未知错误:Chrome 无法启动:异常退出 - Setup selenium with headless chrome error: WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally WebDriverException:消息:未知错误:Chrome 无法启动:在 debian 服务器上使用 ChromeDriver Chrome 和 Selenium 异常退出 - WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally with ChromeDriver Chrome and Selenium on debian server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM