Getting server error( socket hang up )

Hi All,

I am getting the below error while I am running the script in emulator ( Real device was fine )

Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 10.0. The following are available: ac4a1011 (11)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’

System info: host: ‘Arjuns-MBP’, ip: ‘fdf8:9a78:824d:6f00:147d:dd30:8eb2:b238%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘15.0.2’

Driver info: driver.version: AndroidDriver

remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 10.0. The following are available: ac4a1011 (11)

at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)

at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’

System info: host: ‘Arjuns-MBP’, ip: ‘fdf8:9a78:824d:6f00:147d:dd30:8eb2:b238%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘15.0.2’

Driver info: driver.version: AndroidDriver

at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:216)

at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:225)

at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:247)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)

at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)

at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)

at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:338)

at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)

at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37)

at io.appium.java_client.AppiumDriver.(AppiumDriver.java:89)

at io.appium.java_client.AppiumDriver.(AppiumDriver.java:99)

at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:96)

at com.qa.BaseTest.beforeTest(BaseTest.java:251)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:564)

at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)

at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)

at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)

at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)

at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:637)

at org.testng.TestRunner.beforeRun(TestRunner.java:627)

at org.testng.TestRunner.run(TestRunner.java:589)

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)

Caused by: java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:564)

at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:193)

… 38 more

Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 10.0. The following are available: ac4a1011 (11)

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’

System info: host: ‘Arjuns-MBP’, ip: ‘fdf8:9a78:824d:6f00:147d:dd30:8eb2:b238%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘15.0.2’

Driver info: driver.version: AndroidDriver

remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 10.0. The following are available: ac4a1011 (11)

at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)

at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)

at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)

at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)

at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)

at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)

at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)

at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)

at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)

at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)

at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)

at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)

at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)

… 43 more

@Aleksei / @willosser

when I checked in the internet it showing the issue was with ( Socket hangup and force closing the app )
this was exact error i am getting
Kindly provide any solution
I was struck here pls get me out of these

I see:
Original error: Unable to find an active device or emulator with OS 10.0. The following are available: ac4a1011 (11)

you really need so old iOS version?

I think you’ve got the right cause but the wrong OS. I believe he is testing Android, and Android 10 isn’t that old. My question is does the (11) represent the OS version? If so just changing capabilities to that OS version would probably fix this.

Aaaaa. Sorry I read ‘OS’ as ‘iOS’.

issue was resolved
Thanks Aleksei

Yes I changed the version 11
it solved the problem

Thanks
wreed