Open aravindaw opened 2 years ago
I haven't seen this message... but it said androidx.test.runner.AndroidJUnitRunner
did not exist
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.AndroidJUnitRunner" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/android.test.base.jar", zip file "/data/app/
T7FVk4Aqm4p15IEFMnxD_A==/io.appium.espressoserver.test-lci8S2c8RIr31hO7d7Cmrw==/base.apk", zip file "/data/app/zkI0sTIYNBWokBXOR52asw==/com.ravin.testapp-qlia8MYp4N3LzcFdKsI2JQ==/base.apk"],nativeLibraryDirectories=[/system/lib64, /system_ext/lib64]]
Could you try out appium 2 and latest espresso driver?
Hello guys, I think the error I'm getting is the same error as @aravindaw .
[AppiumDriver@6b82] 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.
Environment
Java:11 Appium:v2.0.0-beta.44
Appium config:
platform: 'Android',
port: 4723,
deviceName: 'emulator-5554',
automationName: 'Espresso',
platformVersion: '11',
showGradleLog: true,
forceEspressoRebuild:true
Appium log:
[debug] [ADB] Install command stdout: Serving...
[debug] [ADB] Performing Incremental Install
[debug] [ADB] Success
[debug] [ADB] Install command complete in 3541 ms
[EspressoDriver@f528 (3c75677a)] Installed Espresso Test Server apk '/var/folders/px/nb05f7_x6z590chpgnj86kr80000gs/T/io.appium.espressoserver.test_2.11.0_br.com.xxxx.xxx.dev_emulator-5554.apk' (pkg: 'io.appium.espressoserver.test')
[ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[debug] [ADB] Running '/Users/bi004330/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[debug] [EspressoDriver@f528 (3c75677a)] Performing cleanup of automation leftovers
[debug] [EspressoDriver@f528 (3c75677a)] No obsolete sessions have been detected (socket hang up)
[EspressoDriver@f528 (3c75677a)] Starting Espresso Server v2.11.0 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","-e","debug",false,"-e","disableAnalytics",true,"io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[EspressoDriver@f528 (3c75677a)] Waiting up to 60000ms for Espresso server to be online
[debug] [EspressoDriver@f528 (3c75677a)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@f528 (3c75677a)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@f528 (3c75677a)] socket hang up
[debug] [EspressoDriver@f528 (3c75677a)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@f528 (3c75677a)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@f528 (3c75677a)] socket hang up
[debug] [EspressoDriver@f528 (3c75677a)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@f528 (3c75677a)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@f528 (3c75677a)] socket hang up
[debug] [EspressoDriver@f528 (3c75677a)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@f528 (3c75677a)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@f528 (3c75677a)] socket hang up
[debug] [EspressoDriver@f528 (3c75677a)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@f528 (3c75677a)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@f528 (3c75677a)] socket hang up
[debug] [EspressoDriver@f528 (3c75677a)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@f528 (3c75677a)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@f528 (3c75677a)] socket hang up
[debug] [EspressoDriver@f528 (3c75677a)] [Instrumentation] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [EspressoDriver@f528 (3c75677a)] INSTRUMENTATION_CODE: 0
[debug] [EspressoDriver@f528 (3c75677a)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@f528 (3c75677a)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@f528 (3c75677a)] socket hang up
[EspressoDriver@f528 (3c75677a)] Instrumentation process exited with code 0 from signal null
[EspressoDriver@f528 (3c75677a)] Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details
[debug] [EspressoDriver@f528 (3c75677a)] Deleting espresso session
Only adb log helps to find possible reasons. Usually appium version is not related. Basically appium-espresso-driver version, the app under test and Android OS's combination
Facing the same issue. with appium 1.22.3. Any update or solution for this. Please let us know
Facing the same issue (cf. ticket https://github.com/appium/appium-espresso-driver/issues/839), working with a dev on analyzing and testing solutions but no progress so far...
Bumped into this same issue appium version Appium v2.0.0-beta.48
[debug] [ADB] Removing forwarded port socket connection: 8300
[debug] [ADB] Running '/Users/.../Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8300'
[debug] [AppiumDriver@51eb] Event 'newSessionStarted' logged at 1673373330766 (17:55:30 GMT+0000 (Western European Standard Time))
[debug] [AppiumDriver@51eb] 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.
[debug] [AppiumDriver@51eb] 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.
[debug] [AppiumDriver@51eb] at Object.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[debug] [AppiumDriver@51eb] at condFn (/Users/<user>/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:287:20)
[debug] [AppiumDriver@51eb] at spin (/Users/<user>/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:221:26)
[debug] [AppiumDriver@51eb] at spin (/Users/<user>/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:20)
[debug] [AppiumDriver@51eb] at waitForCondition (/Users/<user>/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:238:10)
[debug] [AppiumDriver@51eb] at EspressoRunner.startSession (/Users/<user>/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:281:7)
[debug] [AppiumDriver@51eb] at EspressoDriver.startEspressoSession (/Users/<user>/.appium/node_modules/appium-espresso-driver/lib/driver.js:444:5)
[debug] [AppiumDriver@51eb] at EspressoDriver.createSession (/Users/<user>/.appium/node_modules/appium-espresso-driver/lib/driver.js:224:7)
[debug] [AppiumDriver@51eb] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /session 500 19648 ms - 1756
[HTTP]
^C[Appium] Received SIGINT - shutting down
[debug] [AppiumDriver@51eb] There are no active sessions for cleanup
[HTTP] Waiting until the server is closed
[HTTP] Received server close event
<user>@ Rui Reis-C02GG0LXML85 test-js % appium
[Appium] Welcome to Appium v2.0.0-beta.48
[Appium] Attempting to load driver uiautomator2...
[debug] [Appium] Requiring driver at /Users/.../.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver xcuitest...
[debug] [Appium] Requiring driver at /Users/.../.appium/node_modules/appium-xcuitest-driver
[Appium] Attempting to load driver espresso...
[debug] [Appium] Requiring driver at /Users/.../.appium/node_modules/appium-espresso-driver
(node:20032) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
I'm trying to start the espresso driver and it crashes when instantiating the instruments. I tried a couple of configurations but with no success. I kept the Appium cap versions and app config versions exactly the same. Also tried to find a solution in here but didn't work as well.
Environment
Java:11 Appium:1.22.3-4 GUI
Appium config:
espressoBuildConfig:
Appium log
Logcat
If I run
adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
locally I get the same exception as the appium log.