Can't find chrome binary on Windows 7
See original GitHub issueI am not able to run Protractor 0.24.2. I am running Windows 7. I did the following:
npm install -g protractor
webdriver-manager update
protractor protractor.config.js
Contents of protractor.config.js:
exports.config = {
specs: [
'./**/*spec.js'
],
baseUrl: 'http://localhost:8829/root/src',
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true, // Use colors in the command line report.
}
};
CMD output:
Starting selenium standalone server...
Selenium standalone server started at http://10.183.205.17:40150/wd/hub
C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:109
var template = new Error(this.message);
^
UnknownError: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 583 milliseconds
Build info: version: '2.42.0', revision: '5e82430', time: '2014-05-22 20:18:07'
System info: host: 'LNOR010327', ip: '10.183.205.17', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_45'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at new bot.Error (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:109:18)
at Object.bot.response.checkResponse (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\response.js:10
6:9)
at C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:134:24
at C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\base.js:1243:15
at webdriver.promise.ControlFlow.runInNewFrame_ (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver
\promise.js:1531:20)
at notify (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:354:12)
at notifyAll (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:323:7)
at resolve (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:301:7)
at fulfill (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:421:5)
at C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\base.js:1243:15
==== async task ====
WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver
\webdriver.js:131:49)
at Function.webdriver.WebDriver.createSession (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\w
ebdriver.js:111:30)
at Builder.build (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\builder.js:106:20)
at LocalDriverProvider.getDriver (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\local.js:121:9)
at C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:207:35
at _fulfilled (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:797:54)
at self.promiseDispatch.done (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:759:13)
at C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:573:44
I have run webdriver-manager update, so I do have the Chrome driver at c:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver.exe.
I also tried to run webdriver-manager start in another cmd window, and modified the protractor.config.js to:
exports.config = {
specs: [
'./**/*spec.js'
],
baseUrl: 'http://localhost:8829/root/src',
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
};
… and then running protractor again with this config, but that also didn’t work. In the window running the webdriver-manager start, I then got the following output:
seleniumProcess.pid: 988
19.jun.2014 12:28:39 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
Setting system property webdriver.chrome.driver to C:\Users\someUser\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver.exe
12:28:39.841 INFO - Java: Sun Microsystems Inc. 20.45-b01
12:28:39.841 INFO - OS: Windows 7 6.1 amd64
12:28:39.854 INFO - v2.42.0, with Core v2.42.0. Built from revision 5e82430
12:28:39.947 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
12:28:39.948 INFO - Version Jetty/5.1.x
12:28:39.949 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
12:28:39.950 INFO - Started HttpContext[/selenium-server,/selenium-server]
12:28:39.950 INFO - Started HttpContext[/,/]
12:28:39.980 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@4ac9131c
12:28:39.980 INFO - Started HttpContext[/wd,/wd]
12:28:39.983 INFO - Started SocketListener on 0.0.0.0:4444
12:28:39.984 INFO - Started org.openqa.jetty.jetty.Server@50ef5502
12:28:42.900 INFO - Executing: [new session: Capabilities [{count=1, browserName=chrome}]])
12:28:42.910 INFO - Creating a new session for Capabilities [{count=1, browserName=chrome}]
Starting ChromeDriver (v2.10.267521) on port 45044
Only local connections are allowed.
12:28:45.134 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.42.0', revision: '5e82430', time: '2014-05-22 20:18:07'
System info: host: 'LNOR010327', ip: '10.183.205.17', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_45'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:176)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:112)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:89)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:110)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:57)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:112)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:173)
at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:200)
at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:128)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.42.0', revision: '5e82430', time: '2014-05-22 20:18:07'
System info: host: 'LNOR010327', ip: '10.183.205.17', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_45'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:69)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:53)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:54)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:215)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:59)
... 10 more
Caused by: org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.11 seconds
Build info: version: '2.42.0', revision: '5e82430', time: '2014-05-22 20:18:07'
System info: host: 'LNOR010327', ip: '10.183.205.17', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_45'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:596)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:127)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:140)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:171)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:139)
... 15 more
12:28:45.155 WARN - Exception: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.11 seconds
Build info: version: '2.42.0', revision: '5e82430', time: '2014-05-22 20:18:07'
System info: host: 'LNOR010327', ip: '10.183.205.17', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_45'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Does anybody know how to fix this? Google haven’t helped me so far.
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
cannot find Chrome binary error with Selenium in Python for ...
For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary. Using a Chrome executable in a non-standard ......
Read more >Fix: Selenium's “cannot find Chrome binary” Error
WebDriverException: Message: unknown error: cannot find Chrome binary. Puzzled, “It was working optimally just yesterday!
Read more >Selenium UI test can no longer find Chrome binary on ...
Solution 1: Change Protractor binary in the Protractor configuration file. capabilities: { 'browserName': 'chrome', 'chromeOptions': { 'binary': 'C:/Program ...
Read more >Unknown error: cannot find Chrome binary - Katalon Community
I am using Katalon Studio v5.2.0 and Chromium v65.0 on Windows 7. ... WebDriverException: unknown error: cannot find Chrome binary.
Read more >2022 Fix: Windows cannot find chrome.exe ... - YouTube
In this video, we're going to show you How to fix Windows cannot find chrome.exe or Chrome not working error on Windows. Watch...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is my conf.js file and it works. Try this one. 💯 Change the ‘binary’ to your chrome path.
See if it helps if you don’t use chrome-only mode:
Add these: