appium-espresso-driver: Not able to launch activity with espresso driver version 1.11.0

Same code works fine for appium-espresso-driver version 1.10.1 Below is the error log :

Error in onReload hook: "Error: A new session could not be created. Details: io.appium.espressoserver.lib.handlers.exceptions.SessionNotCreatedException: java.lang.RuntimeException: Could not launch activity at io.appium.espressoserver.lib.handlers.CreateSession.handle(CreateSession.kt:37) at io.appium.espressoserver.lib.handlers.CreateSession.handle(CreateSession.kt:26) at io.appium.espressoserver.lib.http.Router.route(Router.java:335) at io.appium.espressoserver.lib.http.Server.serve(Server.java:69) at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945) at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192) at java.lang.Thread.run(Thread.java:764) Caused by: java.lang.RuntimeException: Could not launch activity at androidx.test.runner.MonitoringInstrumentation.startActivitySync(MonitoringInstrumentation.java:467) at io.appium.espressoserver.lib.helpers.ActivityHelper.startActivity(ActivityHelper.java:70) at io.appium.espressoserver.lib.handlers.CreateSession.handle(CreateSession.kt:34) ... 6 more Caused by: java.lang.RuntimeException: Unable to resolve activity for: Intent { act=android.intent.action.MAIN flg=0x14000000 cmp=com.abc.xyz/.com.efg.pax.newface.presentation.newface.NewFace } at ̦(Instrumentation.java:439) at androidx.test.runner.MonitoringInstrumentation.access$101(MonitoringInstrumentation.java:98) at androidx.test.runner.MonitoringInstrumentation$4.call(MonitoringInstrumentation.java:443) at androidx.test.runner.MonitoringInstrumentation$4.call(MonitoringInstrumentation.java:440) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) ... 1 more

I can see a . after app package name. If i remove that and run adb shell am start -n com.abc.xyz/com.egf.pax.newface.presentation.newface.NewFace the activity is successfully launched. I am not sure why is . added.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 18 (5 by maintainers)

Most upvoted comments

@pwunsch This was fixed after appium 1.13.0 was already out. The fix will be in when appium 1.13.1 is released or you can try it now in appium@beta

@juandg Could you please try if https://github.com/appium/appium-espresso-driver/pull/441 works for you? Here you can find more info on how to run Appium from source and here on how to build the server apk.

OK, this is seriously broken. I’m using Appium v1.13.0 which bundles the Espresso Driver v1.11.0 and have tried this on different machines and different phones as well as the emulator (including a brand new avd instance) to avoid any sort of isolated issue and I keep getthing this error.

These are the capabilities I’m using:

caps = {
  "platformName": "Android",
  "appActivity": "com.example.MyApp.MainActivity",
  "appPackage": "com.example.enterpriseapp",
  "app": "https://server.example.com/MobileApp/job/build/MyTestApp.apk",
  "avd": "Pixel_2_API_28",
  "deviceName": "Android Emulator",
  "automationName": "espresso"
}

They work fine on UIAutomator and UIAutomator2 but as soon as I switch to Espresso then I hit this issue. Here’s the appium log on a brand new AVD image:

