# Unable to execute TestCases over Linux

**URL:** <https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995>\
**Category:** Integrations\
**Tags:** integrations, katalon-studio\
**Created:** [February 7, 2019, 10:56am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995 "2019-02-07T10:56:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 7, 2019, 10:56am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/1 "2019-02-07T10:56:23Z")

</div>

2019-02-07 14:54:11.940 ERROR c.k.k.core.keyword.internal.KeywordMain - ❌ 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 3.10.0-693.11.6.el7.x86\_64 x86\_64) (WARNING: The server did not provide any stacktrace information)

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [February 7, 2019, 11:07am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/2 "2019-02-07T11:07:55Z")

</div>

Hi @Vivek

So I tried to google the exception and it seems that, to get it working you have to add some arguments to the Chrome Web Driver.

> <https://stackoverflow.com/questions/50642308/webdriverexception-unknown-error-devtoolsactiveport-file-doesnt-exist-while-t/50725918#50725918>

In your test case’s script mode, you can try to initiate ChromeDriver with the above options, as demonstrated in this documentation.

[https://docs.katalon.com/katalon-studio/tutorials/using\_selenium\_webdriver\_katalon\_studio.html#options-and-capabilities](https://docs.katalon.com/katalon-studio/tutorials/using_selenium_webdriver_katalon_studio.html#options-and-capabilities)

So your script may start with something like this:

```auto
import org.openqa.selenium.WebDriver
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import com.kms.katalon.core.webui.driver.DriverFactory

ChromeOptions options = new ChromeOptions()
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
WebDriver driver = new ChromeDriver(options)

```

Please try and see if this workaround resolves the situation.

Regards !

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 7, 2019, 12:00pm UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/3 "2019-02-07T12:00:44Z")

</div>

Thanks Thanh To 🙂  
Yes, i will let you know if this works…

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 7, 2019, 12:20pm UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/4 "2019-02-07T12:20:41Z")

</div>

![image](https://europe1.discourse-cdn.com/katalon/original/2X/e/e5e27312e6cc0436dbb5563539d9fa0ae797ae81.png)

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 7, 2019, 12:22pm UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/5 "2019-02-07T12:22:16Z")

</div>

I have created a custom keyword  
public class chromeBrowser {  
@Keyword

```
def OpenBrowser(String url) {

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

	ChromeOptions options = new ChromeOptions();

	options.addArguments("–no-sandbox");

	options.addArguments("–disable-dev-shm-usage");

	options.setExperimentalOption("useAutomationExtension", false);

	WebDriver driver = new ChromeDriver(options); 
	 		
	DriverFactory.changeWebDriver(driver);

	driver.get(url);
}

```

}

**and now i am getting**

2019-02-07 17:42:06.025 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/Launch  
2019-02-07 17:42:06.238 DEBUG testcase.Launch - 1: chromeBrowser.OpenBrowser(“https://…URL”)  
2019-02-07 17:42:06.239 ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - ❌ chromeBrowser  
2019-02-07 17:42:06.248 ERROR c.k.katalon.core.main.TestCaseExecutor - ❌ chromeBrowser.OpenBrowser(“https…URL”) FAILED.  
Reason:  
java.lang.ClassNotFoundException: chromeBrowser  
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.getCustomKeywordClassAndSetMetaClass(CustomKeywordDelegatingMetaClass.java:98)  
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:44)  
at Launch.run(Launch:17)

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [February 7, 2019, 1:38pm UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/6 "2019-02-07T13:38:44Z")

</div>

Hi @Vivek

I see the exception is telling you that your custom keyword class cannot be found. In your script have you followed the following method to use custom keywords ?

[https://docs.katalon.com/katalon-studio/tutorials/create\_custom\_keyword.html#custom-keywords-in-scripting-view](https://docs.katalon.com/katalon-studio/tutorials/create_custom_keyword.html#custom-keywords-in-scripting-view)

Regards !

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 8, 2019, 3:46am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/7 "2019-02-08T03:46:44Z")

</div>

Hi @ThanhTo,

yes, i have done all the steps mentioned in the link. But still no success.

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 org.openqa.selenium.WebDriver  
import org.openqa.selenium.chrome.ChromeOptions

import com.kms.katalon.core.annotation.Keyword  
import com.kms.katalon.core.checkpoint.Checkpoint  
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW  
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile  
import com.kms.katalon.core.model.FailureHandling  
import com.kms.katalon.core.testcase.TestCase  
import com.kms.katalon.core.testdata.TestData  
import com.kms.katalon.core.testobject.TestObject  
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS  
import com.kms.katalon.core.webui.driver.DriverFactory  
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI  
import org.openqa.selenium.chrome.ChromeDriver

