Trying to connect to appium server using appium inspector(espresso driver). Server successfully started with uiautomator2, but failing with espresso driver. Can someone help here. Below are the driver capabilities using to connect to appium server:
{
"platformName": "Android",
"appium:platformVersion": "12",
"appium:deviceName": "RF8M221RD0E",
"appium:showLogs": "True",
"appium:automationName": "Espresso",
"appium:appActivity": "com.company.common.view.Activity",
"appium:appPackage": "com.company.cloud.rc"
}
app is installing but while creating session is the problem.
Install command stdout: Serving...
[ADB] Performing Incremental Install
[ADB] Success
[ADB] Install command complete in 496 ms
[Espresso] Installed Espresso Test Server apk '/var/folders/dt/kshcjghj4fg2zn_jtds90r3r0000gp/T/io.appium.espressoserver.test_1.45.3_com.company.cloud.rc_RF8M221RD0E.apk' (pkg: 'io.appium.espressoserver.test')
[ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[ADB] Running '/Users/<user_name>/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8M221RD0E shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[Espresso] Performing cleanup of automation leftovers
[Espresso] No obsolete sessions have been detected (socket hang up)
[Espresso] Starting Espresso Server v1.45.3 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","RF8M221RD0E","shell","am","instrument","-w","-e","debug",false,"-e","disableAnalytics",true,"io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[Espresso] Waiting up to 45000ms for Espresso server to be online
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://localhost:8300/status] with no body
[WD Proxy] socket hang up
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://localhost:8300/status] with no body
[WD Proxy] socket hang up
[Espresso] [Instrumentation] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[Espresso] INSTRUMENTATION_CODE: 0
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://localhost:8300/status] with no body
[WD Proxy] socket hang up
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://localhost:8300/status] with no body
[WD Proxy] socket hang up
[Espresso] Instrumentation process exited with code 0 from signal null
[Espresso] Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details
[Espresso] Deleting espresso session
[ADB] Running '/Users/<user_name>/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8M221RD0E shell am force-stop com.company.cloud.rc'
[Logcat] Stopping logcat capture
[Espresso] Restoring hidden api policy to the device default configuration
[ADB] Running '/Users/<user_name>/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8M221RD0E shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[ADB] Removing forwarded port socket connection: 8300
[ADB] Running '/Users/<user_name>/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8M221RD0E forward --remove tcp:8300'
[BaseDriver] Event 'newSessionStarted' logged at 1695731719930 (08:35:19 GMT-0400 (Eastern Daylight Time))
[W3C] Encountered internal error running command: A new session could not be created. Details: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[W3C] Error: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[W3C] at Object.errorAndThrow (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/logging.js:94:35)
[W3C] at condFn (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:283:18)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:138:26)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:20)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at spin (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14)
[W3C] at waitForCondition (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:155:10)
[W3C] at EspressoRunner.startSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:277:7)
[W3C] at EspressoDriver.startEspressoSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-espresso-driver/lib/driver.js:318:5)
[W3C] at EspressoDriver.createSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-espresso-driver/lib/driver.js:188:7)
[W3C] at AppiumDriver.createSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/lib/appium.js:387:35)
[HTTP] <-- POST /wd/hub/session 500 134843 ms - 3710
Versions used are below, Let me know if any other versions are required.
gradle -version
------------------------------------------------------------
Gradle 8.3
------------------------------------------------------------
Build time: 2023-08-17 07:06:47 UTC
Revision: 8afbf24b469158b714b36e84c6f4d4976c86fcd5
Kotlin: 1.9.0
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 20.0.1 (Homebrew 20.0.1)
OS: Mac OS X 13.4.1 aarch64
java -version
java version "11.0.20" 2023-07-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.20+9-LTS-256)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.20+9-LTS-256, mixed mode)
appium driver install espresso
✔ Installing 'espresso' using NPM install spec 'appium-espresso-driver'
ℹ Driver [email protected] successfully installed
- automationName: Espresso
- platformNames: ["Android"]
appium --version
2.1.3
Let me know if anything required. Thanks