WebUI.openBrowser is Unable to find a free port

I created a new test case and typed one command:

WebUI.openBrowser("")

When I ran it, it came with an error:

2020-08-19 19:50:34.278 DEBUG testcase.tc_number2 - 1: openBrowser("")
2020-08-19 19:50:34.578 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome’ driver
Aug 19, 2020 7:50:34 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using new ChromeOptions() is preferred to DesiredCapabilities.chrome()
2020-08-19 19:50:34.617 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 milliseconds
Reason:
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:73)
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 tc_number2.run(tc_number2:19)
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:339)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:330)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:309)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:235)
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 TempTestCase1597840938309.run(TempTestCase1597840938309.groovy:25)
Caused by: java.lang.RuntimeException: Unable to find a free port
at org.openqa.selenium.net.PortProber.findFreePort(PortProber.java:67)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:351)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:94)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:147)
at com.kms.katalon.selenium.driver.CChromeDriver.(CChromeDriver.java:13)
at com.kms.katalon.core.webui.driver.DriverFactory.createNewChromeDriver(DriverFactory.java:386)
at com.kms.katalon.core.webui.driver.DriverFactory.startNewBrowser(DriverFactory.java:344)
at com.kms.katalon.core.webui.driver.DriverFactory.openWebDriver(DriverFactory.java:235)
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)
… 17 more

I had tried with any URLs and any browsers. It happened the same.

However, it worked when I switched to another network.

2020-08-19 19:47:20.690 DEBUG testcase.tc_number2 - 1: openBrowser("")
2020-08-19 19:47:20.894 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome’ driver
Aug 19, 2020 7:47:20 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using new ChromeOptions() is preferred to DesiredCapabilities.chrome()
2020-08-19 19:47:20.922 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 milliseconds
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 34654
Only local connections are allowed.
Please see ChromeDriver - WebDriver for Chrome - Security Considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Aug 19, 2020 7:47:22 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
2020-08-19 19:47:22.999 INFO c.k.k.core.webui.driver.DriverFactory - sessionId = 1e19506386efc011e81b94015c27c362
2020-08-19 19:47:23.053 INFO c.k.k.core.webui.driver.DriverFactory - browser = Chrome 84.0.4147.135
2020-08-19 19:47:23.054 INFO c.k.k.core.webui.driver.DriverFactory - platform = Mac OS X
2020-08-19 19:47:23.055 INFO c.k.k.core.webui.driver.DriverFactory - seleniumVersion = 3.141.59
2020-08-19 19:47:23.056 INFO c.k.k.core.webui.driver.DriverFactory - proxyInformation = ProxyInformation { proxyOption=NO_PROXY, proxyServerType=HTTP, username=, password=********, proxyServerAddress=, proxyServerPort=0, executionList="", isApplyToDesiredCapabilities=true }

Are there any configurations to edit if I really wish to use this network?

It looks different to this error. I cannot find such the port running this. Unable to find free port

There is No driver is set for execution. in your error trace. Make sure you have the right version of Chromedriver. You should update the version to match your Chrome version. How to update.

Also, see that your execution settings are ok.

And finally, your error trace shows you are using DriverFactory class. You might need to add the path to Chromedriver at the top of your script:

System.setProperty(‘webdriver.chrome.driver’, ‘path to chromedriver’)

System.setProperty('webdriver.chrome.driver','/Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/drivers/chromedriver_mac/chromedriver')
WebUI.openBrowser("https://www.google.com/ncr")

With these commands above, the error remains the same. Chromedriver is matched at the first glance. The most wondering part is that just changing the SSID to connect makes it work already.