Unable to open browser with url


#1

Hi Friends,

We are trying to run the Katalon test suits via CLI mode in Ubuntu Desktop. Which katalon provides via generate commands. But we are getting the below error. Can any one guide me to fix this ?

error:
================================================================
openBrowser(URL) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: 'https://demoalchemy.palmetto.com'
	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 CashCT.run(CashCT:20)
	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 TempTestSuite1556184991745.run(TempTestSuite1556184991745.groovy:35)
Caused by: 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.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 4.4.0-1079-aws x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 163 milliseconds
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: 'ip-172-31-41-208', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1079-aws', java.version: '1.8.0_191'
Driver info: driver.version: CChromeDriver
	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 com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:20)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:147)
	at com.kms.katalon.selenium.driver.CChromeDriver.<init>(CChromeDriver.java:13)
	at com.kms.katalon.core.webui.driver.DriverFactory.createNewChromeDriver(DriverFactory.java:281)
	at com.kms.katalon.core.webui.driver.DriverFactory.startNewBrowser(DriverFactory.java:243)
	at com.kms.katalon.core.webui.driver.DriverFactory.openWebDriver(DriverFactory.java:188)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.doCall(OpenBrowserKeyword.groovy:74)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.call(OpenBrowserKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	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 Script1548150741170.run(Script1548150741170.groovy:20)
	... 13 more
===========================================================================

Regards,
Sundara Rajan M


Problem with chrome when opening browser
#2

So ive not seen this before so i just googled your error cause

Caused by: 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.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 4.4.0-1079-aws x86_64) (WARNING: The server did not provide any stacktrace information)

Because this is the reasoning for your error. I found these similar issues which may be worth a read. Now ive breifly read through so not sure a solution is there but worth a look.


#3

hi,

add this to your chrome options
settings\internal\com.kms.katalon.core.webui.chrome.properties
{“CHROME_DRIVER”:{“args”:["–no-sandbox","–disable-infobars"]}}


#4

Timo, please post more information about how to change these options in Katalon Studio. It’ll help new users and idiots like me to understand better. :wink:

If you want to make a full “Tips & Tricks” topic, that would be even better!

Thanks.


#5

hello,

in Windows navigate to path where this properties is
C:\KatalonStudio\projectName\settings\internal
and there should be properties files are
open properties file with e.g notepad++
and modify there

properties2

Alternatively do the same in Linux env

in Linux modify file with
cd /path/where/your/katalon/project/is/settings/internal
vi com.kms.katalon.core.webui.chrome.properties
ESC + i to insert text
ESC + : + wq! to save file


#6

Alternatively, you can do this through the GUI:


#7

Another way of doing this is through code:

System.setProperty('webdriver.chrome.driver', DriverFactory.getChromeDriverPath())
ChromeOptions options = new ChromeOptions()
options.addArguments("–no-sandbox","–disable-infobars")
WebDriver driver = new ChromeDriver(options)
DriverFactory.changeWebDriver(driver)

#8

I have tried this method. However, error still exists.
Caused by: org.openqa.selenium.SessionNotCreatedException: session not created: Chrome version must be between 70 and 73.
My chrome version is 74. so I guess that is why


#9

@pac.chen See


#10

Hi guys, I just update Katalon version and I have the same issue.
Could you fix it?

NOTE : The error was fixed using @HeleneB posts


#11

Thanks Helene it works!


#15

Hello, I have same problem too. When I try to spy or record actions chrome browser opens and navigates to url with no problem, but when I am trying to execute a test case using chrome browser, it just opens the browser and does not navigate to URL.


#16

Hi,
Are your versions of Katalon (6.1.5) and Chrome (74) up to date ?


#17

image

my chrome version is 74


#18

Mine is 74.0.3729.157 and looks like you have a problem
Is your Katalon Studio up to date too ?


#19

I am experience with the same issue. In my case I run the script in docker container refer to standard image katalonstudio/katalon. Here is my replication step

  1. Use docker run to run the script inside the container
    • docker run -t --rm -v “$(pwd)”:/katalon/katalon/source:ro -v “$(pwd)”:/katalon/katalon/report katalonstudio/katalon katalon-execute.sh -retry=0 -statusDelay=15 -testSuiteCollectionPath=“Test Suites/Collection/open browser” -browserType=“Chrome”

Receive exactly the same error

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

[1558067413.309][SEVERE]: bind() failed: Cannot assign requested address (99)

2019-05-17 04:30:13.749 ERROR c.k.k.core.keyword.internal.KeywordMain - ? Unable to open browser with url: ‘https://clickcash-sit.scbabacus-dev.com’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘https://clickcash-sit.scbabacus-dev.com

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 openURL.run(openURL:21)

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:337)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)

at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)

at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)

at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)

at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)

at TempTestSuite1558067409076.run(TempTestSuite1558067409076.groovy:35)

We try the argument that forum suggest also update chrome driver as below
Container

Chrome Version 74.0.3729.131

Chrome driver 74.0.3729.6

This issue is break all of our UI test cases please please fixed this


#20

This issue occur again after upgrade Katalon to 6.2.0 its seem the stack of chrome appear to be conflict


#21

I am still getting same error by adding this args ("–no-sandbox","–disable-infobars"). Any other thoughts?

Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘www.google.com
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 PMACS_Login.run(PMACS_Login:16)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1560914382506.run(TempTestCase1560914382506.groovy:21)
Caused by: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited normally
(unknown error: DevToolsActivePort file doesn’t exist)


#22

You might try to downgrade the Chromedriver:


#23

@Mate_Mrse I have tried with different Chrome Drivers. getting error (com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ) in all
User set preference: [‘args’, ‘"–no-sandbox","–disable-dev-shm-usage"’]

Reason:

On ChromeDriver V2.38 - Caused by: org.openqa.selenium.WebDriverException: chrome not reachable
(Driver info: chromedriver=2.38.552522

On ChromeDriver v2.41, 74, 75 - Caused by: org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn’t exist