Error starting chromedriver: /usr/local/bin/chromedriver: Syntax error: ")"

123 views
Skip to first unread message

Galina Sokolova

unread,
Oct 22, 2018, 9:54:12 PM10/22/18
to Selenium Users
I am installing chrome and chromedriver for selenium test automation running in docker container in headless mode.

Dockerfile:
# Install Chrome
RUN apt-get update && \
        apt-get upgrade -y && \
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

# Install chromedriver for Selenium
RUN chmod +x /usr/local/bin/chromedriver

Code to start chrome via automated test:

System.setProperty("webdriver.chrome.driver", chromeDriverPath);

ChromeOptions chromeOptions = new ChromeOptions();

chromeOptions.setBinary(chromeDriverPath);

chromeOptions.addArguments("--headless");

Webdriver dr = new ChromeDriver(chromeOptions);


Error I am getting:
2018-10-23 00:19:46.174:INFO::main: Logging initialized @516ms to org.eclipse.jetty.util.log.StdErrLog
/usr/local/bin/chromedriver: 1: /usr/local/bin/chromedriver: Syntax error: ")" unexpected
Oct 23, 2018 12:20:06 AM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)
Timed out waiting for driver server to start. 

I would appreciate your help/suggesting on how to fix ity.

Thanks.
 

Walter van den hooven

unread,
Aug 30, 2019, 6:37:09 AM8/30/19
to Selenium Users
This problem was reported some time agon and problably already solved.

Nevertheless I will report for future readers that I had the same problem, but found that I used the wrong chromedriver version.  I used the Mac  version on Ubuntu.
When I downloaded the Linux version, the problem was solved.

Regards,
Walter.

Op dinsdag 23 oktober 2018 03:54:12 UTC+2 schreef Galina Sokolova:
Reply all
Reply to author
Forward
0 new messages