public class chromeBrowser {  
@Keyword

```
def OpenBrowser(String url) {

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

	ChromeOptions options = new ChromeOptions();

	options.addArguments("-headless");

	options.addArguments("–no-sandbox");

	options.addArguments("–disable-dev-shm-usage");

	options.setExperimentalOption("useAutomationExtension", false);

	WebDriver driver = new ChromeDriver(options);

	DriverFactory.changeWebDriver(driver);

	driver.get(url);
}

```

}

======================  
2019-02-08 09:07:05.688 ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - ❌ unknown error: Chrome failed to start: exited abnormally  
(Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 3.10.0-693.11.6.el7.x86\_64 x86\_64) (WARNING: The server did not provide any stacktrace information)  
Command duration or timeout: 60.09 seconds  
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’  
System info: host: ‘…’, ip: ‘…’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘3.10.0-693.11.6.el7.x86\_64’, java.version: ‘1.8.0\_111’  
Driver info: driver.version: ChromeDriver

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [February 8, 2019, 6:01am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/8 "2019-02-08T06:01:28Z")

</div>

Hi @Vivek

I notice that in your script, this line only has a single dash:

> [@Vivek](#):
>
> `options.addArguments("–no-sandbox");`

While the argument referred from the StackOverlflow post contains double dash:

> [@ThanhTo](#):
>
> `options.addArguments("--no-sandbox");`

Could you see if adding the dash into this line (as well as other lines) resolves the issue ?

Thanks !

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 8, 2019, 6:18am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/9 "2019-02-08T06:18:19Z")

</div>

no success.

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 8, 2019, 6:31am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/10 "2019-02-08T06:31:51Z")

</div>

ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - ❌ unknown error: Chrome failed to start: exited abnormally

what is the reason for this error.

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [February 8, 2019, 6:41am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/11 "2019-02-08T06:41:28Z")

</div>

Hi @Vivek

From this StackOverflow answer:

> <https://stackoverflow.com/questions/50027278/message-unknown-error-chrome-failed-to-start-exited-abnormally-on-aws-cloud9/50027645#50027645>

I think it’s because of compatibility between ChromeDriver and Chrome browser. Could you try upgrading and the solutions proposed by the StackOverflow answer ?

Regards !

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 8, 2019, 8:00am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/12 "2019-02-08T08:00:25Z")

</div>

i have tried all the solutions, but no success ☹

---

<div class="post-metadata">

**Author:** ![Vivek](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Vivek](https://forum.katalon.com/u/Vivek)\
**Post date:** [February 8, 2019, 9:49am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/13 "2019-02-08T09:49:52Z")

</div>

Hi @ThanhTo

This got fixed just using by removing this line of code “DriverFactory.changeWebDriver(driver);”

public class chromeBrowser {  
@Keyword

```
def OpenBrowser(String url) {

	System.setProperty("webdriver.chrome.driver","/usr/local/bin/chromedriver");
	ChromeOptions options = new ChromeOptions();
	options.addArguments("--no-sandbox");
	options.add_argument("--disable-dev-shm-usage");
	options.setExperimentalOption("useAutomationExtension", false);
	WebDriver driver = new ChromeDriver(options);
	driver.get(url);
}

```

}

Thanks a lot  
🙂

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [February 8, 2019, 3:54pm UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/14 "2019-02-08T15:54:07Z")

</div>

Hi @Vivek

Nice to see you got it fixed. Could you mark your own answer as solution so that others will have an easier time fixing this issue ?

Thanks !

---

<div class="post-metadata">

**Author:** ![Timo\_Kuisma](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Timo\_Kuisma](https://forum.katalon.com/u/Timo_Kuisma)\
**Post date:** [February 9, 2019, 9:49am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/15 "2019-02-09T09:49:07Z")

</div>

Hi,

```
check this page
https://peter.sh/experiments/chromium-command-line-switches/
at least this is needed
--no-sandbox
```

---

<div class="post-metadata">

**Author:** ![atul](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@atul](https://forum.katalon.com/u/atul)\
**Post date:** [April 16, 2020, 7:22am UTC](https://forum.katalon.com/t/unable-to-execute-testcases-over-linux/18995/16 "2020-04-16T07:22:55Z")

</div>

Hi vivek !  
Kindly please tell me that you have used a method add\_argument("–disable-dev-shm-usage") is it true?  
addArguments or add\_argument ?  
for me both are not working.
