Unable to open browser


#1

Hello, everyone.
Facing problem while runing test cases from command line on Ubuntu. Using both -browserType=“Chrome” and “Chrome (headless)”.
Google Chrome v72.0.3626.96

P.S. Notice that first test case which is an API call passes successfuly.
P.S. Again, no problems on Windows 10, fails only on Ubuntu.

Here is the command:
sudo ./katalon -noSplash -runMode=console -projectPath="/home/tigran-sargsyan/_ZoomAdmin/za.testing/tests/ZA.App.MachineManager.Katalon/ZA.App.MachineManager.Katalon.prj" -retry=0 -testSuitePath="Test Suites/App_TestSuite" -executionProfile="DEV" -browserType="Chrome (headless)" > reportMachineManager.txt

Here is the log:

Starting ChromeDriver 2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d) on port 2428

Log

Delete folder: bin
Delete folder: Libs
Opening project file: /home/tigran-sargsyan/_ZoomAdmin/za.testing/tests/ZA.App.MachineManager.Katalon/ZA.App.MachineManager.Katalon.prj
Request sent successfully.
[EL Warning]: 2019-02-07 16:24:25.083–Ignoring attribute [lastRun] on class [TestSuiteEntity] as no Property was generated for it.
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
166 2.4.7.xx-201611170128-e46 = ACTIVE
/%home%tigran-sargsyan%_ZoomAdmin%za.testing%tests%ZA.App.MachineManager.Katalon%ZA.App.MachineManager.Katalon.prj/Keywords/za/ZaCommon.groovy: 21 Groovy:unable to resolve class internal.GlobalVariable
Parsing custom keywords…
/%home%tigran-sargsyan%_ZoomAdmin%za.testing%tests%ZA.App.MachineManager.Katalon%ZA.App.MachineManager.Katalon.prj/Keywords/za/ZaCommon.groovy: 21 Groovy:unable to resolve class internal.GlobalVariable
Generating global variables…
Project ‘ZA.App.MachineManager.Katalon’ opened


Test Suites/App_TestSuite - Chrome (headless) - 20190207_162443…0/58(0%)

Request sent successfully.
2019-02-07 16:24:56.291 INFO c.k.katalon.core.main.TestSuiteExecutor - START Test Suites/App_TestSuite
2019-02-07 16:24:56.640 INFO c.k.katalon.core.main.TestSuiteExecutor - hostName = root - xubuntu-desktop
2019-02-07 16:24:56.655 INFO c.k.katalon.core.main.TestSuiteExecutor - os = Linux 64bit
2019-02-07 16:24:56.661 INFO c.k.katalon.core.main.TestSuiteExecutor - hostAddress = 127.0.1.1
2019-02-07 16:24:56.665 INFO c.k.katalon.core.main.TestSuiteExecutor - katalonVersion = 5.10.1.1
2019-02-07 16:24:58.679 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-02-07 16:24:58.687 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/Service_Tests/DataService_Tests/resetConfigFromTempData/03_Test_resetConfigFromTempData_Success


Test Suites/App_TestSuite - Chrome (headless) - 20190207_162443…0/58(0%)

2019-02-07 16:25:01.949 DEBUG .03_Test_resetConfigFromTempData_Success - 1: request = null
2019-02-07 16:25:01.966 DEBUG .03_Test_resetConfigFromTempData_Success - 2: response = null
2019-02-07 16:25:01.999 DEBUG .03_Test_resetConfigFromTempData_Success - 3: jsonResponse = null
2019-02-07 16:25:02.070 DEBUG .03_Test_resetConfigFromTempData_Success - 4: request = findTestObject(“Object Repository/Services/DataService/resetConfigFromTempData/resetConfigFromTempData_Success_”)
2019-02-07 16:25:02.258 DEBUG .03_Test_resetConfigFromTempData_Success - 5: jsonResponse = ZaCommon.restApiCall(request)
http://dev-app.zoomadmin.com/App-MachineManager/api/data/resetConfigFromTempData?machineId=75df446f-4859-4f02-be19-617b7b2efc55