[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{"platformName":"Android","appium:appActivity":"com.example.MyApp.MainActivity","appium:appPackage":"com.example.enterpriseapp","appium:app":"https://server.example.com/MobileApp/job/build/MyTestApp.apk","appium:avd":"Pixel_2_API_28","appium:deviceName":"Android Emulator","appium:automationName":"espresso"}]},"desiredCapabilities":{"platformName":"Android","appActivity":"com.example.MyApp.MainActivity","appPackage":"com.example.enterpriseapp","app":"https://server.example.com/MobileApp/job/build/MyTestApp.apk","avd":"Pixel_2_API_28","deviceName":"Android Emulator","automationName":"espresso"}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","appActivity":"com.example.MyApp.MainActivity","appPackage":"com.example.enterpriseapp","app":"https://server.example.com/MobileApp/job/build/MyTestApp.apk","avd":"Pixel_2_API_28","deviceName":"Android Emulator","automationName":"espresso"},null,{"firstMatch":[{"platformName":"Android","appium:appActivity":"com.example.MyApp.MainActivity","appium:appPackage":"com.example.enterpriseapp","appium:app":"https://server.example.com/MobileApp/job/build/MyTestApp.apk","appium:avd":"Pixel_2_API_28","appium:deviceName":"Android Emulator","appium:automationName":"espresso"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1556832604758 (14:30:04 GMT-0700 (PDT))
[Appium] Appium v1.13.0 creating new EspressoDriver (v1.11.0) session
[Appium] Capabilities:
[Appium]   platformName: Android
[Appium]   appActivity: com.example.MyApp.MainActivity
[Appium]   appPackage: com.example.enterpriseapp
[Appium]   app: https://server.example.com/MobileApp/job/build/MyTestApp.apk
[Appium]   avd: Pixel_2_API_28
[Appium]   deviceName: Android Emulator
[Appium]   automationName: espresso
[debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities {"platformName":"Android","... were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa...
[BaseDriver] Session created with session id: f3ff3d0c-141d-4f86-ae91-b8b44141426a
[BaseDriver] Using downloadable app 'https://server.example.com/MobileApp/job/build/MyTestApp.apk'
[debug] [BaseDriver] Last-Modified: Thu, 02 May 2019 09:32:09 GMT
[debug] [BaseDriver] Reusing already downloaded application at '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk'
[BaseDriver] Reusing the previously downloaded application at '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk'
[debug] [Espresso] Checking whether app is actually present
[Espresso] EspressoDriver version: 1.11.0
[ADB] Using 'adb' from '/Users/someuser/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Trying to find 'Pixel_2_API_28' emulator
[debug] [ADB] Getting connected emulators
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] 1 emulator(s) connected
[debug] [ADB] Sending telnet command to device: avd name
[debug] [ADB] Getting running emulator port
[debug] [ADB] Socket connection to device created
[debug] [ADB] Socket connection to device ready
[debug] [ADB] Telnet command got response: Pixel_2_API_28
[debug] [ADB] Found emulator 'Pixel_2_API_28' on port 5554
[debug] [ADB] Setting device id to emulator-5554
[debug] [AndroidDriver] Not launching AVD because it is already running.
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/Users/someuser/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 28
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -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
[Espresso] Relaxing hidden api policy
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_pre_p_apps 1'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_p_apps 1'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings put global hidden_api_policy 1'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -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 '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is not installed
[debug] [ADB] App '/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk' is not installed
[debug] [ADB] Installing '/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'ls -t -1 /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
[debug] [ADB] Got an error 'ls: /data/local/tmp/appium_cache: No such file or directory' while getting the list of files in the cache. Assuming the cache does not exist yet
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell mkdir -p /data/local/tmp/appium_cache'
[debug] [ADB] The count of applications in the cache: 0
[ADB] Caching the application at '/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk' to '/data/local/tmp/appium_cache/728413456b86856a2003edeb524d6bd577ca6418.apk'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell mkdir -p /data/local/tmp/appium_cache'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 push /Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk /data/local/tmp/appium_cache/728413456b86856a2003edeb524d6bd577ca6418.apk'
[ADB] The upload of 'settings_apk-debug.apk' (1.16 MB) took 0.091s
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm install -g /data/local/tmp/appium_cache/728413456b86856a2003edeb524d6bd577ca6418.apk'
[ADB] The installation of 'settings_apk-debug.apk' took 0.556s
[debug] [ADB] Install command stdout: Success
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f io\\.appium\\.settings'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [Logcat] Starting logcat capture
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global animator_duration_scale'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global transition_animation_scale'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global window_animation_scale'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am broadcast -a io.appium.settings.animation -n io.appium.settings/.receivers.AnimationSettingReceiver --es setstatus disable'
[debug] [Espresso] Forwarding Espresso Server port 6791 to 8300
[debug] [ADB] Forwarding system: 8300 to device: 6791
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp\:8300 tcp\:6791'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [ADB] Checking app cert for /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk
[ADB] Using 'apksigner' from '/Users/someuser/Library/Android/sdk/build-tools/28.0.3/apksigner'
[debug] [ADB] Starting '/Users/someuser/Library/Android/sdk/build-tools/28.0.3/apksigner' with args '["verify","--print-certs","/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk"]'
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk' is already signed.
[debug] [ADB] Getting install status for com.example.enterpriseapp
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.example.enterpriseapp'
[debug] [ADB] 'com.example.enterpriseapp' is not installed
[debug] [ADB] Getting install status for com.example.enterpriseapp
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.example.enterpriseapp'
[debug] [ADB] 'com.example.enterpriseapp' is not installed
[debug] [ADB] App '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk' is not installed
[debug] [ADB] Installing '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -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: 1
[ADB] Caching the application at '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk' to '/data/local/tmp/appium_cache/8e164e2a8b5011cb6131b8fae5d3240796ae7c76.apk'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell mkdir -p /data/local/tmp/appium_cache'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 push /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/201942-98537-oj3uva.44ke/MyTestApp.apk /data/local/tmp/appium_cache/8e164e2a8b5011cb6131b8fae5d3240796ae7c76.apk'
[ADB] The upload of 'MyTestApp.apk' (33.81 MB) took 0.347s
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appium_cache/8e164e2a8b5011cb6131b8fae5d3240796ae7c76.apk'
[ADB] The installation of 'MyTestApp.apk' took 7.711s
[debug] [ADB] Install command stdout: Success
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ls /data/local/tmp/espresso.apppackage'
[debug] [Espresso] The previous target application package is unknown
[Espresso] Forcing Espresso server rebuild because of changed application package
[debug] [Espresso] Deleting the obsolete Espresso server package '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk'
[Espresso] Repackaging espresso server for: 'com.example.enterpriseapp'
[Espresso] Creating new manifest: '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/AndroidManifest.xml'
[debug] [ADB] Found the most recent Android platform: {"platform":"android-28","platformPath":"/Users/someuser/Library/Android/sdk/platforms/android-28"}
[ADB] Using 'aapt' from '/Users/someuser/Library/Android/sdk/build-tools/28.0.3/aapt'
[debug] [ADB] Compiling the manifest: /Users/someuser/Library/Android/sdk/build-tools/28.0.3/aapt package -M /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/AndroidManifest.xml --rename-manifest-package io.appium.espressoserver.test --rename-instrumentation-target-package com.example.enterpriseapp -I /Users/someuser/Library/Android/sdk/platforms/android-28/android.jar -F /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/AndroidManifest.xml.apk -f
[debug] [ADB] Compiled the manifest at '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/AndroidManifest.xml.apk'
[debug] [ADB] Inserting manifest, src: /Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/appium-espresso-driver/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk dst: /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk
[debug] [ADB] Unzipping '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/AndroidManifest.xml.apk' to '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T'
[debug] [ADB] Unzip successful
[debug] [ADB] Testing new tmp apk
[debug] [ADB] Moving manifest
[debug] [ADB] Inserted manifest.
[Espresso] Repackaged espresso server ready: '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk'
[debug] [ADB] Checking app cert for /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk
[debug] [ADB] Starting '/Users/someuser/Library/Android/sdk/build-tools/28.0.3/apksigner' with args '["verify","--print-certs","/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk"]'
[ADB] Got an error during apksigner execution: Command '/Users/someuser/Library/Android/sdk/build-tools/28.0.3/apksigner verify --print-certs /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' exited with code 1
[ADB] apksigner stderr: DOES NOT VERIFY
[ADB] ERROR: JAR signer CERT.RSA: JAR signature META-INF/CERT.SF indicates the APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped?
[ADB]
[debug] [ADB] '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' is not signed with debug cert
[ADB] Using 'zipalign' from '/Users/someuser/Library/Android/sdk/build-tools/28.0.3/zipalign'
[debug] [ADB] /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' is already zip-aligned. Doing nothing
[debug] [ADB] Signing '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' with default cert
[debug] [ADB] Starting '/Users/someuser/Library/Android/sdk/build-tools/28.0.3/apksigner' with args '["sign","--key","/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8","--cert","/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem","/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk"]'
[debug] [ADB] Uninstalling io.appium.espressoserver.test
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is not installed
[ADB] io.appium.espressoserver.test was not uninstalled, because it was not present on the device
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is not installed
[debug] [ADB] App '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' is not installed
[Espresso] Installing Espresso Test Server apk from the target device (path: '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk')
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -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: 2
[ADB] Caching the application at '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' to '/data/local/tmp/appium_cache/ab334952a08001db136dbf9f1a2188d909e39d89.apk'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell mkdir -p /data/local/tmp/appium_cache'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 push /var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk /data/local/tmp/appium_cache/ab334952a08001db136dbf9f1a2188d909e39d89.apk'
[ADB] The upload of 'io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' (4.97 MB) took 0.095s
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appium_cache/ab334952a08001db136dbf9f1a2188d909e39d89.apk'
[ADB] The installation of 'io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' took 1.601s
[debug] [ADB] Install command stdout: Success
[Espresso] Installed Espresso Test Server apk '/var/folders/h9/c658z4xs62v1zjkymcxq5dwh15hrn3/T/io.appium.espressoserver.test_1.11.0_com.example.enterpriseapp.apk' (pkg: 'io.appium.espressoserver.test')
[Espresso] Adjusted activity 'com.example.MyApp.MainActivity' to fully qualified version: 'com.example.enterpriseapp.com.example.MyApp.MainActivity'
[Espresso] Adjusted activity 'com.example.MyApp.MainActivity' to fully qualified version: 'com.example.enterpriseapp.com.example.MyApp.MainActivity'
[debug] [Espresso] Performing cleanup of automation leftovers
[debug] [Espresso] No obsolete sessions have been detected (Error: socket hang up)
[Espresso] Starting Espresso Server v1.11.0 with cmd: adb shell am instrument -w -e debug false 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","io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [Espresso] [Instrumentation] [STDOUT]
[Espresso] Waiting for Espresso to be online...
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8300/status] with no body
[WD Proxy] Got an unexpected response: {"code":"ECONNRESET"}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8300/status] with no body
[debug] [WD Proxy] Got response with status 200: "{\"id\":\"275fa1f6-a878-4806-9525-7844ef7f3298\",\"sessionId\":null,\"status\":0,\"value\":null}"
[debug] [WD Proxy] Determined that the downstream protocol for proxy is MJSONWP
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8300/session] with body: {"desiredCapabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","appActivity":"com.example.MyApp.MainActivity","appPackage":"com.example.enterpriseapp","app":"https://server.example.com/MobileApp/job/build/MyTestApp.apk","avd":"Pixel_2_API_28","deviceName":"Android Emulator","automationName":"espresso"},"platformName":"Android","appActivity":"com.example.enterpriseapp.com.example.MyApp.MainActivity","appPackage":"com.example.enterpriseapp","app":"https://server.example.com/MobileApp/job/build/MyTestApp.apk","avd":"Pixel_2_API_28","deviceName":"emulator-5554","automationName":"espresso","deviceUDID":"emulator-5554","appWaitPackage":"com.example.enterpris...
[WD Proxy] Got an unexpected response: {"id":"dd82151a-feba-4e55-bf94-d73e2772703e","sessionId":null,"status":33,"value":"io.appium.espressoserver.lib.handlers.exceptions.SessionNotCreatedException: java.lang.RuntimeException: Could not launch activity\n\tat io.appium.espressoserver.lib.handlers.CreateSession.handle(CreateSession.kt:3...
[debug] [MJSONWP] Matched JSONWP error code 33 to SessionNotCreatedError
[debug] [Espresso] Deleting espresso session
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am broadcast -a io.appium.settings.animation -n io.appium.settings/.receivers.AnimationSettingReceiver --es setstatus enable'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.example.enterpriseapp'
[debug] [Espresso] [Instrumentation] [STDOUT] io.appium.espressoserver.EspressoServerRunnerTest:INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [Espresso] [Instrumentation] [STDOUT] INSTRUMENTATION_CODE: 0
[debug] [Logcat] Stopping logcat capture
[Espresso] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_pre_p_apps'
[Espresso] Instrumentation process exited with code 0 from signal null
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_p_apps'
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy'
[debug] [ADB] Removing forwarded port socket connection: 8300
[debug] [ADB] Running '/Users/someuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8300'
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1556832632701 (14:30:32 GMT-0700 (PDT))
[debug] [W3C] Encountered internal error running command: SessionNotCreatedError: A new session could not be created. Details: io.appium.espressoserver.lib.handlers.exceptions.SessionNotCreatedException: java.lang.RuntimeException: Could not launch activity
[debug] [W3C]   at io.appium.espressoserver.lib.handlers.CreateSession.handle(CreateSession.kt:37)
[debug] [W3C]   at io.appium.espressoserver.lib.handlers.CreateSession.handle(CreateSession.kt:26)
[debug] [W3C]   at io.appium.espressoserver.lib.http.Router.route(Router.java:335)
[debug] [W3C]   at io.appium.espressoserver.lib.http.Server.serve(Server.java:69)
[debug] [W3C]   at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
[debug] [W3C]   at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
[debug] [W3C]   at java.lang.Thread.run(Thread.java:764)
[debug] [W3C] Caused by: java.lang.RuntimeException: Could not launch activity
[debug] [W3C]   at androidx.test.runner.MonitoringInstrumentation.startActivitySync(MonitoringInstrumentation.java:467)
[debug] [W3C]   at io.appium.espressoserver.lib.helpers.ActivityHelper.startActivity(ActivityHelper.java:70)
[debug] [W3C]   at io.appium.espressoserver.lib.handlers.CreateSession.handle(CreateSession.kt:34)
[debug] [W3C]   ... 6 more
[debug] [W3C] Caused by: java.lang.RuntimeException: Unable to resolve activity for: Intent { act=android.intent.action.MAIN flg=0x14000000 cmp=com.example.enterpriseapp/.com.example.MyApp.MainActivity }
[debug] [W3C]   at android.app.Instrumentation.startActivitySync(Instrumentation.java:472)
[debug] [W3C]   at android.app.Instrumentation.startActivitySync(Instrumentation.java:435)
[debug] [W3C]   at androidx.test.runner.MonitoringInstrumentation.access$101(MonitoringInstrumentation.java:98)
[debug] [W3C]   at androidx.test.runner.MonitoringInstrumentation$4.call(MonitoringInstrumentation.java:443)
[debug] [W3C]   at androidx.test.runner.MonitoringInstrumentation$4.call(MonitoringInstrumentation.java:440)
[debug] [W3C]   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[debug] [W3C]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
[debug] [W3C]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
[debug] [W3C]   ... 1 more
[debug] [W3C]
[debug] [W3C]     at errorFromMJSONWPStatusCode (/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:786:12)
[debug] [W3C]     at ProxyRequestError.errorFromMJSONWPStatusCode [as getActualError] (/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:683:14)
[debug] [W3C]     at JWProxy.getActualError [as command] (/Users/someuser/.nvm/versions/node/v8.11.4/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:235:19)
[debug] [W3C]     at <anonymous>
[HTTP] <-- POST /wd/hub/session 500 28024 ms - 4533
[HTTP]