Unknown error: cannot find Chrome binary

@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?

Hi @kazurayam

I am trying to run my test suite on jenkins. Just a quick question though. do i still need to explicitly set the path on my code even if i already have my set-up my binary in the desired capabilities section of the project?

below is a snippet of my result, where-in you can see that the binary is set but is still having errors looking for the chrom binary

‘’’
2019-04-25 02:06:53.410 INFO c.k.katalon.core.main.TestSuiteExecutor - START Test Suites/GMA.E2E.Login Page
2019-04-25 02:06:53.480 INFO c.k.katalon.core.main.TestSuiteExecutor - hostName = GMAEEAUTO-WVM$ - GMAEEAUTO-WVM.jene3dwzkssebmwdnk5e1y1s2a.ix.internal.cloudapp.net
2019-04-25 02:06:53.484 INFO c.k.katalon.core.main.TestSuiteExecutor - os = Windows Server 2016 64bit
2019-04-25 02:06:53.484 INFO c.k.katalon.core.main.TestSuiteExecutor - hostAddress = 172.16.3.4
2019-04-25 02:06:53.485 INFO c.k.katalon.core.main.TestSuiteExecutor - katalonVersion = 6.1.1.1
2019-04-25 02:06:54.056 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-04-25 02:06:54.056 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/LoginUsingValidAccount
Start recording video for test case ‘Test Cases/LoginUsingValidAccount’.
2019-04-25 02:06:55.109 DEBUG testcase.LoginUsingValidAccount - 1: openBrowser("")
2019-04-25 02:06:55.420 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome’ driver
2019-04-25 02:06:55.438 INFO c.k.k.c.w.util.WebDriverPropertyUtil - User set preference: [‘chrome.binary’, ‘C:\Users\ulautomationadmin\AppData\Local\Google\Chrome\Application\chrome.exe’]
2019-04-25 02:06:55.465 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 seconds
Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 49326
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
2019-04-25 02:06:57.999 ERROR c.k.k.core.keyword.internal.KeywordMain - ? Unable to open browser with url: ‘’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:60)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$openBrowser.call(Unknown Source)
at LoginUsingValidAccount.run(LoginUsingValidAccount:18)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:342)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:333)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:312)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:304)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:238)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1556158009036.run(TempTestSuite1556158009036.groovy:35)
Caused by: org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 342 milliseconds

‘’’

What do you mean by this?
Could you share a screenshot of the dialog where you put the Chrome-binary path?

Hi,

here is a screeshot

Desired Capabilities is not appropriate place to specify the Chrome binary path.

See

in version 6.1.1, there is no option under execution. which then lead me to the desired capabilities since on the manual code above it is stated that
‘’’
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
‘’’

Here are the screenshot of execution under project settings of v6.1.1

1 Like

@devalex88,

Could you join us?

carlos sais “in version 6.1.1, there is no option under execution”.

How can we specify Chrome binary path in KS v6.1.1 GUI?