Unknown error: cannot find Chrome binary

Where Chrome Driver expects Chrome Browser installed? It depends on your OS as documented at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver

This page show you a table:

OS Expected Location of Chrome
Linux /usr/bin/google-chrome1
Mac /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
Windows XP %HOMEPATH%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe
Windows Vista C:\Users%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe

How about the case of Windows7, Windows10? It seems that the document was written years ago when XP and Vista were main players, and it has not been updated since then, so that it does not mension about the current Windows lineups.

I suppose that Chrome Driver does NOT expect Chrome Browser installed in C:\Program Files (x86)\Google\Chrome\Application\chrome.exe on my Windows 7 PC. So I had to override the Chrome binary location explicity as my workaround code shows.

I would conclude that Katalon Studio should provide a way for user to explicitly specify the Chrome binary location.

4 Likes

kazurayam, thanks a lot for this! I edited the test case to specify the driver and the browser explicitly and it worked.

Hi kazurayam, thanks so much for the detail else i would have been in a situation to leave exploring Katalon as a tool itself. I did tried the explicit code and mentioned the same in the script but still while launching the recording option and selecting the browser is again giving me the same error. but on running the test case alone was a success and the script pass. Any help around this if possible, i am nowhere in a situation to even start knowing the tool and I am not from the scripting background also.

Unknown error:Cannot find Chrome binary (Driver info: chromedriver=2.35.528161…)

purnima,

I did tried the explicit code and mentioned the same in the script but still while launching the recording option and selecting the browser is again giving me the same error. but on running the test case alone was a success and the script pass.

OK, possiblly I can help you. To make my instruction simple and easy to understand, please answer to the following questions.

q1. Are you working on Windows? Mac or Linux?

q2. What is the exact path to the chrome binary on your PC? If you are working on Windows 10, it would be C:\Program Files (x86)\Google\Chrome\Application\chrome.exe . As as yours?

You can explicity specify the location of chrome.exe by Project > Settings > Execution > Default > WebUI > Chrome.

Add a property:

Name | Type | Value
binary | String | C:\Program Files (x86)\Google\Chrome\Application\chrome.exe , or any other path which you actually have
n

specify_chrome_binary_path_explicitly.png

@Katalon team,

I wonder how much you are aware that quite a few people have struggle with the “unknown error: cannot find Chrome binary” problem.

Vinh Nguyen mentioned that one can explicitly specify the location of chrome binary by Project -> Settings -> Execution -> Default -> WebUI -> Chrome
in


So now I know it. But others do not.

I believe Katalon document should cover this know-how in the official document
https://docs.katalon.com/display/KD/Execution+Settings

kazurayam said:

purnima,

I did tried the explicit code and mentioned the same in the script but still while launching the recording option and selecting the browser is again giving me the same error. but on running the test case alone was a success and the script pass.

OK, possiblly I can help you. To make my instruction simple and easy to understand, please answer to the following questions.

q1. Are you working on Windows? Mac or Linux?

q2. What is the exact path to the chrome binary on your PC? If you are working on Windows 10, it would be C:\Program Files (x86)\Google\Chrome\Application\chrome.exe . As as yours?

Please find the answers below:
a1) I am working on windows 7 professional
a2) Yes the path is same “C:\Program Files (x86)\Google\Chrome\Application”

kazurayam said:

You can explicity specify the location of chrome.exe by Project > Settings > Execution > Default > WebUI > Chrome.

Add a property:

Name | Type | Value
binary | String | C:\Program Files (x86)\Google\Chrome\Application\chrome.exe , or any other path which you actually have
n

Tried this but still getting the same error on Spy Web or Record Web.

OK, then.

Try the name ‘chrome.binary’, not ‘binary’

Name | Type | Value
chrome.binary | String | C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

kazurayam said:

OK, then.

Try the name ‘chrome.binary’, not ‘binary’

Name | Type | Value
chrome.binary | String | C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

