docker-android
docker-android copied to clipboard
org.openqa.selenium.SessionNotCreatedException: 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: Could not find a connected Android device in 20127ms.
I have an issue with docker android with selenium grid and appium that I can't find the attached devices my yml file
`version: '3.7'
services:
selenium_hub:
image: selenium/hub:3.141.59-20200515
ports:
- 4444:4444
environment:
GRID_MAX_SESSION: 5
GRID_BROWSER_TIMEOUT: 300
GRID_TIMEOUT: 300
# Using Appium Docker Android
real_device:
image: appium/appium
depends_on:
- selenium_hub
network_mode: "service:selenium_hub"
privileged: true
volumes:
- /dev/bus/usb:/dev/bus/usb
- ~/.android:/root/.android
- $PWD/cyta.apk:/root/tmp
environment:
- CONNECT_TO_GRID=true
- SELENIUM_HOST=selenium_hub
# Enable it for msite testing
#- BROWSER_NAME=chrome
# Docker-Android for Android application testing
nexus_7.1.1:
image: budtmo/docker-android-x86-10.0
privileged: true
# Increase scale number if needed
scale: 1
depends_on:
- selenium_hub
- real_device
ports:
- 6080
# Change path of apk that you want to test. I use sample_apk that I provide in folder "example"
volumes:
- $PWD/cyta.apk:/root/tmp/cyta.apk
- ./video-nexus_7.1.1:/tmp/video
environment:
- DEVICE=Samsung Galaxy S9
- CONNECT_TO_GRID=true
- APPIUM=true
- SELENIUM_HOST=selenium_hub
- AUTO_RECORD=false`
my desired capabilities are platformName=Android deviceName=Samsung Galaxy S9 platformVersion=10.0 APP=pathto/cyta.apk
any help , what can I do to make my code works ?
error :
FAILED CONFIGURATION: @BeforeSuite launchingApp org.openqa.selenium.SessionNotCreatedException: 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: Could not find a connected Android device in 20127ms. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'Magdys-MacBook-Pro.local', ip: 'fdb4:f58e:67c9:3300:46:2f9f:8a05:8752%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.7', java.version: '11.0.2' Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device in 20127ms. at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9) at asyncHandler (/usr/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: 'Magdys-MacBook-Pro.local', ip: 'fdb4:f58e:67c9:3300:46:2f9f:8a05:8752%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.7', java.version: '11.0.2' Driver info: driver.version: AndroidDriver at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208) at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239) 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:336) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37) at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:88) at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:98) at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:94) at com.cyta.Configurations.Capabilities.SetDriver(Capabilities.java:105) at com.cyta.testBase.BaseTest.launchingApp(BaseTest.java:33) 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.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132) at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61) at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366) at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:327) at org.testng.SuiteRunner.run(SuiteRunner.java:286) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218) at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) at org.testng.TestNG.runSuites(TestNG.java:1069) at org.testng.TestNG.run(TestNG.java:1037) 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:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186) ... 34 more
getting similar issue please help
@magdyheiba how did you work around this?
up