Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: session not created: DevToolsActivePort file doesn't exist - Error occurred for launching Windows Touch Shell. #2130

Closed
Urvashi11111122 opened this issue Feb 9, 2024 · 3 comments

Comments

@Urvashi11111122
Copy link

What happened?

I am facing issue "session not created: DevToolsActivePort file doesn't exist" when I am trying to launch Windows Touch Shell by using its binary.

This provided code for launching windows touch shell is properly work on selenium 3.141.59 with io.appium java-client 7.2.0.

I am just trying to upgrade my project with latest version of selenium and appium, but getting error in windows touch shell.

This issue is facing in below version:
Selenium version 4.16.1
Appium : 2.0.1
Appium Java Client Version : 9.0.0

Command used to start Selenium Grid with Docker (or Kubernetes)

Below code is work for chrome binary but for Windows Touch shell binary, it launch the windows touch shell but did not generate session:

System.setProperty("webdriver.chrome.driver", "D:/SeleniumServerBatches/chromedriver_120.0.6099.109.exe");
ChromeOptions options = new ChromeOptions(); 
options.setBinary(m_sfTouchPath); //Windows Touch Shell binary path 
options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.ACCEPT);
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
RemoteWebDriver m_driver = new RemoteWebDriver(new URL("http://127.0.0.1:4711/wd/hub"), capabilities);


Below Standalone command is used:
java -jar -Dwebdriver.chrome.driver="chromedriver_120.0.6099.109.exe" selenium-server-4.16.1.jar standalone --port 4711 --session-timeout 600 --session-request-timeout 600

Relevant log output

Here, is the full error log:

Feb 09, 2024 2:37:30 PM org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer createTracer
INFO: Using OpenTelemetry for tracing
Feb 09, 2024 2:38:31 PM stayinfront.test.automation.framework.MobileAutomationController logInfo
INFO: Could not start a new session. Response code 500. Message: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: session not created: DevToolsActivePort file doesn't exist 
Host info: host: 'COMPUTER000293', ip: '192.168.29.30'
Build info: version: '4.16.1', revision: '9b4c83354e'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: driver.version: unknown
Build info: version: '4.16.1', revision: '9b4c83354e'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: driver.version: unknown
Build info: version: '4.16.1', revision: '9b4c83354e'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], binary: C:/Program Files (x86)/Stay..., extensions: []}}]}]
Capabilities {browserName: chrome, goog:chromeOptions: {args: [], binary: C:/Program Files (x86)/Stay..., extensions: []}}

java.lang.AssertionError: Could not start a new session. Response code 500. Message: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: session not created: DevToolsActivePort file doesn't exist 
Host info: host: 'COMPUTER000293', ip: '192.168.29.30'
Build info: version: '4.16.1', revision: '9b4c83354e'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: driver.version: unknown
Build info: version: '4.16.1', revision: '9b4c83354e'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: driver.version: unknown
Build info: version: '4.16.1', revision: '9b4c83354e'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], binary: C:/Program Files (x86)/Stay..., extensions: []}}]}]
Capabilities {browserName: chrome, goog:chromeOptions: {args: [], binary: C:/Program Files (x86)/Stay..., extensions: []}}

	at org.testng.Assert.fail(Assert.java:111)
	at stayinfront.test.automation.framework.MobileAutomationController.returnTestFailed(MobileAutomationController.java:529)
	at stayinfront.test.automation.framework.MobileAutomationController.initializeForWindowsShell(MobileAutomationController.java:273)
	at stayinfront.test.automation.framework.MobileAutomationController.initialize(MobileAutomationController.java:512)
	at stayinfront.test.automation.framework.TestBase.initialize(TestBase.java:25)
	at stayinfront.test.automation.framework.TestBase.initialize(TestBase.java:64)
	at stayinfront.test.automation.cg.TestSuite.setup(TestSuite.java:29)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:390)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:325)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:382)
	at org.testng.SuiteRunner.run(SuiteRunner.java:336)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1280)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1200)
	at org.testng.TestNG.runSuites(TestNG.java:1114)
	at org.testng.TestNG.run(TestNG.java:1082)
	at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73)
	at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)

Operating System

Windows 10 Pro

Docker Selenium version (image tag)

Selenium version 4.16.1, Appium : 2.0.1, Appium Java Client Version : 9.0.0

Selenium Grid chart version (chart version)

No response

Copy link

github-actions bot commented Feb 9, 2024

@Urvashi11111122, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

Copy link

github-actions bot commented Feb 9, 2024

💬 Please ask questions at:

@github-actions github-actions bot closed this as completed Feb 9, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants