I didn’t setup and optional libraries, but all core tools/libraries should be setup. This is also working fine with iOS simulators.
When I run appium-doctor, I don’t get any errors what so ever.
Everything seems to be going fine until I hit these steps:
[ADB] 'io.appium.uiautomator2.server' is not installed
[ADB] App '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.17.4.apk' is not installed
[UiAutomator2] io.appium.uiautomator2.server installation state: notInstalled
[ADB] Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.17.4.apk
[ADB] Using 'apksigner.jar' from '/Users/vd/Library/Android/sdk/build-tools/31.0.0-rc5/lib/apksigner.jar'
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[WD Proxy] Matched '/' to command name 'deleteSession'
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
[ADB] Running '/Users/vd/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.zwift.android.alpha'
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200
[ADB] Running '/Users/vd/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200'
[UiAutomator2] Restoring hidden api policy to the device default configuration
[ADB] Running '/Users/vd/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[BaseDriver] Event 'newSessionStarted' logged at 1625703419935 (17:16:59 GMT-0700 (Pacific Daylight Time))
[MJSONWP] Encountered internal error running command: Error: Cannot verify the signature of '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.17.4.apk'. Original error: The JAVA_HOME location '/usr/libexec/java_home' must be a valid folder
[MJSONWP] at ADB.checkApkCert (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/apk-signing.js:270:11)
I’m not sure what else I can do to resolve this issue. Has anyone run into anything similar?
Thanks for the link, I’m trying to figure out my apps activity name right now. I’m getting ‘java.lang.SecurityException: Permission Denial’ error with my current setup.
My biggest challenge now is to figure out how app activity is supposed to be set. This is my latest error: cmp=com.myapp.android.alpha/com.myapp.android.ui.activity.MainActivity } from null (pid=19268, uid=2000) not exported from uid 10154
And this is the error I’m seeing: Encountered internal error running command: Error: Cannot start the 'com.myapp.android.alpha' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the 'com.myapp.android.alpha' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name '.com.myapp.*' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
When I ran ‘adb shell dumpsys window windows’ command, I saw these activities related to my app:
mActivityRecord=ActivityRecord{ca9905d u0 com.myapp.android.alpha/com.myapp.android.ui.activity.MainActivity t30}
This did connect me to my emulator, but this didn’t start my app though. At this point I don’t think I need appWaitActicity either, since it just connects uiautomator2 server to the emulator.