io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
My Code:
`import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.remote.MobileCapabilityType;
public class Base {
public static AndroidDriver<AndroidElement> capabilities() throws MalformedURLException{
File f = new File("src");
File fs = new File (f, "ApiDemos-debug.apk");
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "vikas");
cap.setCapability(MobileCapabilityType.APP, fs.getAbsolutePath() );
AndroidDriver<AndroidElement> driver = new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"), cap);
return driver;
}
}
import java.net.MalformedURLException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
public class Basics extends Base
{
public static void main(String[] args) throws MalformedURLException, InterruptedException
{
AndroidDriver driver = capabilities();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.findElementByXPath("//android.widget.TextView[@text='Preference']").click();
}
}`
Eclipse console error:
io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
INFO: Detected dialect: W3C
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at io.appium.java_client.HasSessionDetails.lambda$0(HasSessionDetails.java:52)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at com.google.common.collect.CollectSpliterators$1.lambda$forEachRemaining$1(CollectSpliterators.java:117)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at com.google.common.collect.CollectSpliterators$1.forEachRemaining(CollectSpliterators.java:117)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at io.appium.java_client.HasSessionDetails.getSessionDetails(HasSessionDetails.java:55)
at io.appium.java_client.HasSessionDetails.getSessionDetail(HasSessionDetails.java:59)
at io.appium.java_client.HasSessionDetails.getPlatformName(HasSessionDetails.java:68)
at io.appium.java_client.internal.JsonToMobileElementConverter.<init>(JsonToMobileElementConverter.java:49)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:91)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:96)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:94)
at Base.capabilities(Base.java:20)
at Basics.main(Basics.java:15)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 20 more
Appium log:
C:\Users\E004612>appium
[Appium] Welcome to Appium v1.16.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","platformName":"Android","deviceName":"vikas"},"capabilities":{"firstMatch":[{"appium:app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","appium:deviceName":"vikas","platformName":"android"}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","platformName":"Android","deviceName":"vikas"},null,{"firstMatch":[{"appium:app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","appium:deviceName":"vikas","platformName":"android"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1577352508603 (14:58:28 GMT+0530 (India Standard Time))
[Appium]
[Appium] ======================================================================
[Appium] DEPRECATION WARNING:
[Appium]
[Appium] The 'automationName' capability was not provided in the desired
[Appium] capabilities for this Android session
[Appium]
[Appium] Setting 'automationName=UiAutomator2' by default and using the
[Appium] UiAutomator2 Driver
[Appium]
[Appium] The next major version of Appium (2.x) will require the
[Appium] 'automationName' capability to be set for all sessions on all
[Appium] platforms
[Appium]
[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] 'automationName=UiAutomator1'
[Appium]
[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add 'automationName=UiAutomator1' to your desired capabilities
[Appium]
[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] 'Drivers' menu
[Appium]
[Appium] ======================================================================
[Appium]
[Appium] Appium v1.16.0 creating new AndroidUiautomator2Driver (v1.40.0) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "platformName": "android",
[debug] [BaseDriver] "appium:app": "C:\All_Automation\Tutorial\src\ApiDemos-debug.apk",
[debug] [BaseDriver] "appium:deviceName": "vikas"
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: 33934f35-701a-4fdf-a366-f6bd40ae8da3
[BaseDriver] Using local app 'C:\All_Automation\Tutorial\src\ApiDemos-debug.apk'
[debug] [UiAutomator2] Checking whether app is actually present
[ADB] Found 1 'build-tools' folders under 'C:\Users\E004612\AppData\Local\Android\Sdk' (newest first):
[ADB] C:/Users/E004612/AppData/Local/Android/Sdk/build-tools/29.0.2
[ADB] Using 'adb.exe' from 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb.exe' from 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 28
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 9
[debug] [ADB] Device API level: 28
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_pre_p_apps 1'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_p_apps 1'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy 1'
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Package name: 'io.appium.android.apis'
[ADB] Main activity name: 'ApiDemos'
[debug] [AndroidDriver] Parsed package and activity are: io.appium.android.apis/ApiDemos
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('2.15.0' >= '2.15.0')
[debug] [ADB] There is no need to install/upgrade 'C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android:mock_location allow'
[debug] [Logcat] Starting logcat capture
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8201
[debug] [ADB] Forwarding system: 8201 to device: 6790
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward tcp:8201 tcp:6790'
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] 'io.appium.uiautomator2.server' is installed
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.5.2' >= '4.5.2')
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [ADB] Checking app cert for C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.2.apk
[ADB] Using 'apksigner.bat' from 'C:\Users\E004612\AppData\Local\Android\Sdk\build-tools\29.0.2\apksigner.bat'
[debug] [ADB] Starting 'C:\Users\E004612\AppData\Local\Android\Sdk\build-tools\29.0.2\apksigner.bat' with args '["verify","--print-certs","C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.2.apk"]'
[debug] [ADB] apksigner stdout: Signer appium/appium#1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer appium/appium#1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer appium/appium#1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer appium/appium#1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.2.apk' is already signed.
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is installed
[debug] [ADB] Checking app cert for C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting 'C:\Users\E004612\AppData\Local\Android\Sdk\build-tools\29.0.2\apksigner.bat' with args '["verify","--print-certs","C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk"]'
[debug] [ADB] apksigner stdout: Signer appium/appium#1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer appium/appium#1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer appium/appium#1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer appium/appium#1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already signed.
[UiAutomator2] Server packages are not going to be (re)installed
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list instrumentation'
[debug] [UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[debug] [ADB] Checking app cert for C:\All_Automation\Tutorial\src\ApiDemos-debug.apk
[debug] [ADB] Starting 'C:\Users\E004612\AppData\Local\Android\Sdk\build-tools\29.0.2\apksigner.bat' with args '["verify","--print-certs","C:\All_Automation\Tutorial\src\ApiDemos-debug.apk"]'
[debug] [ADB] apksigner stdout: Signer appium/appium#1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer appium/appium#1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer appium/appium#1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer appium/appium#1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\All_Automation\Tutorial\src\ApiDemos-debug.apk' is already signed.
[debug] [ADB] Getting install status for io.appium.android.apis
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.android.apis'
[debug] [ADB] 'io.appium.android.apis' is installed
[debug] [ADB] Getting package info for 'io.appium.android.apis'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.android.apis'
[ADB] Cannot read version codes of 'C:\All_Automation\Tutorial\src\ApiDemos-debug.apk' and/or 'io.appium.android.apis'
[ADB] Cannot read version names of 'C:\All_Automation\Tutorial\src\ApiDemos-debug.apk' and/or 'io.appium.android.apis'
[debug] [ADB] The current install state of 'C:\All_Automation\Tutorial\src\ApiDemos-debug.apk' is unknown. Installing anyway
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'ls -t -1 /data/local/tmp/appium_cache 2>&1 || echo ERROR''
[debug] [ADB] The count of applications in the cache: 4
[ADB] The application at 'C:\All_Automation\Tutorial\src\ApiDemos-debug.apk' is already cached to '/data/local/tmp/appium_cache/a7c3d3f518bf906dfd994f6290dfc7e6c703ccae.apk'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm install -r /data/local/tmp/appium_cache/a7c3d3f518bf906dfd994f6290dfc7e6c703ccae.apk'
[ADB] The installation of 'ApiDemos-debug.apk' took 2.419s
[debug] [ADB] Install command stdout: Success
[AndroidDriver] Performing fast reset on 'io.appium.android.apis'
[debug] [ADB] Getting install status for io.appium.android.apis
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.android.apis'
[debug] [ADB] 'io.appium.android.apis' is installed
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.android.apis'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm clear io.appium.android.apis'
[debug] [AndroidDriver] Performed fast reset on the installed 'io.appium.android.apis' application (stop and clear)
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
[debug] [UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] Starting UIAutomator2 server 4.5.2
[UiAutomator2] Using UIAutomator2 server from 'C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.2.apk' and test from 'C:\Users\E004612\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"None","value":{"ready":true,"message":"UiAutomator2 Server is ready to accept commands"}}
[debug] [UiAutomator2] The initialization of the instrumentation process took 13362ms
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8201/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"vikas"},"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"emulator-5554","deviceUDID":"emulator-5554","appPackage":"io.appium.android.apis"}],"alwaysMatch":{}}}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38","value":{"sessionId":"d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38","capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"vikas"},"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"emulator-5554","deviceUDID":"emulator-5554","appPackage":"io.appium.android.apis"}],"alwaysMatch":{}}}}
[WD Proxy] Determined the downstream protocol as 'W3C'
[debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8201/wd/hub/session/d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38/appium/device/info] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38","value":{"androidId":"8354ed000443ee6a","manufacturer":"Google","model":"AOSP on IA Emulator","brand":"google","apiVersion":"28","platformVersion":"9","carrierName":"Android","realDisplaySize":"1080x2220","displayDensity":440,"networks":[{"type":0,"typeName":"MOBILE","subtype":13,"subtypeName":"LTE","isConnected":true,"detailedState":"CONNECTED","state":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isFailover":false,"isRoaming":false,"capabilities":{"transportTypes":"TRANSPORT_CELLULAR","networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_IA,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","linkUpstreamBandwidthKbps":51200,"linkDownBandwidthKbps":102400,"signalStrength":-2147483648...
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'io.appium.android.apis/ApiDemos and waiting for 'io.appium.android.apis/ApiDemos'
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n io.appium.android.apis/ApiDemos -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [ADB] We tried to start an activity that doesn't exist, retrying with '.ApiDemos' activity name
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n io.appium.android.apis/.ApiDemos -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [ADB] Waiting up to 20000ms for activity matching pkg: 'io.appium.android.apis' and activity: 'ApiDemos' to be focused
[debug] [ADB] Possible activities, to be checked: 'ApiDemos', 'io.appium.android.apis.ApiDemos'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\E004612\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Found package: 'io.appium.android.apis' and fully qualified activity name : 'io.appium.android.apis.ApiDemos'
[debug] [WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8201/wd/hub/session/d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38/appium/device/pixel_ratio] with body: {}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38","value":2.75}
[debug] [WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8201/wd/hub/session/d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38/appium/device/system_bars] with body: {}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38","value":{"statusBar":66}}
[debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8201/wd/hub/session/d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38/window/current/size] with body: {}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38","value":{"height":2088,"width":1080}}
[Appium] New AndroidUiautomator2Driver session created successfully, session 33934f35-701a-4fdf-a366-f6bd40ae8da3 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1577352555565 (14:59:15 GMT+0530 (India Standard Time))
[debug] [W3C (33934f35)] Cached the protocol value 'W3C' for the new session 33934f35-701a-4fdf-a366-f6bd40ae8da3
[debug] [W3C (33934f35)] Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"vikas"},"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"emulator-5554","deviceUDID":"emulator-5554","appPackage":"io.appium.android.apis","deviceApiLevel":28,"platformVersion":"9","deviceScreenSize":"1080x2220","deviceScreenDensity":440,"deviceModel":"AOSP on IA Emulator","deviceManufacturer":"Google","pixelRatio":2.75,"statBarHeight":66,"viewportRect":{"left":0,"top":66,"width":1080,"height":2022}}}
[HTTP] <-- POST /wd/hub/session 200 46989 ms - 840
[HTTP]
[HTTP] --> GET /wd/hub/session/33934f35-701a-4fdf-a366-f6bd40ae8da3
[HTTP] {}
[debug] [W3C (33934f35)] Calling AppiumDriver.getSession() with args: ["33934f35-701a-4fdf-a366-f6bd40ae8da3"]
[debug] [UiAutomator2] Getting session details from server to mix in
[debug] [WD Proxy] Matched '/' to command name 'getSession'
[debug] [WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8201/wd/hub/session/d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38] with body: {}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"d1bf611f-8f7c-42bc-a7e3-d06ddbfd1a38","value":{}}
[debug] [W3C (33934f35)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"vikas"},"platformName":"android","app":"C:\All_Automation\Tutorial\src\ApiDemos-debug.apk","deviceName":"emulator-5554","deviceUDID":"emulator-5554","appPackage":"io.appium.android.apis","deviceApiLevel":28,"platformVersion":"9","deviceScreenSize":"1080x2220","deviceScreenDensity":440,"deviceModel":"AOSP on IA Emulator","deviceManufacturer":"Google","pixelRatio":2.75,"statBarHeight":66,"viewportRect":{"left":0,"top":66,"width":1080,"height":2022}}
[HTTP] <-- GET /wd/hub/session/33934f35-701a-4fdf-a366-f6bd40ae8da3 200 34 ms - 772
[HTTP]

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace at io.appium.java_client.HasSessionDetails.java:52 and the AndroidDriver construction in Base.java:20. Check the project dependency setup for the missing org.apache.commons.lang3.StringUtils class and reproduce the session initialization; done means the example starts without NoClassDefFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100