This is also not working

purnima,

Do you find this file on your PC ? :

C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe

kazurayam said:

purnima,

Do you find this file on your PC ? :

C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe

yes and this is my office system with restricted rights so i wouldn’t be able to install anything on this but would need to ask the concerned team if something is required to resolve this issue.

purnima,

Now I have got to know that you have Chrome installed in 2 locations:

1. C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe

2. C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

This situation is similar to my previous experience. Please have a look at my story at

- http://forum.katalon.com/discussion/6150/google-chrome-crashed-on-my-pc-----2-reasons-found

The latter location is the standard installation path of Chrome on Windows 7.

The former location — why do we have this? I do not know. My PC is an office property as well, which is out of my control.

What is significant for Katalon users is that provided that chrome.exe is

installed multiple locations, the former location takes precedence over the latter.

This precedence rule is implemented in the chromedriver bundled in Katalon Studio. We have no chance to change the rule.

If the chrome.exe in the former location is corrupted or is an old version, Katalon Studio

will have hard time activating Chrome browser.

I believe you should avoid of the former location by changing the path.

Change this:

C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe

to:

C:\Users\%USERNAME%\AppData\Local\Google\Chrome**_Application_**\chrome.exe

If you do this, the chromedriver will no longer be confused and will just

use the chrome.exe under C:\Program Files (x86)

I suppose that the version of Chrome.exe at C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe on your PC is old.

Katalon Studio can not collaborate with old version of Chrome.

purnima,

You mentioned at 05/01/2018 that:

Tried this but still getting the same error on Spy Web or Record Web.

Have you installed Katalon Addon for Chrome? The document states that the addon is required for Spy Web and Record Web.
https://docs.katalon.com/display/KD/Katalon+Addon+for+Chrome

kazurayam said:

purnima,

You mentioned at 05/01/2018 that:

Tried this but still getting the same error on Spy Web or Record Web.

Have you installed Katalon Addon for Chrome? The document states that the addon is required for Spy Web and Record Web.
https://docs.katalon.com/display/KD/Katalon+Addon+for+Chrome

Yes I did, now i have asked my tech team to see if there’s any network issue restricting it.

The following post shows you how to get chromedriver.log file:
http://forum.katalon.com/discussion/6736/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome

In the chromedriver.log you can find a command line with which Katalon Studio started chrome.exe. For example:

[1526012674.637][INFO]: Launching chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"     --disable-background-networking     --disable-client-side-phishing-detection     --disable-default-apps --disable-hang-monitor     --disable-popup-blocking --disable-prompt-on-repost     --disable-sync --disable-web-resources     --enable-automation --enable-logging     --force-fieldtrials=SiteIsolationExtensions/Control     --ignore-certificate-errors     --load-extension="C:\Katalon_Studio_Windows_64-5.4.1\configuration\resources\extensions\Chrome\Object Spy,C:\Users\username\AppData\Local\Temp\scoped_dir10832_12653\internal"     --log-level=0 --metrics-recording-only --no-first-run     --password-store=basic     --remote-debugging-port=12067     --test-type=webdriver     --use-mock-keychain     --user-data-dir="C:\Users\username\AppData\Local\Temp\scoped_dir10832_25782" data:,

You might be interested in the switch

--remote-debugging-port=12067 

What is the remote-debugging-port? See
https://blog.chromium.org/2011/05/remote-debugging-with-chrome-developer.html

Purnima,

I have a doubt if your PC might be strictly administrated by your network team so that any access to http://localhost:XXXXX is firewalled. If it is the case, Katalon Studio would not be able to communicate with Chrome.

kazurayam your fix worked great for me. Thank you so much.

Thomas,

Glad to hear your success. I would like to know what kind of problem you had and what portion of my comments helped you. Is your PC strictly administrated by your network team so that any access to local host is prohibited? How is the firewall implemented? Would you like to tell us about your case just for our information?