Test Suites/App_TestSuite - Chrome (headless) - 20190207_162443…0/58(0%)

2019-02-07 16:25:16.283 INFO c.k.k.core.util.BrowserMobProxyManager - HAR: /home/tigran-sargsyan/_ZoomAdmin/za.testing/tests/ZA.App.MachineManager.Katalon/Reports/App_TestSuite/20190207_162443/requests/main/0.har
2019-02-07 16:25:17.172 DEBUG .03_Test_resetConfigFromTempData_Success - 6: if (jsonResponse instanceof java.lang.Boolean)
2019-02-07 16:25:17.199 DEBUG .03_Test_resetConfigFromTempData_Success - 1: verifyMatch(jsonResponse.toString(), “true”, true)
2019-02-07 16:25:17.390 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/Service_Tests/DataService_Tests/resetConfigFromTempData/03_Test_resetConfigFromTempData_Success
2019-02-07 16:25:17.401 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-02-07 16:25:17.402 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/App_Tests/01_Start/01 - Test_Login_Using_Test_Account
2019-02-07 16:25:19.199 DEBUG t.01 - Test_Login_Using_Test_Account - 1: baseUrl = ZaCommon.getBaseEnvironmentUrl()
2019-02-07 16:25:19.292 DEBUG t.01 - Test_Login_Using_Test_Account - 2: openBrowser("")
2019-02-07 16:25:22.835 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome (headless)’ driver
2019-02-07 16:25:23.054 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 seconds
2019-02-07 16:25:26.815 ERROR c.k.k.core.keyword.internal.KeywordMain - X Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn’t exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 648 milliseconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘xubuntu-desktop’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.15.0-45-generic’, java.version: ‘1.8.0_201’
Driver info: driver.version: CChromeDriver)
2019-02-07 16:25:26.840 ERROR c.k.katalon.core.main.TestCaseExecutor - X openBrowser("") FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn’t exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 648 milliseconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘xubuntu-desktop’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.15.0-45-generic’, java.version: ‘1.8.0_201’
Driver info: driver.version: CChromeDriver)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
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:53)
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 01 - Test_Login_Using_Test_Account.run(01 - Test_Login_Using_Test_Account:47)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
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:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1549542283985.run(TempTestSuite1549542283985.groovy:36)

2019-02-07 16:25:26.847 ERROR c.k.katalon.core.main.TestCaseExecutor - X Test Cases/App_Tests/01_Start/01 - Test_Login_Using_Test_Account FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn’t exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 648 milliseconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘xubuntu-desktop’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.15.0-45-generic’, java.version: ‘1.8.0_201’
Driver info: driver.version: CChromeDriver)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
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:53)
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 01 - Test_Login_Using_Test_Account.run(01 - Test_Login_Using_Test_Account:47)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
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:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1549542283985.run(TempTestSuite1549542283985.groovy:36)

2019-02-07 16:25:26.858 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/App_Tests/01_Start/01 - Test_Login_Using_Test_Account

Here is the code for Test Cases/App_Tests/01_Start/01 - Test_Login_Using_Test_Account:

Code

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import com.kms.katalon.core.testobject.RequestObject as RequestObject
import com.kms.katalon.core.testobject.ResponseObject as ResponseObject
import groovy.json.JsonSlurper as JsonSlurper
import com.kms.katalon.core.exception.StepFailedException as StepFailedException
import za.ZaCommon as ZaCommon

def baseUrl = za.ZaCommon.getBaseEnvironmentUrl()

WebUI.openBrowser(’’)

WebUI.navigateToUrl(baseUrl+‘Account/Logout’)

WebUI.setText(findTestObject(‘App/Login/Login_email_field’), ‘email@test.com’)

WebUI.setText(findTestObject(‘App/Login/Login_password_field’), ‘password’)

