2

Chrome version is: Version 90.0.4430.212

Selenium version is: selenium-java-3.141.59

Chrome driver version is: ChromeDriver 90.0.4430.24

Selenium jars are in my project's external libraries.

Code:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class scraper {
    public static void main(String[] args) {
        System.setProperty("webdriver.chrome.driver","C:\\chromedriver\\chromedriver.exe");
        WebDriver driver = new ChromeDriver();
        String baseUrl = "http://google.com";
        driver.get(baseUrl);
        String title = driver.getTitle();
        System.out.println(title);
        driver.close();
    }
}

Output, cut down:

May 20, 2021 10:41:35 AM org.openqa.selenium.net.UrlChecker waitUntilAvailable
INFO: Waiting for http://localhost:22198/healthz
May 20, 2021 10:41:35 AM org.openqa.selenium.net.UrlChecker$1 call
INFO: Polling http://localhost:22198/healthz
Starting ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429}) on port 22198
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
May 20, 2021 10:41:36 AM org.openqa.selenium.net.UrlChecker$1 call
INFO: Polling http://localhost:22198/healthz
...
May 20, 2021 10:41:54 AM org.openqa.selenium.net.UrlChecker$1 call
INFO: Polling http://localhost:22198/healthz
Exception in thread "main" java.lang.RuntimeException: Timed out waiting for http://localhost:22198/healthz to be available after 20015 ms
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:76)
    at org.openqa.selenium.chrome.ChromeDriverService.start(ChromeDriverService.java:150)
    at org.openqa.selenium.chrome.ChromeCommandExecutor.execute(ChromeCommandExecutor.java:48)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:389)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:103)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:86)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:97)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:87)
    at scraper.main(scraper.java:14)

Does anyone know why this could be happening? When I go to http://localhost:22198/healthz in my browser I see:

{"value":{"error":"unknown command","message":"unknown command: unknown command: healthz","stacktrace":"Backtrace:\n\tOrdinal0 [0x0077C013+2474003]\n\tOrdinal0 [0x007129C1+2042305]\n\tOrdinal0 [0x00622F68+1060712]\n\tOrdinal0 [0x00664B59+1330009]\n\tOrdinal0 [0x00604F3F+937791]\n\tOrdinal0 [0x00605446+939078]\n\tOrdinal0 [0x00605721+939809]\n\tGetHandleVerifier [0x009096FC+1590332]\n\tGetHandleVerifier [0x009B8614+2306900]\n\tGetHandleVerifier [0x00809E93+543699]\n\tGetHandleVerifier [0x008092CE+540686]\n\tOrdinal0 [0x007186BA+2066106]\n\tOrdinal0 [0x00604CD0+937168]\n\tOrdinal0 [0x00604688+935560]\n\tGetHandleVerifier [0x009E494C+2487948]\n\tBaseThreadInitThunk [0x761EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x778E7A7E+286]\n\tRtlGetAppContainerNamedObjectPath [0x778E7A4E+238]\n"}}

If that helps.

4
  • possible duplicate of stackoverflow.com/questions/52821461/… Commented May 20, 2021 at 15:40
  • @cruisepandey unfortunately not, chromedriver starts successfully but seems to have a different issue Commented May 20, 2021 at 15:42
  • Did you try both of them and nothing worked out ? Commented May 20, 2021 at 15:44
  • @cruisepandley Step 1 outputs that starting chromedriver on port 9515 was started successfully and step 2, going to localhost:9515/status I see {"value":{"build":{"version":"90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429})"},"message":"ChromeDriver ready for new sessions.","os":{"arch":"x86_64","name":"Windows NT","version":"10.0.19042"},"ready":true}} Commented May 20, 2021 at 15:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.