Unable to launch tests on Edge Chromium

=============== ROOT CAUSE =====================

I am getting error when launching tests on Edge Chromium

Caused by: org.openqa.selenium.SessionNotCreatedException: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don’t use --user-data-dir

1 Like

have tried tried running without --user-data-dir argument

Hi @reinis.laganovskis,

Sorry for my late response. I would like to suggest some of the following workaround:

  1. Kill Existing Edge Processes
  • Close all Edge browser windows.
  • Open Task Manager (Ctrl + Shift + Esc).
  • Find and end any msedge.exe processes.
  1. Use a Unique User Data Directory
    Modify your script to use a unique user data directory:
import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

// Define a unique Edge user data directory
String edgeProfile = RunConfiguration.getProjectDir() + "/EdgeProfile"

// Open Edge with a new user data directory
WebUI.openBrowser('')
RunConfiguration.setWebDriverPreferencesProperty("args", ["--user-data-dir=" + edgeProfile])
WebUI.navigateToUrl("https://www.google.com")
  1. Run Edge in InPrivate Mode
    Try launching Edge in InPrivate mode to avoid profile conflicts:
RunConfiguration.setWebDriverPreferencesProperty("args", ["--inprivate"])
  1. Manage EdgeDriver Version
    Make sure EdgeDriver matches your Edge browser version:
  • Open Edge and go to edge://settings/help to check the version.
  • Download the correct Edge WebDriver from Microsoft’s official site.
  • Replace the msedgedriver.exe in Katalon Studio (Katalon_Studio/configuration/resources/drivers/edgedriver/).

Hope this can help. Please let us know if it works. Thank you

Hi @reinis.laganovskis,

Can you please take a look and try my suggestions? Let us know if you have solved it or not. If yes, feel free to provide the workaround so that others can refer to. Thank you

I am having the same problem with chrom 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:117)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:43)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:82)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:62)
at Inicio de sesion.run(Inicio de sesion:27)
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:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:124)
at TempTestCase1739812067649.run(TempTestCase1739812067649.groovy:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 132.0.6834.197 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
Host info: host: ‘LAPTOP-I612SUHO’, ip: ‘192.168.100.4’
Build info: version: ‘4.22.0’, revision: ‘c5f3146703’
System info: os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: , extensions: }, unhandledPromptBehavior: ignore, webSocketUrl: true}]}]
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:114)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:162)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:232)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:161)
at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:114)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:88)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:83)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:72)
at com.kms.katalon.selenium.driver.CChromeDriver.(CChromeDriver.java:13)
at com.kms.katalon.core.webui.driver.chrome.ChromeDriverBuilder.createDriver(ChromeDriverBuilder.java:41)
at com.kms.katalon.core.webui.driver.AbstractDriverBuilder.build(AbstractDriverBuilder.java:39)
at com.kms.katalon.core.webui.driver.DriverFactory.startNewBrowser(DriverFactory.java:251)
at com.kms.katalon.core.webui.driver.DriverFactory.openWebDriver(DriverFactory.java:161)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.doCall(OpenBrowserKeyword.groovy:75)
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:35)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:82)
at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:62)
at Script1731510582807.run(Script1731510582807.groovy:27)
… 13 more
)

The above message indicates you have to update your Chrome web driver. You can try to update it using KS’s menu item ‘Tools > Update Web driver’ and then pick your choice. If that fails, then search online for your Chrome version driver (on Chrome, click the 3 dots, then choose Help > About Google Chrome and get your version number there). Copy the Chrome web driver zip file to the KS driver’s folder:

...\Katalon_Studio_Windows_64\configuration\resources\drivers\chromedriver_win32

then unzip the file and move the Chrome exe file and replace the one that is there.

These messages indicates that you are using an old version of Katalon Studio, older than v.8.6.5. See the history. You should upgrade your Katalon Studio. The latest is v10.1.0.

Hi @ellI tried both provided solutions and none of them seemed to work - haven’t found a workaround yet.

Are you trying to replace your Chrome web driver or your Edge web driver?

image

which katalon version are you using? did you update the path properly?

Once our Edge version upgraded to 133.0.3065.59, web driver we upgraded it too. We meet the error “SessionNotCreatedException: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don’t use --user-data-dir”. Try setup browser property solution, but it doesn’t work. Anyone has other solution, please let me know. Apricate it very much

We tried on katalon versions 9.3.2 and 9.7.4 none of them worked

can you upgrade to latest version and confirm

I’ve just upgraded to the very latest version and running a test case in Edge gives this same error:
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don’t use --user-data-dir

I’ll create a ticket and you you guys know.
For ref, I’ve manually updated the Edge browser manually. Chrome is working ok but I need Edge. It was working fine when I ran it a few hours ago in v9.7.3. I have never seen ‘–user-data-dir’ before and as soon as I got this error I restarted my machine

I found a workaround on EdgeDriver Github - this appears to be a webdriver issue:

I tried the workaround below and it works for me.
Go Projects → Settings → Desired Capabilities → Edge Chromium.

Add an entry of Name: 'ms:edgeOptions', Type='Dictionary', open Value and enter the below:
Name='args', Type='List' and Value='--edge-skip-compat-layer-relaunch' (which is a String type)

This affects a version of Edge 133, the current stable release. There is a suggestion to use an earlier edgedriver as mentioned in the GitHub link above but I haven’t tried (someone in that thread mentioned it didn’t work)