WebUI.click(findTestObject(‘App/Login/Login_Button_SignIn’))

WebUI.delay(2)

WebUI.navigateToUrl(baseUrl+‘App-Dashboard’)

WebUI.verifyElementPresent(findTestObject(‘App/Login/Login_Success_Object_Visable’), 2)

// WebUI.closeBrowser()


#2

Hi @tigran.sargsyan

From this part of the log:

I think this is related to this issue:

In the above post I proposed a solution, could you check to see if it works ?


#3

Hi, @ThanhTo. Thanks for the reply.
Here what I get after the step from the post above.

Error

2019-02-07 22:13:38.167 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/App_Tests/01_Start/01 - Test_Login_Using_Test_Account


Test Suites/App_TestSuite - Chrome (headless) - 20190207_221236…1/58(2%)

2019-02-07 22:13:40.192 DEBUG t.01 - Test_Login_Using_Test_Account - 1: options = new org.openqa.selenium.chrome.ChromeOptions()
2019-02-07 22:13:40.317 DEBUG t.01 - Test_Login_Using_Test_Account - 2: options.addArguments("–no-sandbox")
2019-02-07 22:13:40.337 DEBUG t.01 - Test_Login_Using_Test_Account - 3: options.addArguments("–disable-dev-shm-usage")
2019-02-07 22:13:40.358 DEBUG t.01 - Test_Login_Using_Test_Account - 4: driver = new org.openqa.selenium.chrome.ChromeDriver(options)
2019-02-07 22:13:40.720 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: driver = new org.openqa.selenium.chrome.ChromeDriver(options) FAILED.
Reason:
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:754)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:339)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:157)
at 01 - Test_Login_Using_Test_Account.run(01 - Test_Login_Using_Test_Account:35)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
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:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1549563156394.run(TempTestSuite1549563156394.groovy:36)

2019-02-07 22:13:40.758 ERROR c.k.katalon.core.main.TestCaseExecutor - X Test Cases/App_Tests/01_Start/01 - Test_Login_Using_Test_Account FAILED.
Reason:
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:754)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:339)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:157)
at 01 - Test_Login_Using_Test_Account.run(01 - Test_Login_Using_Test_Account:35)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
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:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1549563156394.run(TempTestSuite1549563156394.groovy:36)

2019-02-07 22:13:40.793 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/App_Tests/01_Start/01 - Test_Login_Using_Test_Account


#4

Hi @tigran.sargsyan

Did you add this line

System.setProperty("webdriver.chrome.driver","/usr/local/bin/chromedriver");

I think the missing of the above line caused this problem:

Also the path to the ChromeDriver is not cross-platform consistent, as quoted in the documentation ( which is also what the exception refers to ):

Please check if you already have ChromeDriver and and modify the path to ChromeDriver in the above line according to your operating system to see if it resolves the issue.

Regards !


#5

hello,

this should remove the issue
add to your com.kms.katalon.core.webui.chrome.properties at least this property
--no-sandbox
C:\KatalonStudio\projectName\settings\internal
{"CHROME_DRIVER":{"args":["--no-sandbox","--disable-infobars"]}}

#6

Thanks for the reply.

Google Chrome is located in /usr/bin, but /usr/local/bin is empty folder.
What you’ll recomend me to do?

Regards.


#7

Hello, @Timo_Kuisma and thanks for the reply.

Here is the content of com.kms.katalon.core.webui.chrome.properties file:

{“CHROME_DRIVER”:{“allow-running-insecure-content”:"",“auto-open-devtools-for-tabs”:"",“args”:[“allow-running-insecure-content”,“zz_auto-open-devtools-for-tabs”,“disable-infobars”,“start-maximized”]}}

You mean to change that to this?

{“CHROME_DRIVER”:{“allow-running-insecure-content”:"",“auto-open-devtools-for-tabs”:"",“args”:[“allow-running-insecure-content”,“zz_auto-open-devtools-for-tabs”,“disable-infobars”,“start-maximized”,“no-sandbox”]}}


