Hello everyone. I've been lurking for a while and this is my first time posting.
I have never been able to use the Appium app (with the inspector) successfully for Android but I have had some success with the command line and python.
Recently all of my tests fail in the setup with (this goes on until it times out):
I read up on app-wait-activity and added it (even to the example code) but it just does not do the trick like it did for other people online.
Now, these are tests that used to work. I haven't changed my code but I did pull new code for Appium. Regression?
Any help would be very much appreciated.
➜ ~ appium &
[1] 3024
➜ ~ info: Welcome to Appium v0.10.1 (REV d0827d6b2507c982802d02b2c6d2bb4d6906bdb3)
info: Appium REST http interface listener started on 0.0.0.0:4723 debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"app-package":"com.example.android.apis","app":"/Users/lujo/dev/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk","browserName":"","version":"4.2","device":"Android","app-activity":".ApiDemos"}}
info: Using local app from desiredCaps: /Users/lujo/dev/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
info: Creating new appium session 4476394f-c48d-47c7-9916-bca166af3210
info: Starting android appium
debug: Using fast reset? true
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from /Users/lujo/dev/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
info: [ADB] 1 device(s) connected
info: [ADB] Setting device id to 004dd7b2cd93a422
info: Found device, no need to retry
info: [ADB] Waiting for device 004dd7b2cd93a422 to be ready and to respond to shell commands (timeout = 5)
info: Starting logcat capture
info: Checking whether we need to run fast reset
debug: Checking app cert for /tmp/com.example.android.apis.clean.apk: java -jar "/usr/local/lib/node_modules/appium/app/android/verify.jar" "/tmp/com.example.android.apis.clean.apk"
debug: App already signed.
debug: Checking app cert for /Users/lujo/dev/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk: java -jar "/usr/local/lib/node_modules/appium/app/android/verify.jar" "/Users/lujo/dev/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"
debug: App already signed.
debug: App signed? true /Users/lujo/dev/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
debug: java -jar "/usr/local/lib/node_modules/appium/app/android/strings_from_apk.jar" "/Users/lujo/dev/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk" "/tmp/com.example.android.apis"
info: [ADB] Not uninstalling app since server not started with --full-reset
info: Determining app install/clean status
debug: Getting install/clean status for com.example.android.apis
debug: Running fast reset clean: "/Users/lujo/dev/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb" -s 004dd7b2cd93a422 shell am instrument com.example.android.apis.clean/clean.apk.Clean
info: [ADB] Forwarding system:4724 to device:4724
info: [ADB] Pushing appium bootstrap to device...
info: [ADB] Pushing unlock helper app to device...
info: Running bootstrap
info: "/Users/lujo/dev/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb" -s 004dd7b2cd93a422 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [ANDROID] [info] Socket opened on port 4724
info: [ADB] Connecting to server on device on port 4724...
info: [ANDROID] [info] Appium Socket Server Ready
info: [ANDROID] [info] Loading json...
info: [ADB] Connected!
info: [ADB] Waking up device if it's not alive
info: Pushing command to appium work queue: ["wake",{}]
info: [ADB] Sending command to android: {"cmd":"action","action":"wake","params":{}}
info: [ANDROID] [info] json loading complete.
info: [ANDROID] [info] Client connected
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: wake
info: [ANDROID] [info] Returning result: {"value":true,"status":0}
info: [ADB] Received command result from bootstrap
info: [ADB] Checking if screen is unlocked via `dumpsys window`...
info: [ADB] Attempting to unlock screen by starting Unlock app...
info: [ADB] Checking if screen is unlocked via `dumpsys window`...
info: Starting app
info: [ADB] Starting app
"/Users/lujo/dev/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb" -s 004dd7b2cd93a422 shell am start -n com.example.android.apis/.ApiDemos
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
error: App never showed up as active. appActivity: .ApiDemos t53 != .ApiDemos
info: [ADB] Sending command to android: {"cmd":"shutdown"}
info: Stopping logcat capture
error: Failed to start an Appium session, err was: Error: App never showed up as active. appActivity: .ApiDemos t53 != .ApiDemos
info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: App never showed up as active. appActivity: .ApiDemos t53 != .ApiDemos)","origValue":"App never showed up as active. appActivity: .ApiDemos t53 != .ApiDemos"},"sessionId":"4476394f-c48d-47c7-9916-bca166af3210"}
POST /wd/hub/session 500 28160ms - 333
info: Clearing out appium devices
info: [ANDROID] [info] Got data from client: {"cmd":"shutdown"}
info: [ANDROID] [info] Got command of type SHUTDOWN
info: [ANDROID] [info] Returning result: {"value":"OK, shutting down","status":0}
info: [ANDROID] [info] Closed client connection
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] Test results for WatcherResultPrinter=.
info: [ADB STDOUT] Time: 23.179
info: [ADB STDOUT] OK (1 test)
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [ADB] Received command result from bootstrap
info: Sent shutdown command, waiting for ADB to stop...
error: ADB quit before it successfully launched
info: We're in android's exit callback but adb is gone already