Appium (求大神帮忙看一下) 脚本可以启动 app,启动完了直接报 A new session could not be created. (Original error: io.dcloud.HBuilder/io.dcloud.PandoraEntry never started. Current: io.dcloud.HBuilder/io.dcloud.PandoraEntryActivity)

wengzexiong · 2018年01月18日 · 2394 次阅读

info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"Android","platformVersion":"6.0","noReset":"True","app":"C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk","deviceName":"DU2SSE146L013087","unxcodeKeyboard":"True","resetKeyboard":"True"},"requiredCapabilities":{}}
info: Client User-Agent string: Python-urllib/3.6
warn: Converting cap noReset from string to boolean. This might cause unexpected behavior.
warn: Converting cap unxcodeKeyboard from string to boolean. This might cause unexpected behavior.
warn: Converting cap resetKeyboard from string to boolean. This might cause unexpected behavior.
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : unxcodeKeyboard
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk
info: [debug] Creating new appium session c68135c3-0daa-48ac-abf4-3e1a87c20238
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_101
info: [debug] Checking whether adb is present
info: [debug] Using adb from F:\android\android-sdk\platform-tools\adb.exe
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from F:\android\android-sdk\build-tools\24.0.3\aapt.exe
info: [debug] Extracting package and launch activity from manifest.
info: [debug] executing cmd: F:\android\android-sdk\build-tools\24.0.3\aapt.exe dump badging C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk
info: [debug] badging package: io.dcloud.HBuilder
info: [debug] badging act: io.dcloud.PandoraEntry
info: [debug] Parsed package and activity are: io.dcloud.HBuilder/io.dcloud.PandoraEntry
info: [debug] Using fast reset? false
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device DU2SSE146L013087
info: [debug] Setting device id to DU2SSE146L013087
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 wait-for-device
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: Device API level is: 23
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language:
info: [debug] java -jar "F:\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk" "C:\Users\ADMINI~1\AppData\Local\Temp\io.dcloud.HBuilder"
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 push "C:\Users\ADMINI~1\AppData\Local\Temp\io.dcloud.HBuilder\strings.json" /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from F:\android\android-sdk\build-tools\24.0.3\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: F:\android\android-sdk\build-tools\24.0.3\aapt.exe dump xmltree C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk AndroidManifest.xml
info: [debug] Set app process to: io.dcloud.HBuilder
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk.
info: [debug] executing cmd: java -jar F:\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk
info: [debug] App already signed.
info: [debug] Zip-aligning C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from F:\android\android-sdk\build-tools\24.0.3\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: F:\android\android-sdk\build-tools\24.0.3\zipalign.exe -f 4 C:\Users\Administrator\PycharmProjects\Test_framework\app\HBuilder_8.9.1.apk C:\Users\ADMINI~1\AppData\Local\Temp\118018-1664-1j2t8nj\appium.tmp
info: [debug] MD5 for app is ae755eeca3dcf566fe4099024e3233c0
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "ls /data/local/tmp/ae755eeca3dcf566fe4099024e3233c0.apk"
info: [debug] Getting install status for io.dcloud.HBuilder
info: [debug] Getting device API level
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "pm list packages -3 io.dcloud.HBuilder"
info: [debug] App is installed
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 push "F:\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 install "F:\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 install "F:\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg io.dcloud.HBuilder -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
info: [debug] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window"
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"\/data\/local\/tmp"}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
info: [debug] Getting device API level
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "getprop ro.build.version.sdk"
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":false}
info: [debug] Device is at API Level 23
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.dcloud.HBuilder/io.dcloud.PandoraEntry"
info: [debug] Waiting for pkg "io.dcloud.HBuilder" and activity "io.dcloud.PandoraEntry" to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: F:\android\android-sdk\platform-tools\adb.exe -s DU2SSE146L013087 shell "dumpsys window windows"
error: io.dcloud.HBuilder/io.dcloud.PandoraEntry never started. Current: io.dcloud.HBuilder/io.dcloud.PandoraEntryActivity
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 22.504
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: io.dcloud.HBuilder/io.dcloud.PandoraEntry never started. Current: io.dcloud.HBuilder/io.dcloud.PandoraEntryActivity
info: [debug] Error: io.dcloud.HBuilder/io.dcloud.PandoraEntry never started. Current: io.dcloud.HBuilder/io.dcloud.PandoraEntryActivity
at [object Object]. (F:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1314:12)
at [object Object]. (F:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1258:7)
at [object Object]. (F:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: io.dcloud.HBuilder/io.dcloud.PandoraEntry never started. Current: io.dcloud.HBuilder/io.dcloud.PandoraEntryActivity)","origValue":"io.dcloud.HBuilder/io.dcloud.PandoraEntry never started. Current: io.dcloud.HBuilder/io.dcloud.PandoraEntryActivity"},"sessionId":null}
info: <-- POST /wd/hub/session 500 32315.447 ms - 352

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册