请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师,报错“Original error: Failed to launch Appium Settings app: Condition unmet

我用是python3.7appium也是最新版本环境也配置了但在visual studio code 上面执行的时候报错启动不了服务图片描述

图片描述
[info] [35m[Appium][39m Welcome to Appium v1.15.1
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m–>[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{“capabilities”:{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“127.0.0.1:5555”,“appium:app”:“D:\app\mukewang.apk”}]},“desiredCapabilities”:{“platformName”:“Android”,“deviceName”:“127.0.0.1:5555”,“app”:“D:\app\mukewang.apk”}}[39m
[debug] [35m[W3C][39m Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“deviceName”:“127.0.0.1:5555”,“app”:“D:\app\mukewang.apk”},null,{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“127.0.0.1:5555”,“appium:app”:“D:\app\mukewang.apk”}]}]
[debug] [35m[BaseDriver][39m Event ‘newSessionRequested’ logged at 1572309213497 (08:33:33 GMT+0800 (中国标准时间))
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m ======================================================================
[warn] [35m[Appium][39m DEPRECATION WARNING:
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m The ‘automationName’ capability was not provided in the desired
[warn] [35m[Appium][39m capabilities for this Android session
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m Setting ‘automationName=UiAutomator2’ by default and using the
[warn] [35m[Appium][39m UiAutomator2 Driver
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m The next major version of Appium (2.x) will require the
[warn] [35m[Appium][39m ‘automationName’ capability to be set for all sessions on all
[warn] [35m[Appium][39m platforms
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m In previous versions (Appium <= 1.13.x), the default was
[warn] [35m[Appium][39m ‘automationName=UiAutomator1’
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m If you wish to use that automation instead of UiAutomator2, please
[warn] [35m[Appium][39m add ‘automationName=UiAutomator1’ to your desired capabilities
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m For more information about drivers, please visit
[warn] [35m[Appium][39m http://appium.io/docs/en/about-appium/intro/ and explore the
[warn] [35m[Appium][39m ‘Drivers’ menu
[warn] [35m[Appium][39m
[warn] [35m[Appium][39m ======================================================================
[warn] [35m[Appium][39m
[info] [35m[Appium][39m Appium v1.15.1 creating new AndroidUiautomator2Driver (v1.37.2) session
[debug] [35m[BaseDriver][39m W3C capabilities and MJSONWP desired capabilities were provided
[debug] [35m[BaseDriver][39m Creating session with W3C capabilities: {
[debug] [35m[BaseDriver][39m “alwaysMatch”: {
[debug] [35m[BaseDriver][39m “platformName”: “Android”,
[debug] [35m[BaseDriver][39m “appium:deviceName”: “127.0.0.1:5555”,
[debug] [35m[BaseDriver][39m “appium:app”: “D:\app\mukewang.apk”
[debug] [35m[BaseDriver][39m },
[debug] [35m[BaseDriver][39m “firstMatch”: [
[debug] [35m[BaseDriver][39m {}
[debug] [35m[BaseDriver][39m ]
[debug] [35m[BaseDriver][39m }
[info] [35m[BaseDriver][39m Session created with session id: d4952803-9647-4ab3-b089-e327c3f0a7d3[info] [35m[ADB][39m Found 1 ‘build-tools’ folders under ‘C:\Program Files\Java\sdk’ (newest first):
[info] [35m[ADB][39m C:/Program Files/Java/sdk/build-tools/android-4.3
[info] [35m[ADB][39m Using ‘adb.exe’ from ‘C:\Program Files\Java\sdk\platform-tools\adb.exe’
[info] [35m[AndroidDriver][39m Retrieving device list
[debug] [35m[ADB][39m Trying to find a connected android device
[debug] [35m[ADB][39m Getting connected devices…[debug] [35m[ADB][39m Connected devices: [{“udid”:“emulator-5554”,“state”:“device”}]
[info] [35m[AndroidDriver][39m Using device: emulator-5554
[info] [35m[ADB][39m Using ‘adb.exe’ from ‘C:\Program Files\Java\sdk\platform-tools\adb.exe’
[debug] [35m[ADB][39m Setting device id to emulator-5554
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk’
[debug] [35m[ADB][39m Current device property ‘ro.build.version.sdk’: 22
[debug] [35m[ADB][39m Device API level: 22
[debug] [35m[AndroidDriver][39m Parsing package and activity from app manifest
[info] [35m[ADB][39m Using the alternative activity name detection method because of: Could not find ‘apkanalyzer.bat’ in [“C:\Program Files\Java\sdk\platform-tools\apkanalyzer.bat”,“C:\Program Files\Java\sdk\emulator\apkanalyzer.bat”,“C:\Program Files\Java\sdk\tools\apkanalyzer.bat”,“C:\Program Files\Java\sdk\tools\bin\apkanalyzer.bat”,“C:\Program Files\Java\sdk\build-tools\android-4.3\apkanalyzer.bat”]. Do you have Android Build Tools installed at ‘C:\Program Files\Java\sdk’?
[info] [35m[ADB][39m Using ‘aapt.exe’ from ‘C:\Program Files\Java\sdk\tools\aapt.exe’
[info] [35m[ADB][39m Extracting package and launch activity from manifest[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping’
[debug] [35m[AndroidDriver][39m Pushing settings apk to device…
[debug] [35m[ADB][39m Getting install status for io.appium.settings
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings’
[debug] [35m[ADB][39m ‘io.appium.settings’ is installed
[debug] [35m[ADB][39m Getting package info for ‘io.appium.settings’
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings’[info] [35m[ADB][39m Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find ‘apkanalyzer.bat’ in [“C:\Program Files\Java\sdk\platform-tools\apkanalyzer.bat”,“C:\Program Files\Java\sdk\emulator\apkanalyzer.bat”,“C:\Program Files\Java\sdk\tools\apkanalyzer.bat”,“C:\Program Files\Java\sdk\tools\bin\apkanalyzer.bat”,“C:\Program Files\Java\sdk\build-tools\android-4.3\apkanalyzer.bat”]. Do you have Android Build Tools installed at ‘C:\Program Files\Java\sdk’?
[debug] [35m[ADB][39m The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘2.14.2’ >= ‘2.14.2’)
[debug] [35m[ADB][39m There is no need to install/upgrade ‘C:\Users\15927\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk’
[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell ‘pgrep --help; echo $?’’[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’
[info] [35m[AndroidDriver][39m Granting android.permission.SET_ANIMATION_SCALE, CHANGE_CONFIGURATION, ACCESS_FINE_LOCATION by pm grant
[debug] [35m[ADB][39m Granting permissions [“android.permission.SET_ANIMATION_SCALE”,“android.permission.CHANGE_CONFIGURATION”,“android.permission.ACCESS_FINE_LOCATION”] to ‘io.appium.settings’
[debug] [35m[ADB][39m Got the following command chunks to execute: [[“pm”,“grant”,“io.appium.settings”,“android.permission.SET_ANIMATION_SCALE”,";",“pm”,“grant”,“io.appium.settings”,“android.permission.CHANGE_CONFIGURATION”,";",“pm”,“grant”,“io.appium.settings”,“android.permission.ACCESS_FINE_LOCATION”,";"]]
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm grant io.appium.settings android.permission.SET_ANIMATION_SCALE ; pm grant io.appium.settings android.permission.CHANGE_CONFIGURATION ; pm grant io.appium.settings android.permission.ACCESS_FINE_LOCATION ;’[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[debug] [35m[ADB][39m Getting IDs of all ‘io.appium.settings’ processes
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep ^appium\.settings$’[warn] [35m[AndroidDriver][39m Failed to launch Appium Settings app: Condition unmet after 5101 ms. Timing out.
[debug] [35m[UiAutomator2][39m Deleting UiAutomator2 session
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop cn.com.open.mooc’[debug] [35m[ADB][39m Removing forwarded port socket connection: 8200
[debug] [35m[ADB][39m Running ‘C:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward --remove tcp:8200’[warn] [35m[UiAutomator2][39m Unable to remove port forward ‘Error executing adbExec. Original error: ‘Command ‘‘C:\Program Files\Java\sdk\platform-tools\adb.exe’ -P 5037 -s emulator-5554 forward --remove tcp:8200’ exited with code 1’; Stderr: ‘error: malformed forward spec’; Code: ‘1’’
[debug] [35m[BaseDriver][39m Event ‘newSessionStarted’ logged at 1572309225036 (08:33:45 GMT+0800 (中国标准时间))
[debug] [35m[W3C][39m Encountered internal error running command: Error: Failed to launch Appium Settings app: Condition unmet after 5101 ms. Timing out.
[debug] [35m[W3C][39m at spin (C:\Users\15927\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\asyncbox\lib\asyncbox.js:127:9)
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[31m500[39m [90m11556 ms - 858[39m
[info] [35m[HTTP][39m [90m[39m

正在回答

3回答

记得把appium运行日志也发一下,这样才能更好定位问题,这个appium只要不是代码级错误 需要那日志

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_LostNFound_0 #1
    日志发了一下,才开始学,不太懂,脚本启不了,有点拙极。
    回复 有任何疑惑可以回复我~ 2019-10-29 08:56:51
  • 提问者 qq_LostNFound_0 #2
    非常感谢!
    回复 有任何疑惑可以回复我~ 2019-10-30 19:52:06
Mushishi 2019-11-01 09:03:24

启动参数里面把activity曾加上

0 回复 有任何疑惑可以回复我~
Mushishi 2019-10-29 08:20:19

原因 你网络问题,超时了,你检查一下你appset这个app安装了吗?主要是你appium启动安装后,你手机上弹出安装appset的窗口没,

0 回复 有任何疑惑可以回复我~
  • 我已遇到这个问题,模拟器上面安装了appium settings
    回复 有任何疑惑可以回复我~ 2019-10-31 15:35:07
  • 我也遇到了,执行代码的时候报错Original error: Failed to launch Appium Settings app: Condition unmet
    然后看了一下appium setting这个app装了,网络检查了一下 也没问题,你是怎么解决的?
    回复 有任何疑惑可以回复我~ 2019-11-05 12:01:57
  • Mushishi 回复 连枝 #3
    启动代码配置 activity
    回复 有任何疑惑可以回复我~ 2019-11-06 08:54:34
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信