Skip to content

Instantly share code, notes, and snippets.

@xuru
Created June 4, 2013 16:24
Show Gist options
  • Select an option

  • Save xuru/5707322 to your computer and use it in GitHub Desktop.

Select an option

Save xuru/5707322 to your computer and use it in GitHub Desktop.
Appium page_source logs
appium$ node server.js -V
info - socket.io started
info: Welcome to Appium v0.6.1 (REV d88a0ea1698db95b40823fb627154bc30c56c61e)
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":{"name":"MATS","device-ready-timeout":"30","app":"/opt/workspace/xxxx_android_0.0.8-dev-r4074-b1056-prod.apk","platform":"Mac","browserName":"Android","version":"6.0","newCommandTimeout":"1200","device":"Android","app-activity":"com.xxxx.android.activity.LoginScreenActivity","app-package":"com.xxxx.android.root"}}
info: Using local app from desiredCaps: /opt/workspace/xxxxx_android_0.0.8-dev-r4074-b1056-prod.apk
info: Creating new appium session a957a17e-8f87-4f3a-b68d-958cec83b2f9
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 /opt/adt/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 emulator-5554
info: Found device, no need to retry
info: [ADB] Waiting for device emulator-5554 to be ready and to respond to shell commands (timeout = 30)
info: Checking whether we need to run fast reset
debug: Checking app cert for /tmp/com.xxxxx.android.root.clean.apk: java -jar "/Users/plaster/rep/appium/app/android/verify.jar" "/tmp/com.xxxx.android.root.clean.apk"
debug: App already signed.
debug: Checking app cert for /opt/workspace/xxxx_android_0.0.8-dev-r4074-b1056-prod.apk: java -jar "/Users/plaster/rep/appium/app/android/verify.jar" "/opt/workspace/xxxx_android_0.0.8-dev-r4074-b1056-prod.apk"
debug: App already signed.
debug: java -jar /Users/plaster/rep/appium/app/android/strings_from_apk.jar /opt/workspace/xxxx_android_0.0.8-dev-r4074-b1056-prod.apk /tmp/com.xxxx.android.root
info: [ADB] Not uninstalling app since server started with --reset
info: Determining app install/clean status
debug: Getting install/clean status for com.xxxx.android.root
debug: Running fast reset clean: /opt/adt/sdk/platform-tools/adb -s emulator-5554 shell am instrument com.xxxx.android.root.clean/clean.apk.Clean
info: [ADB] Forwarding system:4724 to device:4724
info: [ADB] Pushing appium bootstrap to device...
info: Running bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [ANDROID] [info] Socket opened on port 4724
info: [ADB] Connecting to server on device...
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: [ADB] Received command result from bootstrap
info: [ADB] Attempting to unlock screen
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: Starting app
info: [ADB] Starting app com.xxxx.android.root/com.xxxx.android.activity.LoginScreenActivity
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: ADB launched! Ready for commands (will time out in 60secs)
info: Appium session started with sessionId a957a17e-8f87-4f3a-b68d-958cec83b2f9
info: Setting command timeout for android to 1200 secs
POST /wd/hub/session 303 3566ms - 9
debug: Appium request initiated at /wd/hub/session/a957a17e-8f87-4f3a-b68d-958cec83b2f9
info: Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"Android","version":"4.1","webStorageEnabled":false,"takesScreenshots":true,"javascriptEnabled":true,"databaseEnabled":false},"sessionId":"a957a17e-8f87-4f3a-b68d-958cec83b2f9"}
GET /wd/hub/session/a957a17e-8f87-4f3a-b68d-958cec83b2f9 200 4ms - 289
All connected....
Do a "remote: find" for 'bob' which doesn't exist...
debug: Appium request initiated at /wd/hub/session/a957a17e-8f87-4f3a-b68d-958cec83b2f9/execute
debug: Request received with params: {"sessionId":"a957a17e-8f87-4f3a-b68d-958cec83b2f9","args":[[[[3,"bob"]],[[7,"bob"]]]],"script":"mobile: find"}
info: Pushing command to appium work queue: ["find",{"strategy":"dynamic","selector":[[[3,"bob"]],[[7,"bob"]]],"context":"","multiple":false}]
info: [ADB] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"dynamic","selector":[[[3,"bob"]],[[7,"bob"]]],"context":"","multiple":false}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"dynamic","selector":[[[3,"bob"]],[[7,"bob"]]],"context":"","multiple":false}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: find
info: [ANDROID] [debug] Finding dynamic.
info: [ANDROID] [debug] Returning all? false
info: [ANDROID] [debug] Scrolling? false
info: [ANDROID] [debug] [[[3,"bob"]],[[7,"bob"]]]
info: [ANDROID] [debug] Parsing selector 0
info: [ANDROID] [debug] Pair is: [[3,"bob"]]
info: [ANDROID] [debug] int0: 3
info: [ANDROID] [debug] Updating 3, bob
info: [ANDROID] [debug] Selector: UiSelector[CONTAINS_TEXT=bob]
info: [ANDROID] [debug] Not found.
info: [ANDROID] [debug] Parsing selector 1
info: [ANDROID] [debug] Pair is: [[7,"bob"]]
info: [ANDROID] [debug] int0: 7
info: [ANDROID] [debug] Updating 7, bob
info: [ANDROID] [debug] Selector: UiSelector[CONTAINS_DESCRIPTION=bob]
info: [ADB] Received command result from bootstrap
info: Responding to client with error: {"status":7,"value":{"message":"An element could not be located on the page using the given search parameters.","origValue":"No such element."},"sessionId":"a957a17e-8f87-4f3a-b68d-958cec83b2f9"}
POST /wd/hub/session/a957a17e-8f87-4f3a-b68d-958cec83b2f9/execute 500 14ms - 223
info: [ANDROID] [debug] Not found.
info: [ANDROID] [info] Returning result: {"value":"No such element.","status":7}
Everything looks good...
Do a page_source...
debug: Appium request initiated at /wd/hub/session/a957a17e-8f87-4f3a-b68d-958cec83b2f9/source
debug: getPageSource command: /opt/adt/sdk/platform-tools/adb -s emulator-5554 shell uiautomator dump /data/local/tmp/dump.xml;/opt/adt/sdk/platform-tools/adb -s emulator-5554 pull /data/local/tmp/dump.xml /tmp/dump.xml
debug: json command: java -jar "/Users/plaster/rep/appium/app/android/dump2json.jar" /tmp/dump.xml
info: Responding to client with success: {"status":0,"value":"{\n \"hierarchy\" : {\n \"@rotation\" : \"0\",\n \"node\" : {\n \"@enabled\" : \"true\",\n \"@focusable\" : \"false\",\n \"@index\" : \"0\",\n \"@text\" : \"\",\n \"@checkable\" : \"false\",\n \"@package\" : \"com.xxxx.android.root\",\n \"@scrollable\" : \"false\",\n \"@class\" : \"android.widget.FrameLayout\",\n \"@password\" : \"false\",\n \"@long-clickable\" : \"false\",\n \"@bounds\" : \"[0,0][1280,752]\",\n \"@selected\" : \"false\",\n \"@content-desc\" : \"\",\n \"@clickable\" : \"false\",\n \"@focused\" : \"false\",\n \"@checked\" : \"false\",\n \"node\" : {\n \"@enabled\" : \"true\",\n \"@focusable\" : \"false\",\n \"@index\" : \"0\",\n \"@text\" : \"\",\n \"@checkable\" : \"false\",\n \"@package\" : \"com.xxxx.android.root\",\n \"@scrollable\" : \"false\",\n \"@class\" : \"android.widget.LinearLayout\",\n \"@password\" : \"false\",\n \"@long-clickable\" : \"false\",\n \"@bounds\" : \"[0,0][1280,752]\",\n \"@selected\" : \"false\",\n \"@content-desc...","sessionId":"a957a17e-8f87-4f3a-b68d-958cec83b2f9"}
And the logs are quiet...
Try that "remote: find" again...
debug: Appium request initiated at /wd/hub/session/a957a17e-8f87-4f3a-b68d-958cec83b2f9/execute
debug: Request received with params: {"sessionId":"a957a17e-8f87-4f3a-b68d-958cec83b2f9","args":[[[[3,"bob"]],[[7,"bob"]]]],"script":"mobile: find"}
info: Pushing command to appium work queue: ["find",{"strategy":"dynamic","selector":[[[3,"bob"]],[[7,"bob"]]],"context":"","multiple":false}]
info: [ADB] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"dynamic","selector":[[[3,"bob"]],[[7,"bob"]]],"context":"","multiple":false}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"dynamic","selector":[[[3,"bob"]],[[7,"bob"]]],"context":"","multiple":false}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: find
info: [ANDROID] [debug] Finding dynamic.
info: [ANDROID] [debug] Returning all? false
info: [ANDROID] [debug] Scrolling? false
info: [ANDROID] [debug] [[[3,"bob"]],[[7,"bob"]]]
info: [ANDROID] [debug] Parsing selector 0
info: [ANDROID] [debug] Pair is: [[3,"bob"]]
info: [ANDROID] [debug] int0: 3
info: [ANDROID] [debug] Updating 3, bob
info: [ANDROID] [debug] Selector: UiSelector[CONTAINS_TEXT=bob]
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] Error in testRunServer:
info: [ADB STDOUT] java.lang.RuntimeException: java.lang.IllegalStateException: UiAutomationService not connected. Did you call #register()?
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Find.execute(Find.java:181)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidCommandExecutor.execute(AndroidCommandExecutor.java:63)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.runCommand(SocketServer.java:172)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.handleClientData(SocketServer.java:89)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.listenForever(SocketServer.java:122)
info: [ADB STDOUT] at io.appium.android.bootstrap.Bootstrap.testRunServer(Bootstrap.java:17)
info: [ADB STDOUT] at java.lang.reflect.Method.invokeNative(Native Method)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:124)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:85)
info: [ADB STDOUT] at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:76)
info: [ADB STDOUT] at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
info: [ADB STDOUT] at dalvik.system.NativeStart.main(Native Method)
info: [ADB STDOUT] Caused by: java.lang.IllegalStateException: UiAutomationService not connected. Did you call #register()?
info: [ADB STDOUT] at android.accessibilityservice.UiTestAutomationBridge.ensureValidConnection(UiTestAutomationBridge.java:492)
info: [ADB STDOUT] at android.accessibilityservice.UiTestAutomationBridge.getRootAccessibilityNodeInfoInActiveWindow(UiTestAutomationBridge.java:484)
info: [ADB STDOUT] at com.android.uiautomator.core.QueryController.getRootNode(QueryController.java:174)
info: [ADB STDOUT] at com.android.uiautomator.core.QueryController.findAccessibilityNodeInfo(QueryController.java:152)
info: [ADB STDOUT] at com.android.uiautomator.core.QueryController.findAccessibilityNodeInfo(QueryController.java:140)
info: [ADB STDOUT] at com.android.uiautomator.core.UiObject.findAccessibilityNodeInfo(UiObject.java:146)
info: [ADB STDOUT] at com.android.uiautomator.core.UiObject.waitForExists(UiObject.java:691)
info: [ADB STDOUT] at com.android.uiautomator.core.UiObject.exists(UiObject.java:738)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidElementsHash.getElement(AndroidElementsHash.java:92)
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Find.fetchElement(Find.java:287)
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Find.execute(Find.java:165)
info: [ADB STDOUT] ... 20 more
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stack=java.lang.RuntimeException: java.lang.IllegalStateException: UiAutomationService not connected. Did you call #register()?
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Find.execute(Find.java:181)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidCommandExecutor.execute(AndroidCommandExecutor.java:63)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.runCommand(SocketServer.java:172)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.handleClientData(SocketServer.java:89)
info: [ADB STDOUT] at io.appium.android.bootstrap.SocketServer.listenForever(SocketServer.java:122)
info: [ADB STDOUT] at io.appium.android.bootstrap.Bootstrap.testRunServer(Bootstr
info: [ADB STDOUT] ap.java:17)
info: [ADB STDOUT] at java.lang.reflect.Method.invokeNative(Native Method)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:124)
info: [ADB STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:85)
info: [ADB STDOUT] at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:76)
info: [ADB STDOUT] at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
info: [ADB STDOUT] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
info: [ADB STDOUT] at dalvik.system.NativeStart.main(Native Method)
info: [ADB STDOUT] Caused by: java.lang.IllegalStateException: UiAutomationService not connected. Did you call #register()?
info: [ADB STDOUT] at android.accessibilityservice.UiTestAutomationBridge.ensureValidConnection(UiTestAutomationBridge.java:492)
info: [ADB STDOUT] at android.accessibilityservice.UiTestAutomationBridge.getRootAccessibilityNodeInfoInActiveWindow(UiTestAutomationBridge.java:484)
info: [ADB STDOUT] at com.android.uiautomator.core.QueryController.getRootNode(QueryController.java:174)
info: [ADB STDOUT] at com.android.uiautomator.core.QueryController.findAccessibilityNodeInfo(QueryController.java:152)
info: [ADB STDOUT] at com.android.uiautomator.core.QueryController.findAccessibilityNodeInfo(QueryController.java:140)
info: [ADB STDOUT] at com.android.uiautomator.core.UiObject.findAccessibilityNodeInfo(UiObject.java:146)
info: [ADB STDOUT] at com.android.uiautomator.core.UiObject.waitForExists(UiObject.java:691)
info: [ADB STDOUT] at com.android.uiautomator.core.UiObject.exists(UiObject.java:738)
info: [ADB STDOUT] at io.appium.android.bootstrap.AndroidElementsHash.getElement(AndroidElementsHash.java:92)
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Find.fetchElement(Find.java:287)
info: [ADB STDOUT] at io.appium.android.bootstrap.handler.Find.execute(Find.java:165)
info: [ADB STDOUT] ... 20 more
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] Test results for UiAutomatorTestRunner=.E
info: [ADB STDOUT] Time: 33.046
info: [ADB STDOUT] FAILURES!!!
info: [ADB STDOUT] Tests run: 1, Failures: 0, Errors: 1
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: Running bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [ANDROID] [info] Socket opened on port 4724
info: [ADB] Connecting to server on device...
info: [ANDROID] [info] Appium Socket Server Ready
info: [ANDROID] [info] Loading json...
info: [ANDROID] [info] json loading complete.
info: [ADB] Connected!
warn: Trying to run a command when one is already in progress. Will spin a bit and try again
info: [ANDROID] [info] Client connected
GET /wd/hub/session/a957a17e-8f87-4f3a-b68d-958cec83b2f9/source 200 1676ms - 13.43kb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment