Jump to content
We've recently updated our Privacy Statement, available here ×
  • Could not start a new session. Response code 500. Message: unknown error: DevToolsActivePort file doesn't exist | Selenium, TestNG, Cucumber, Chrome browser


    While we were trying to run the automation code in AWS workspaces, we stuck with the following error message and the temporary solution was to add the following argument to the chrome browser. 

    options.addArguments("--remote-debugging-port=9222"); 

    The observation is that even after adding this argument, we have to make sure that the browser is NOT opened in the AWS instance. 

    [RemoteTestNG] detected TestNG version 7.4.0SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.Starting ChromeDriver 111.0.6615.69 (bd2a7bcb881c11e8cfe3078709382934e3916914-refs/branch-heads/5615@{#936}) on port 16598Only local connections are allowed.Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.ChromeDriver was started successfully.FAILED: testorg.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: DevToolsActivePort file doesn't exist Host info: host: 'DESKTOP-', ip: '10.222.112.9'Build info: version: '4.9.0', revision: 'd7057100a6'System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.6'Driver info: org.openqa.selenium.chrome.ChromeDriverCommand: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*, --ignore-certificate-errors, --disable-dev-shm-usage], extensions: []}}]}]	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:94)	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:68)	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:165)	at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:183)	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:158)	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:229)	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:157)	at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:101)	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:88)	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:84)	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:73)	at com.test.Test2.test(Test2.java:22)	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)	at java.base/java.lang.reflect.Method.invoke(Method.java:568)	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598)	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)	at org.testng.TestRunner.privateRun(TestRunner.java:794)	at org.testng.TestRunner.run(TestRunner.java:596)	at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)	at org.testng.SuiteRunner.run(SuiteRunner.java:276)	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)	at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)	at org.testng.TestNG.runSuites(TestNG.java:1063)	at org.testng.TestNG.run(TestNG.java:1031)	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)===============================================    Default test    Tests run: 1, Failures: 1, Skips: 0==============================================================================================Default suiteTotal tests run: 1, Passes: 0, Failures: 1, Skips: 0===============================================

    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...