#8

hi,

this is needed 
--no-sandbox
did it work without hyphens?

#9

Both this:

{“CHROME_DRIVER”:{“allow-running-insecure-content”:"",“auto-open-devtools-for-tabs”:"",“args”:[“allow-running-insecure-content”,“zz_auto-open-devtools-for-tabs”,“disable-infobars”,“start-maximized”, “--no-sandbox” ]}}

and this:

{“CHROME_DRIVER”:{“allow-running-insecure-content”:"",“auto-open-devtools-for-tabs”:"",“args”:[“allow-running-insecure-content”,“zz_auto-open-devtools-for-tabs”,“disable-infobars”,“start-maximized”, “no-sandbox” ]}}

haven’t worked.


#10

I want to mention again, that same projects run perfectly on Windows 10, but fail on Ubuntu. At the same time, Katalon GET/POST API calls also work correctly on Ubuntu, the problem is only with opening browser.


#11
hyphen should be in all properties

check here
https://peter.sh/experiments/chromium-command-line-switches/
try first with these properties only
{"CHROME_DRIVER":{"args":["--no-sandbox","--disable-infobars"]}}

#12

same result for


#13

hi,

sorry my eyes, add properties here as you are running headless
com.kms.katalon.core.webui.chrome (headless).properties
{"HEADLESS_DRIVER”:{“args”:["–no-sandbox","–disable-infobars"]}}

you can download new chrome driver and use it instead of default

ChromeOptions options = new ChromeOptions();
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
System.setProperty("webdriver.chrome.driver", "C:\\Users\\xxxx\\Desktop\\driver\\chromedriver.exe");
ChromeDriver driver = new ChromeDriver(capabilities);
DriverFactory.changeWebDriver(driver)
WebUI.openBrowser('')
WebUI.navigateToUrl('http://www.google.com')
WebUI.closeBrowser()

#14

this file com.kms.katalon.core.webui.chrome (headless).properties doesn’t exist, but when I create it and pass your args still I get failings


#15

hi,

did you tried with another chrome driver?


#16

Hi.

Sorry for late response.
I have downloaded Chrome Driver.
Added this lines to code:

import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.remote.DesiredCapabilities
ChromeOptions options = new ChromeOptions();
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
System.setProperty(“webdriver.chrome.driver”, “/home/tigran-sargsyan/_ZoomAdmin/za.testing/tests/chromedriver”);
ChromeDriver driver = new ChromeDriver(capabilities);
DriverFactory.changeWebDriver(driver)

Still get this error:

Error Log

2019-02-21 16:32:29.690 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: driver = new org.openqa.selenium.chrome.ChromeDriver(capabilities) FAILED.
Reason:
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn’t exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=73.0.3683.20 (8e2b610813e167eee3619ac4ce6e42e3ec622017),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 49.68 seconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘xubuntu-desktop’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.15.0-45-generic’, java.version: ‘1.8.0_201’
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:147)
at 01 - Test_HomePage_Elements_Visibility.run(01 - Test_HomePage_Elements_Visibility:60)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
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:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1550752267072.run(TempTestSuite1550752267072.groovy:36)

2019-02-21 16:32:29.782 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/App_Tests/Home_PageTests/01 - Test_HomePage_Elements_Visibility FAILED.
Reason:
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn’t exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=73.0.3683.20 (8e2b610813e167eee3619ac4ce6e42e3ec622017),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 49.68 seconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘xubuntu-desktop’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.15.0-45-generic’, java.version: ‘1.8.0_201’
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:147)
at 01 - Test_HomePage_Elements_Visibility.run(01 - Test_HomePage_Elements_Visibility:60)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
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:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1550752267072.run(TempTestSuite1550752267072.groovy:36)

2019-02-21 16:32:29.827 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/App_Tests/Home_PageTests/01 - Test_HomePage_Elements_Visibility