Appium iOS 真机运行 Appium 长期答疑!

恒温 · September 10, 2014 · Last by 恒温 replied at July 21, 2017 · Last modified by admin 恒温 · 27882 hits
本帖已被设为精华帖!

大家请使用 appium-desktop

以下内容陈旧,不建议看了。

更新下:

使用 gui 启动的 appium 1.2.2 也会有这个问题,所以你要把 deviceconsole 复制到 /Applications/Appium.app/Contents/Resources/node_modules/appium/build/deviceconsole 下面。你自己的路径可能和我不一样,切记。

同意如果这个问题不解决, iOS 上的 真机 inspector 也打不开。

英文好的同学请移步官方文档 real-devices
推荐自己边看边试验。

首先 Appium 支持 iOS 真机

以下条件必须满足:

  • 苹果开发者账号和开发者证书
  • 苹果设备,确保这个设备已经被配置为开发机器。怎么配置?
  • 签名过的 .ipa 文件或者源代码
  • A Mac with Xcode and the Xcode Command Line Developer Tools,有 xcode和xcode command line 的 苹果系统。别来问我,windows 怎么测试 iOS 应用。

Provisioning Profile

再次强调真机需要有效的开发分发证书和开发的 Provisioning Profile。
你的应用需要签名。Appium 会参试使用 Fruitstrap 安装应用。
但是使用 xcode 安装到真机会方便很多。

拓展: 什么是 Provisioning Profile?

运行

要指定真机运行有两种方式:

  • appium 启动的时候,指定 udid 和 app bundle appium -U <udid> --app <path or bundle>

  • 或者在脚本里指定两个 desired capability

desired_capabilities={
'app':'com.xxx.iphone',
'udid':'70643e56c1b0f3c3132c44c87e433a48b5531ee6',
'platformName': 'iOS',
'deviceName': 'iPhone'
})

注意: 如果设备中未安装 app 可以指定 ipa 地址,如果安装了,
则指定 bundle ID。

所以对于第一种情况,代码可以这样写:

self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities={
'deviceName':'',
'platformName': 'iOS',
})

对于第二种情况,代码可以这样写:

app = "io.appium.TestApp"
self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities={
'deviceName':'',
'platformName': 'iOS',
'app': app,
'udid': 'cc6bcd6a94aeb8490924dd05c5b318bfbfafb3bb'
})

调试的思路

  • 确保 UDID 的正确,是真机的 UDID。(20+ 字符串)
  • 确保在模拟器上已经能运行无误了。
  • 直接使用 Instruments 看看是否能在真机上运行。有些情况连 xcode 的 instruments 都不能在真机上调试,那更别谈 appium 了
  • 确保运行 appium 用例前, instruments 没有启动过。看看有没有 instruments 的进程。

目前 1.2.2 的坑

目前 appium 1.2.2 上运行 iOS 真机测试的话,可能会遇到如下的错误:

info: [debug] Starting iOS device log capture via deviceconsole
error: iOS log capture failed: spawn ENOENT
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: spawn ENOENT
info: [debug] Error: spawn ENOENT
at errnoException (child_process.js:1000:11)
at Process.ChildProcess._handle.onexit (child_process.js:791:34)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: spawn ENOENT)","code":"ENOENT","errno":"ENOENT","syscall":"spawn","origValue":"spawn ENOENT"},"sessionId":null}
info: <-- POST /wd/hub/session 500 1780.745 ms - 197

这是因为在 /usr/local/lib/node_modules/appium/build/deviceconsole/ 下面缺失了 deviceconsole。已经有 bug 追踪了。

解决方法如下:

  • 到该目录底下 cd /usr/local/lib/node_modules/appium/build/deviceconsole/
  • 打开这个deviceconsole project。 open deviceconsole.xcodeproj
  • 重新 build 一把。把 build 出来的 deviceconsole,复制到 /usr/local/lib/node_modules/appium/build/deviceconsole/去。
  • 然后重新运行 Appium

注意: deviceName 就算为空也一定要,代码写死的。。。

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 231 条回复 时间 点赞

很赞,这个问题困扰了我很多天,终于解决了。
另外,我想请教一下,appium 中用java语言,下拉刷新视图以及多手势的问题,你也发一个帖子吧。我弄了好多天都没得出结果。有什么办法没有?估计很多人都有这样的疑问。

太棒了,这个问题搞了一天没搞出来 ,楼主是大神,崇拜你~~~么么哒~~~~~

启动inspector 的时候 一定要设备那个ForceDevice ,否则 会弹 出个报错信息

这个名字可以随便选 ,我用ipod ,选 Iphone也是没有问题的。
感谢楼主。

请问:
IOS上运行robotframework+appium自动化测试,在RIDE上的参数配置Open App ,需要那几个必填的参数设置,比如${APP},${BUNDLEID},${UDID},等等,谢谢

我按照这个思路改了,还是报

在我本机下找不到cd /usr/local/lib/node_modules/appium/build/deviceconsole/这个文件
我用的是MAC系统

求楼主解答

#6楼 @xuxiujin 请把问题描述清楚

没有mac 不幸福

error: iOS log capture failed: spawn ENOENT

info: <-- POST /wd/hub/session 500 2882.143 ms - 197
info: [debug] Not setting device type since we're connected to a device
info: [debug] Creating iDevice object with udid 4880fb6f9866658d651ede8ea883c49ad1d71297
info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 4880fb6f9866658d651ede8ea883c49ad1d71297 --bundle com.hipalsports.hipal

error: Failed to start an Appium session, err was: Error: spawn ENOENT
提示我这个错误!


我的设置是这个

error: iOS log capture failed: spawn ENOENT

info: [debug] Dynamic bootstrap code:
info: [debug] Dynamic bootstrap path:
info: [debug] Reusing dynamic bootstrap:
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Cleaning up appium session
info: [debug] Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: spawn ENOENT)","code":"ENOENT","errno":"ENOENT","syscall":"spawn","origValue":"spawn ENOENT"},"sessionId":null}
info: <-- POST /wd/hub/session 500 145.563 ms - 197
info: [debug] Not setting device type since we're connected to a device
info: [debug] Creating iDevice object with udid 962f806a6657c8f031222b297fa4d700619d49af
info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 962f806a6657c8f031222b297fa4d700619d49af --bundle com.hipalsports.hipal

error: Failed to start an Appium session, err was: Error: spawn ENOENT

以上错误是我连iphone时的报错!

提示的已经非常清楚了:

Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

这个要怎么built呀?我查了这个路径是有这个文件 的呀

楼主这个和你上面描述的是一个问题吗?求解呀,我用的是MAC,想用录制的方式录IOS!谢谢了!

#15楼 @xuxiujin 那你用 /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 4880fb6f9866658d651ede8ea883c49ad1d71297 --bundle com.hipalsports.hipal
在命令行运行看看。 你想用录制的方式录制 iOS, 那就录制啊。

info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone Retina (4-inch 64-bit)"}}

info: [debug] App is an iOS bundle, will attempt to run as pre-existing

info: [debug] Creating new appium session ef17f59f-ece8-46f4-ad67-8ccdc89b514b

info: [debug] Removing any remaining instruments sockets

info: [debug] Cleaned up instruments socket /tmp/instruments_sock

info: [debug] Setting Xcode folder

info: [debug] Setting Xcode version

info: [debug] Setting iOS SDK Version

info: [debug] iOS SDK Version set to 7.1

info: [debug] Detecting automation tracetemplate

info: [debug] Not auto-detecting udid, running on sim

info: [debug] Localizable.strings is not currently supported when using real devices.
info: [debug] Not setting locale because we're using a real device
info: [debug] Creating instruments

info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir:
info: [debug] Dynamic env:

error: iOS log capture failed: spawn ENOENT

info: [debug] Dynamic bootstrap code:
info: [debug] Dynamic bootstrap path:
info: [debug] Reusing dynamic bootstrap:
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Cleaning up appium session
info: [debug] Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: spawn ENOENT)","code":"ENOENT","errno":"ENOENT","syscall":"spawn","origValue":"spawn ENOENT"},"sessionId":null}
info: <-- POST /wd/hub/session 500 147.450 ms - 197
info: [debug] Not setting device type since we're connected to a device

error: Failed to start an Appium session, err was: Error: spawn ENOENT

info: [debug] Creating iDevice object with udid 4880fb6f9866658d651ede8ea883c49ad1d71297
info: [debug] Couldn't find ideviceinstaller, trying built-in at /Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
info: [debug] Checking app install status using: /Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 4880fb6f9866658d651ede8ea883c49ad1d71297 --bundle com.hipalsports.hipal

info: [debug] App is installed.

info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.

info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments

info: [debug] Instruments is at: /Applications/Xcode 5.1.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 4880fb6f9866658d651ede8ea883c49ad1d71297
info: [debug] Spawning instruments with command: /Applications/Xcode 5.1.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode 5.1.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 4880fb6f9866658d651ede8ea883c49ad1d71297 com.hipalsports.hipal -e UIASCRIPT /Users/hipal/Library/Application Support/appium/bootstrap/bootstrap-286b5f87607290ee.js -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.2","revision":"cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4"}}}

运行时提示了我以上错误,按照你的方法直接在命令行中运行
JackdeMac-mini:~ hipal$ /Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 4880fb6f9866658d651ede8ea883c49ad1d71297 --bundle com.hipalsports.hipal
[....] Waiting for iOS device to be connected
found device id
[ 0%] Found device (4880fb6f9866658d651ede8ea883c49ad1d71297), beginning check

App is installed!
[100%] Check completed com.hipalsports.hipal
JackdeMac-mini:~ hipal$

安装应该是成功的了!但是还是报错
Could not start a new session

Be sure the Appium server is running with an application opened by using the "App Path" parameter in Appium.app (along with package and activity for Android) or by connecting with selenium client and supplying this in the desired capabilities object.

弄了几天了这个问题!依然找不到出路!

楼主这个问题你有遇到过吗?


这里的server address需要设置吗?

好文,解决了我的困扰,谢谢。

感谢楼主,问题弄了好多天终于解决了这个报错的问题,但是又有一个新问题,运行点inspector 后appium就自动退出去了!手机可以正常启动了,这个又是什么问题引起的

恒温 #22 · October 12, 2014 作者

#21楼 @xuxiujin 啥问题都不描述,我怎么知道。。。 别让我猜。

appium 1.2.2 运行正常没有报错,点inspector 后record 的 界面出现了一下然后appium就异常关闭!

@lihuazhang Appium可以控制iOS内置的app么或其他从AppStore中下载的app?如果可以,是不是随便一个开发账号和证书就可以了?

恒温 #25 · October 12, 2014 作者

#24楼 @ghlangbaobao 当然不可以。 只有自己使用开发证书分发的才能。

恒温 #26 · October 12, 2014 作者

#23楼 @xuxiujin 没有日志我帮不了你。

@lihuazhang 连接真机测试时提示这个
info:
[IOS_SYSLOG_ROW ] Oct 13 20:05:19 jing lockdownd[52] : 00241000 spawn_service_agent: Could not look up service in the map

info: [IOS_SYSLOG_ROW ] Oct 13 20:05:19 jing lockdownd[52] : 00241000 spawn_and_handle_checkin: Could not spawn the com.apple.instruments.remoteserver service agent:InvalidService

info: [debug] [INST STDERR] 2014-10-13 20:05:18.903 instruments[2640:707] Failed to start Instruments daemon for 'iOS' on 'jing (v7.1.2)' (The service is invalid.)

info: [IOS_SYSLOG_ROW ] Oct 13 20:05:19 jing lockdownd[52] : 00241000 spawn_service_agent: Could not look up service in the map

info: [debug] [INST STDERR] 2014-10-13 20:05:18.907 instruments[2640:707] Device 'Build Version 11D257, iPhone ID 2ad744c4d85acfe21415edcad3fd78a9009d12c4' is not setup as a development device. Use Xcode to setup.

info: [IOS_SYSLOG_ROW ] Oct 13 20:05:19 jing lockdownd[52] : 00241000 spawn_and_handle_checkin: Could not spawn the com.apple.instruments.server service agent:InvalidService

info: [debug] [INSTSERVER] Instruments exited with code 253

info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Killing the simulator process

info: [debug] Killing any other simulator daemons

info: [debug] Cleaning app state.

info: [debug] No folders found to remove

error: Failed to start an Appium session, err was: Error: Instruments crashed on startup

info: [debug] Cleaning up appium session
info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:344:31)
at null. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:281:12)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
info: <-- POST /wd/hub/session 500 25220.812 ms - 182

楼主,我的问题是当我点inspector会弹出那个报错框,但是真机会启动程序,就是那个 录制界面不出来

恒温 #29 · October 20, 2014 作者

#28楼 @240385033 哪个啊?

@lihuazhang ios真机运行点inspector会报
错误,但是手机上的程序启动了,也不会出

#27楼 @xuxiujin 请问一下你点inspector无法启动的那个第一个问题是怎么解决的啊?是通过那个命令行吗?

#30楼我也遇到同样问题,inspector无法启动。你解决了吗?怎么解决的?

@lihuazhang 我是直接跳回了1.2.0的版本就可以了,用1.2.3的版本老是连不上,解决的方法是因为之前放的是测试包,但是bundleID却是正式环境下的,所以匹配不上就报错了,后来找到原因了替换一下就可以了!

按guide提示运行成功,想知道测试用例怎么运行啊

楼主,我的是在模拟器上build的,也有这个问题,怎么解决。能加您qq么
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 2ED6A33C-39B6-47B2-B27E-9A4255C7F4CE
info: [debug] Couldn't find ideviceinstaller, trying built-in at /usr/local/lib/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

恒温 #36 · April 02, 2015 作者

#35楼 @120046303 我的帖子里没说清楚么?ideviceinstaller 这个没找到,就编译一个啊。

@xuxiujin , @lihuazhang
我碰到同样的 inspector 无法启动的问题,
nancymac:fruitstrap lixia$ pwd
/Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap
nancymac:fruitstrap lixia$ ls -l
total 80
-rwxr-xr-x@ 1 lixia admin 37476 Mar 26 04:09 fruitstrap
我这下面没有 fruitstrap 文件夹,不知道是安装哪里出错了么?还有我的 deviceconsole 路径下面是这样的:
nancymac:deviceconsole lixia$ pwd
/Applications/Appium.app/Contents/Resources/node_modules/appium/build/deviceconsole
nancymac:deviceconsole lixia$ ls -la
total 32
drwxr-xr-x@ 3 lixia admin 102 Mar 26 04:09 .
drwxr-xr-x@ 13 lixia admin 442 Mar 26 18:03 ..
-rwxr-xr-x@ 1 lixia admin 16332 Mar 26 04:09 deviceconsole
两位前辈可以帮忙看下问题出在哪了么? 我的 appium 是1.4.0的版本。。。

xcode版本:6.3
appium版本:1.3.7
ipod版本:8.3
请问:我按照上述的操作仍然存在报错信息
信息为:

请问要如何解决?
log为:

Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --address "127.0.0.1" --command-timeout "7200" --platform-version "8.3" --platform-name "iOS" --app "com.ruijie.whistle.activity" --udid "95C36D7083AF19C104A61532BD98F88F8907AECD" --device-name "iPhone 6"

info: Welcome to Appium v1.3.7 (REV 72fbfaa116d3d9f6a862600ee99cf02f6d0e2182)

info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"app":"com.ruijie.whistle.activity","udid":"95C36D7083AF19C104A61532BD98F88F8907AECD","address":"127.0.0.1","deviceName":"iPhone 6","platformName":"iOS","platformVersion":"8.3","defaultCommandTimeout":7200}

info: Console LogLevel: debug

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}

info: <-- GET /wd/hub/status 200 7.044 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}

info: <-- GET /wd/hub/status 200 3.161 ms - 104 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"}}}

info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {"status":0,"value":[]}
info: <-- GET /wd/hub/sessions 200 0.949 ms - 23 {"status":0,"value":[]}

info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"8.3","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone 6"}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/720.3.13 Darwin/14.3.0 (x86_64)

info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 1a4ac54c-a53e-4d5d-9c65-f6095efaa2e1

info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder

info: [debug] Setting Xcode version

info: [debug] Setting iOS SDK Version

info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.3
info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.ruijie.whistle.activity/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.ruijie.whistle.activity/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/limei/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/limei/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: [debug] Reusing dynamic bootstrap: /Users/limei/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.3","iOSSDKVersion":"8.3","deviceName":"iPhone 6","platformVersion":"8.3"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6 (8.3 Simulator)'
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons

info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"},"isShuttingDown":false},"sessionId":"1a4ac54c-a53e-4d5d-9c65-f6095efaa2e1"}
info: <-- GET /wd/hub/status 200 1.101 ms - 178 {"status":0,"value":{"build":{"version":"1.3.7","revision":"72fbfaa116d3d9f6a862600ee99cf02f6d0e2182"},"isShuttingDown":false},"sessionId":"1a4ac54c-a53e-4d5d-9c65-f6095efaa2e1"}

info: [debug] Cleaning up appium session

info: [debug] Error: Log capture did not start in a reasonable amount of time
at null._onTimeout (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-log.js:137:10)
at Timer.listOnTimeout (timers.js:110:15)

error: Log capture did not start in a reasonable amount of time

info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Log capture did not start in a reasonable amount of time)","origValue":"Log capture did not start in a reasonable amount of time"},"sessionId":null}
info: <-- POST /wd/hub/session 500 10095.340 ms - 234

error: Failed to start an Appium session, err was: Error: Log capture did not start in a reasonable amount of time

info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 95C36D7083AF19C104A61532BD98F88F8907AECD
info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 95C36D7083AF19C104A61532BD98F88F8907AECD --bundle com.ruijie.whistle.activity

问题已解决,udid一定要小写

尝试了很久,必须前来求指导了。
appium:1.4.1
Xcode:6.3.2

连接真机打开inspector报错

log日志:

error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

info: [debug] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
at [object Object].IOS.getIDeviceObj (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:909:13)
at [object Object].IOS.installToRealDevice (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:856:32)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:607:21
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:246:17
at iterate (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:146:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:157:25
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:248:21
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:612:34
at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:52:5)
at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:27:5)
at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
at Glob.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:131:7)
at Glob.emit (events.js:107:17)
at Glob._finish (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:168:8)
at done (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:157:12)
at Glob._processReaddir2 (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:351:12)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:288:17
at RES (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/inflight/inflight.js:23:14)
at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
at Glob._readdirEntries (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:480:10)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:457:12
at FSReqWrap.oncomplete (fs.js:95:15)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system)","origValue":"Could not initialize ideviceinstaller; make sure it is installed and works on your system"},"sessionId":null}
info: <-- POST /wd/hub/session 500 1468.450 ms - 300

error: Failed to start an Appium session, err was: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

我得设置:

deviceconsole:

在Xcode里面Product->profile,手机上能正常运行成功。
我得配置在IOS模拟器也能正常运行。真机就报错。

忘了附上 ideviceinstaller的图。系统是有的。

运行:

/Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 4880fb6f9866658d651ede8ea883c49ad1d71297 --bundle com.hipalsports.hipal

报错

-bash: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap: No such file or directory

#41楼 @wangnima wo用1.4.1的appium 启动真机 和你是一样的情况,请问你的问题解决了吗

楼上的问题解决了么,我的也是这样的问题~跪求楼主现身

恒温 #44 · November 11, 2015 作者

#43楼 @wy12345 在这里跪求有什么用?你贴出你的问题来啊

恒温 #45 · November 11, 2015 作者

这是真机的 inspector

info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.ttyongche.ttyc/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.ttyongche.ttyc/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments

info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/wangyao/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/wangyao/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Reusing dynamic bootstrap: /Users/wangyao/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

warn: Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice probably isn't installed
info: [debug] Attempting iOS device log capture via deviceconsole

warn: Could not capture logs from device. Continuing without capturing logs.

info: [debug] Creating iDevice object with udid F0188AAE55CA344A2FFDE339AE4DCCD5EFCA9CFC
info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

error: Log capture did not start in a reasonable amount of time

@llihuazhang我的问题如上,帮忙看看怎么解决~

恒温 #49 · November 12, 2015 作者

#48楼 @wy12345 Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

日志里不是写了吗? 找不到 ideviceinstaller, 安装 ideviceinstaller 这个啊。

@lihuazhang 新手还不太会看log,只看了error和warn。找到路径下的ideviceinstaller,安装还是有问题。Last login: Thu Nov 12 11:08:27 on ttys002
172-15-70-48:~ wangyao$ /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller ; exit;
dyld: Library not loaded: @executable_path/../lib/libimobiledevice.3.dylib
Referenced from: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
Reason: image not found
Trace/BPT trap: 5
logout

[进程已完成]

@lihuazhang 再帮忙看看~多谢

#49楼 @lihuazhang 问题已解决~多谢多谢。

恒温 #53 · November 12, 2015 作者

#52楼 @wy12345 按着错误 谷歌下 很快就解决了。

54Floor has been deleted
55Floor has been deleted

楼主,iOS真机启动Inspector时,报错如下,麻烦帮忙看一下,谢谢!
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 2cf67479-8102-47c4-8226-46ed597a772d

info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.boohee.food/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.boohee.food/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/zhuquan/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/zhuquan/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Reusing dynamic bootstrap: /Users/zhuquan/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid 7f5d1c1cb5e7ea8046052b0c52d371e24fa0a8c3

在这就报错了

恒温 #57 · March 02, 2016 作者

#56楼 @zhuquan0814 看英文啊

@lihuazhang 不是每次报错,弹框都是提示这个吗,解决ideviceinstaller问题前也是提示这个啊

恒温 #59 · March 02, 2016 作者

#58楼 @zhuquan0814 英文不是说 App Path 参数没有提供吗?

@lihuazhang 我用的这个设置,真机build了测试App的,填了bundleid

恒温 #61 · March 02, 2016 作者

#60楼 @zhuquan0814 你真机的app已经装好了吧?

@lihuazhang 真机上已经build了com.boohee.food这个App了

63Floor has been deleted
恒温 #64 · March 02, 2016 作者

在这个帖子问问题的同学,请自己看帖子,我帖子里明确说明你是可以进行真机调试的。

65Floor has been deleted

#27楼 @xuxiujin 这个问题解决了吗?运行时也报

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Instruments crashed on startup) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 44.86 seconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'zhangdeiMac.local', ip: '10.xxx.3.236', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_40'
Driver info: io.appium.java_client.ios.IOSDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

@lihuazhang mac连真机,报这个错,用dmg装的appium1.4.13版本,下载了ideviceinstaller,运行了steps但是还是提示这个错误。

@zhuquan0814 你的问题解决了么 我也是一样的情况


请问一直卡在这个界面,大致是什么原因引起的啊? 刚在Mac上装了appium环境,真机调试出现这个问题

#69楼 @mick_god 你解决了么?我也是这样 一直卡在这个界面,弹框这样子的。

楼主简直是天使~完美的解决了我的问题,谢谢哒

@mick_god 你问题解决了吗? 我也遇到一样的问题。

#70楼 @huiniuer
问题解决了,将服务器IP地址修改成127.0.0.1就解决了。 之前我的IP地址是设置成内网的一个IP。你可以试一下看是不是这个问题导致的

#72楼 @ivy520 问题解决了,将服务器IP地址修改成127.0.0.1就解决了。 之前我的IP地址是设置成内网的一个IP。你可以试一下看是不是这个问题导致的

#61楼 @lihuazhang 请教楼主

[MJSONWP] Encountered internal error running command: Error: Command failed: ideviceinstaller -u 39d4cc7a73d5120ed70317863d4b2c46552f3689 -u App

at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)

已经发现是ideviceinstaller -u 39d4cc7a73d5120ed70317863d4b2c46552f3689 -u App命令有问题(后面的-u需要大写),但是去哪个文件里面改?还是说需要用源码改?

恒温 #76 · May 17, 2016 作者

#75楼 @mingyuwang 什么版本的啊?

#76楼 @lihuazhang 1.4.16和1.5.2都有这个问题

恒温 #78 · May 17, 2016 作者

#73楼 @mingyuwang 依赖包有的问题, node-idevice

#78楼 @lihuazhang 😄谢谢楼主```应该是换一下node-idevice的版本,我试试去``

问题解决了 修改node-idevice的main.js的exec(this._build_cmd(['-u', app]), function (err, stdout, stderr),中的-u为大写即可

Responding to client with driver.getStatus() result: {"build":{"version":"1.5.2","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 10 ms - 83
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 3 ms - 40

[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"9.3.1","udid":"D8A98E35-BD85-5A5C-9C51-CFA796368B3A","automationName":"Appium","bundleId":"com.weizuche076.WeRentCar","deviceName":"iPhone 6"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformName":"iOS","platformVersion":"9.3.1","udid":"D8A98E35-BD85-5A5C-9C51-CFA796368B3A","automationName":"Appium","bundleId":"com.weizuche07...
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] platformName: 'iOS'
[Appium] platformVersion: '9.3.1'
[Appium] udid: 'D8A98E35-BD85-5A5C-9C51-CFA796368B3A'
[Appium] automationName: 'Appium'
[Appium] bundleId: 'com.weizuche076.WeRentCar'
[Appium] deviceName: 'iPhone 6'
[Appium] app: 'com.weizuche076.WeRentCar'
[Appium] noReset: true
[Appium] showIOSLog: true

[BaseDriver] Session created with session id: 24d224e8-42c4-4525-b2cd-f5485cbbe15b
[debug] [iOS] Not auto-detecting udid.
[debug] [iOS] App is an iOS bundle, will attempt to run as pre-existing
[debug] [iOS] Removing any remaining instruments sockets
[debug] [iOS] Cleaned up instruments socket /var/folders/yw/s47v0nk54yzg04p2ls7m3m0r0000gn/T/instruments_sock
[debug] [iOS] No language specified. Using default strings
[debug] [iOS] Strings file not found. Looking in 'en.lproj' directory
[iOS] Could not file localizable strings file 'Localizable.strings'!
[debug] [iOS] Creating instruments
[debug] [UIAuto] Preparing bootstrap code
[debug] [UIAuto] Dynamic bootstrap dir: /Users/pengbingxiang/Library/Application Support/appium/bootstrap
[debug] [UIAuto] Dynamic env: {"
nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js","instrumentsSock":"/var/folders/yw/s47v0nk54yzg04p2ls7m3m0r0000gn/T/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}

[debug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...

[debug] [UIAuto] Dynamic bootstrap path: /Users/pengbingxiang/Library/Application Support/appium/bootstrap/bootstrap-7a90aecc8b979ac8.js

[debug] [UIAuto] Reusing dynamic bootstrap: /Users/pengbingxiang/Library/Application Support/appium/bootstrap/bootstrap-7a90aecc8b979ac8.js
[debug] [iOS] Reset not set, not ending real device
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'

[MJSONWP] Encountered internal error running command: Error: Command failed: ideviceinstaller -U D8A98E35-BD85-5A5C-9C51-CFA796368B3A -l

at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

[debug] [iOS] Creating iDevice object with udid D8A98E35-BD85-5A5C-9C51-CFA796368B3A
[HTTP] <-- POST /wd/hub/session 500 124 ms - 215

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"
build":{"version":"1.5.2","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 16 ms - 83

楼主帮忙看看是怎么回事?

也是依赖包 node-idevice的原因吗

#14楼 @xuxiujin 你的问题后来这么解决的

#81楼 @stone4302 我和你一样的问题 我把这条命令拿出来直接执行,报的错误信息是 Invalid UDID specified
但是我的udid应该是没有问题的。你这个问题解决了吗

恒温 #85 · June 01, 2016 作者

#82楼 @stone4302 你用模拟器,捣乱啥啊。。。

#85楼 @lihuazhang idevice_id是不是不支持ios9.3?

恒温 #87 · June 01, 2016 作者

#86楼 @kuroky 支持啊

appium 定位ios的元素太慢了,有什么快点的定位方法吗?driver.executeScript这个方法倒是快,但是跟XPATH一样依赖于全路径

https://discuss.appium.io/t/failed-to-start-an-appium-session-err-was-error-installing/7280
我遇到了相同的问题,不知道怎么解答,之前是可以的,升级了xcode后,就出现了这个问题。

Xcode 7.3
Appium 1.4.13


请问楼主,我appium连接模拟器,起不来是什么原因哦,用Instruments可以录制,但是用appium就是连不上

iOS上有的App会弹出提示框,会造成自动化测试中断,这种问题一般是怎么解决的呢?

#45楼 @lihuazhang
Traceback (most recent call last):
File "helloWorld.py", line 107, in
main()
File "helloWorld.py", line 97, in main
testcase = TestCase(desired_caps)
File "helloWorld.py", line 24, in init
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
File "build/bdist.macosx-10.11-intel/egg/appium/webdriver/webdriver.py", line 36, in init
File "/Library/Python/2.7/site-packages/selenium-2.53.5-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 90, in init
self.start_session(desired_capabilities, browser_profile)
File "/Library/Python/2.7/site-packages/selenium-2.53.5-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/Library/Python/2.7/site-packages/selenium-2.53.5-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/Library/Python/2.7/site-packages/selenium-2.53.5-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Command failed: /bin/sh -c ideviceinstaller -u ba7f3d8471730b2b55fb497409e7a5f7422df422 -l
一直报这个错,帮忙看下吧,谢谢!
模拟器可以起来。

#79楼 @mingyuwang 依赖包怎么改?

#1楼 @wangcityboy deviceconsole在哪里啊,我的imac上没有

#93楼 @jake20001 1.5.2/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice这个目录下的main.js文件的138行exec(this._build_cmd(['-U', app]), function (err, stdout, stderr) {

#95楼 @mingyuwang 1.5.2/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice这个目录找不到啊。 /Applications/Appium.app/Contents/Resources/node_modules/appium/build/deviceconsole这个目录也没有。

#96楼 @jake20001 试试这个目录/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice

#97楼 @mingyuwang 目录是找到了,把U->u,问题还在。

#98楼 @jake20001 是小写改成大写,问题还在的话,你和我碰到的就不是一个问题。

#99楼 @mingyuwang 61行有个小写,138是大写,本来就是这么写的。很奇怪的是:Command failed: /bin/sh -c ideviceinstaller -u ba7f3d8471730b2b55fb497409e7a5f7422df422 -l ,-l后面就这样断了?

#100楼 @jake20001 我建议你单独开一个帖子,把所有信息描述的清楚一些,可能会找到问题。

@lihuazhang 你好,我现在有个页面,开发在外面套了层东西,导致appium inspect 点不到里面的元素,怎么解决?

恒温 #103 · June 20, 2016 作者

#102楼 @pacerron 你都知道原因了。。。那我有啥办法。。

#103楼 @lihuazhang 请教下,appium inspect能点到元素的前提是什么?

恒温 #105 · June 20, 2016 作者

#104楼 @pacerron 元素是可见的,或者你可以理解为该元素有 accessible 的属性。

@lihuazhang
hi:
请教一下哈~
ios 真机测试 切换webwiew 后找不到控件了

Set<String> contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
System.out.println(contextName);
if(contextName.contains("WEB")){
driver.context(contextName).switchTo();
}
}
System.out.println(driver.findElement(By.name("预约服务人员了解产品")).isDisplayed());
driver.findElement(By.name("预约服务人员了解产品")).click();

System.out.println 输出信息和idea 报错信息:

NATIVE_APP
WEBVIEW_131
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)

Launching Appium server with command: D:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --app D:\androidworkspace\appium_demo\apps\ContactManager.apk --platform-name Android --platform-version 21 --automation-name Appium --device-name "mx5" --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"app":"D:\androidworkspace\appium_demo\apps\ContactManager.apk","address":"127.0.0.1","logNoColors":true,"deviceName":"mx5","platformName":"Android","platformVersion":"21","automationName":"Appium"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"5.0.1","app":"D:\androidworkspace\appium_demo\apps\ContactManager.apk","platformName":"Android","deviceName":"mx5","browserName":"","appActivity":".ContactManager","appPackage":"com.example.android.contactmanager"}}
info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
info: [debug] Using local app from desired caps: D:\androidworkspace\appium_demo\apps\ContactManager.apk
info: [debug] Creating new appium session cb849dfa-ca5e-4f85-b5cf-b4ea53cb5551
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.7.0_67
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe
info: [debug] Using fast reset? true
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: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" devices
info: [debug] 1 device(s) connected
info: Found device 85GBBM922JJY
info: [debug] Setting device id to 85GBBM922JJY
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY wait-for-device
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: Device API level is: 21
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language:
info: [debug] java -jar "D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "D:\androidworkspace\appium_demo\apps\ContactManager.apk" "C:\Users\寰愭稕娑沑AppData\Local\Temp\com.example.android.contactmanager"
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY push "C:\Users\寰愭稕娑沑\AppData\Local\Temp\com.example.android.contactmanager\strings.json" /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\aapt.exe" dump xmltree D:\androidworkspace\appium_demo\apps\ContactManager.apk AndroidManifest.xml
info: [debug] Set app process to: com.example.android.contactmanager
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for D:\androidworkspace\appium_demo\apps\ContactManager.apk.
info: [debug] executing cmd: java -jar "D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" D:\androidworkspace\appium_demo\apps\ContactManager.apk
info: [debug] App already signed.
info: [debug] Zip-aligning D:\androidworkspace\appium_demo\apps\ContactManager.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\zipalign.exe" -f 4 D:\androidworkspace\appium_demo\apps\ContactManager.apk C:\Users\寰愭稕娑沑AppData\Local\Temp\11663-4896-11xuowd\appium.tmp
info: [debug] MD5 for app is b2d2916bb5388e1dc281ec3e71ef1234
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "ls /data/local/tmp/b2d2916bb5388e1dc281ec3e71ef1234.apk"
info: [debug] Getting install status for com.example.android.contactmanager
info: [debug] Getting device API level
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "pm list packages -3 com.example.android.contactmanager"
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "am force-stop com.example.android.contactmanager"
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "pm clear com.example.android.contactmanager"
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY push "D:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY install "D:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY install "D:\Program Files (x86)\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: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s 85GBBM922JJY shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.example.android.contactmanager -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] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
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] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "dumpsys window"
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] [UIAUTOMATOR STDOUT] [CDS]close[4724]
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: 1.027
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...
error: Failed to start an Appium session, err was: Error: stdout maxBuffer exceeded.
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Error: stdout maxBuffer exceeded.
at Socket. (child_process.js:792:12)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at Pipe.onread (net.js:540:20)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: stdout maxBuffer exceeded.)","cmd":"C:\Windows\system32\cmd.exe /s /c \"\"D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe\" -s 85GBBM922JJY shell \"dumpsys window\"\"","origValue":"stdout maxBuffer exceeded."},"sessionId":null}
info: <-- POST /wd/hub/session 500 9229.592 ms - 339
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"5.0.1","app":"D:\androidworkspace\appium_demo\apps\ContactManager.apk","platformName":"Android","deviceName":"mx5","browserName":""}}
info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
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: D:\androidworkspace\appium_demo\apps\ContactManager.apk
info: [debug] Creating new appium session 6d0e2b97-5a6e-4e41-a787-af7203683436
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.7.0_67
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\Program Files (x86)\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 D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\aapt.exe
info: [debug] Extracting package and launch activity from manifest.
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\aapt.exe" dump badging D:\androidworkspace\appium_demo\apps\ContactManager.apk
info: [debug] badging package: com.example.android.contactmanager
info: [debug] badging act: com.example.android.contactmanager.ContactManager
info: [debug] Parsed package and activity are: com.example.android.contactmanager/com.example.android.contactmanager.ContactManager
info: [debug] Using fast reset? true
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: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" devices
info: [debug] 1 device(s) connected
info: Found device 85GBBM922JJY
info: [debug] Setting device id to 85GBBM922JJY
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY wait-for-device
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: Device API level is: 21
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language:
info: [debug] java -jar "D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "D:\androidworkspace\appium_demo\apps\ContactManager.apk" "C:\Users\寰愭稕娑沑AppData\Local\Temp\com.example.android.contactmanager"
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY push "C:\Users\寰愭稕娑沑\AppData\Local\Temp\com.example.android.contactmanager\strings.json" /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\aapt.exe" dump xmltree D:\androidworkspace\appium_demo\apps\ContactManager.apk AndroidManifest.xml
info: [debug] Set app process to: com.example.android.contactmanager
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for D:\androidworkspace\appium_demo\apps\ContactManager.apk.
info: [debug] executing cmd: java -jar "D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" D:\androidworkspace\appium_demo\apps\ContactManager.apk
info: [debug] App already signed.
info: [debug] Zip-aligning D:\androidworkspace\appium_demo\apps\ContactManager.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\zipalign.exe" -f 4 D:\androidworkspace\appium_demo\apps\ContactManager.apk C:\Users\寰愭稕娑沑AppData\Local\Temp\11663-4896-7rmlqa\appium.tmp
info: [debug] MD5 for app is b2d2916bb5388e1dc281ec3e71ef1234
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "ls /data/local/tmp/b2d2916bb5388e1dc281ec3e71ef1234.apk"
info: [debug] Getting install status for com.example.android.contactmanager
info: [debug] Getting device API level
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "pm list packages -3 com.example.android.contactmanager"
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "am force-stop com.example.android.contactmanager"
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "pm clear com.example.android.contactmanager"
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY push "D:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY install "D:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY install "D:\Program Files (x86)\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: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s 85GBBM922JJY shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.example.android.contactmanager -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] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
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] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] executing cmd: "D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 85GBBM922JJY shell "dumpsys window"
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] [UIAUTOMATOR STDOUT] [CDS]close[4724]
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: 1.06
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: stdout maxBuffer exceeded.
info: [debug] Error: stdout maxBuffer exceeded.
at Socket. (child_process.js:792:12)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at Pipe.onread (net.js:540:20)

模拟器下可以使用,求解,谢谢

恒温 #109 · July 03, 2016 作者

#107楼 @xutt0 我这个帖子是ios的,android你起什么劲?

楼主我也遇到 inspector打不开,你说要把 device console 复制到相应的路径,我想问下怎么找到 device console 这个文件😭


请问这个是什么原因

恒温 #112 · July 09, 2016 作者

#111楼 @jcwhy
看英文,你的问题是英文提示的。

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false}}
info: <-- GET /wd/hub/status 200 0.721 ms - 128 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false}}

info: [debug] /Users/kugou/Downloads/KugouFM_V4.3.0_4310.ipa copied to /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/appium-app.zip

info: [debug] Unzipping /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/appium-app.zip

info: [debug] Testing zip archive: /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful

info: [debug] Using locally extracted app: /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/Payload/KugouFM.app

info: [debug] Creating new appium session dc30a0f2-d8cc-4f6b-a124-0c228be27f00

info: [debug] Removing any remaining instruments sockets

info: [debug] Cleaned up instruments socket /tmp/instruments_sock

info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/Payload/KugouFM.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML

info: [debug] Could not parse plist file (as XML) at /var/folders/26/m53drpcd2ms2_8lw_9fmxnsw0000gn/T/11669-42631-qhe416/Payload/KugouFM.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/kugou/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...

info: [debug] Dynamic bootstrap path: /Users/kugou/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js

info: [debug] Creating or overwritting dynamic bootstrap: /Users/kugou/Library/Application Support/appium/bootstrap/bootstrap-5923cadea0343e3f.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

warn: Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice probably isn't installed

info: [debug] Attempting iOS device log capture via deviceconsole

info: [debug] Creating iDevice object with udid c1f8cf0852df08d72a92d7ee019324bf2519e106

info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller

error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

info: [debug] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
at [object Object].IOS.getIDeviceObj (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:909:13)
at [object Object].IOS.installToRealDevice (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:856:32)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:607:21
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:246:17
at iterate (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:146:13)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:157:25
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:248:21
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:612:34
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:52:5)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-crash-log.js:27:5)
at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
at Glob. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:131:7)
at Glob.emit (events.js:107:17)
at Glob._finish (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:168:8)
at done (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:157:12)
at Glob._processReaddir2 (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:351:12)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:288:17
at RES (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/inflight/inflight.js:23:14)
at f (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/node_modules/once/once.js:17:25)
at Glob._readdirEntries (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:480:10)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/glob/glob.js:457:12
at FSReqWrap.oncomplete (fs.js:95:15)

info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system)","origValue":"Could not initialize ideviceinstaller; make sure it is installed and works on your system"},"sessionId":null}
info: <-- POST /wd/hub/session 500 4938.839 ms - 300

恒温 #114 · July 09, 2016 作者

#113楼 @jcwhy ideviceinstaller 没安装吧?

#114楼 @lihuazhang 装了,现在时报这个

[Appium] Appium REST http interface listener started on 0.0.0.0:4723

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...

[HTTP] <-- GET /wd/hub/status 200 25 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 8 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 8 ms - 83
[HTTP] --> GET /wd/hub/sessions {}

[BaseDriver] SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.
at IosDriver.validateDesiredCaps (lib/basedriver/driver.js:120:25)
at IosDriver.validateDesiredCaps (lib/driver.js:40:16)
at IosDriver.callee$0$0$ (lib/basedriver/commands/session.js:14:8)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) as next
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.callee$0$0 as createSession
at IosDriver.createSession$ (lib/driver.js:40:16)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) as next
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.createSession (lib/driver.js:110:19)
at AppiumDriver.createSession$ (lib/appium.js:121:43)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at invoke (/Applications/Appium.app/
[HTTP] <-- POST /wd/hub/session 500 64 ms - 198

Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) as next
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
{ [SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.] jsonwpCode: 33 }

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 8 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 8 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...

[HTTP] <-- GET /wd/hub/status 200 150 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 19 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 7 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 9 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 8 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 8 ms - 83

恒温 #116 · July 11, 2016 作者

看日志 A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.

😭 还是没解决问题,楼主可以加我Q吗441079060😭

Encountered internal error running command: Error: Command failed: ideviceinstaller -u cacb81f97acba87686a5bed1a26c22891a1439f1 -l
No IOS device found,is it plugged in? 启动inspector时,报找不到ios设备,请教一下楼主这个该怎么解决

#113楼 @none uuid不对吗? 我从itools上看的

恒温 #120 · July 12, 2016 作者

#117楼 @jcwhy 你没有写 deviceName 啊

恒温 #121 · July 12, 2016 作者

#119楼 @none 你先看看 instruments -w device ,有没有你的设备。

#121楼 @lihuazhang 还真没有,怎么才能连上呢

恒温 #123 · July 12, 2016 作者

#122楼 @none 。。。这个我就不知道了。 你换个电脑看看?

#123楼 @lihuazhang 是因为我用的虚拟机的缘故么 暂时没配备mc


有人知道ideviceinstaller -l 指令一直卡着,查询不到任何东西这个问题吗? ituns检测连接征真机正常,ideviceinstaller重新安装也不行。

126Floor has been deleted

#123楼 @lihuazhang 万分感谢 之前打得版本是release版本的 换成debug版本就好了 终于搞定环境了


我是真机调试的,devicename是查看手机关于里面的,确定没错。手机已经安装了开发者证书的包

ideviceinstaller -l 显示 “Could not connect to lockdownd. Exiting.”
请问这个问题遇到过吗?
谢谢

#107楼 @xutt0 我也遇到这个问题,解决方案就是重启真机,再尝试启动appium就成功了!你也试试

配置了ipa文件、模拟器、ios系统版本,运行后点击inspector,启动了模拟器,但是安装应用失败,最后自动关闭了模拟器。
部分日志如下:
[Appium] Welcome to Appium v1.5.3
...
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:57 lingz-
mac SpringBoard[6687]: [FBSystemService] Error launching io.appium.testApp.lingz: Unspecified (1)
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:57 --- last message repeated 1 time ---
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:57 lingz-mac SpringBoard[6687]: Application 'UIKitApplication:io.appium.testApp.lingz[0xcce2]' exited for an unknown reason.

[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:58 lingz-mac dataaccessd[6743]: 0x7f8ca1701ae0|DA|Error|spinnerIdentifiers to be implemented by subclass

[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:58 lingz-mac com.apple.CoreSimulator.SimDevice.17525F80-F5A0-457F-A64C-8B5A73115B00.launchd_sim6671: Program specified by service does not contain one of the requested architectures: �
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:58 lingz-mac SpringBoard[6687]: Unable to get pMJSONWP] Calling AppiumDriver.getStatus() with args: []
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:57 lingz-mac com.apple.CoreSimulator.SimDevice.17525F80-F5A0-457F-A64C-8B5A73115B00.launchd_sim6671: Program specified by service does not contain one of the requested architectures: �
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:57 lingz-mac SpringBoard[6687]: Unable to get pid for 'UIKitApplication:io.appium.testApp.lingz[0xcce2]': No such process (err 3)
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:57 lingz-mac SpringBoard[6687]: Bootstrapping failed for id for 'UIKitApplication:io.appium.testApp.lingz[0xf0ca]': No such process (err 3)
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:58 lingz-mac SpringBoard[6687]: Bootstrapping failed for
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:58 lingz-mac SpringBoard[6687]: [FBSystemService] Error launching io.appium.testApp.lingz: Unspecified (1)
[iOSLog] [IOS_SYSLOG_ROW] Aug 15 21:59:58 --- last message repeated 1 time ---

测试设备已经安装了该app

配置如上,点击Launch,点击inspector,弹出提示
日志如下:
[debug] [UIAuto] Dynamic bootstrap path: /Users/xxxx/Library/Application Support/appium/bootstrap/bootstrap-378e63247ec4c133.js
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/xxxx/Library/Application Support/appium/bootstrap/bootstrap-378e63247ec4c133.js
[debug] [iOS] Running ios real device reset flow

[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'

[debug] [iOS] Creating iDevice object with udid f44efcef93f529a3e140bf8cfdbc03327d1cd10d

[debug] [iOS] App is not installed. Will try to install.

[MJSONWP] Encountered internal error running command: Error: Installing /Users/xxxx/Downloads/AppiumTestApp.app failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js💯13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

[HTTP] <-- POST /wd/hub/session 500 862 ms - 202

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 12 ms - 83

#132楼 @jiminy 我之前遇到过,忘记怎么搞好了,现在又出来啦😭

#133楼 @jiffy 我到appium 官方社区提问了,也还没有解决。
我都在怀疑是不是我os 版本太高,而相关的应用没有支持到这个系统导致的了。

陈子昂 [Topic was deleted] 中提及了此贴 18 Aug 17:54

#134楼 @jiminy 不应该啊,不记得有升级os啊,感觉好像是ideviceinstaller的问题,已经安装好app啦,还提示没有安装。

#136楼 @jiffy 其实我觉得是appium使用 ideviceinstaller的时候需要得到root权限,因为在终端执行ideviceinstaller命令行必须加sudo才能正常。

#137楼 @jiminy 你的问题解决了吗

#138楼 @jiffy 还没有,之前一直在忙工作,打算现在重新折腾下。

#139楼 @jiminy 不会真的是系统升级导致的吧😱 https://github.com/appium/appium/issues/6679

mac的appium1.4.13版不支持键盘操作吗?

appium1.5 以上的版本把name元素定位方式去掉了,只能用xptah定位?好坑啊,之前写的案例又要重新定义

2016-09-19 16:31:00:225 - [debug] [iOS] App is not installed. Will try to install.

2016-09-19 16:31:00:683 - [MJSONWP] Encountered internal error running command: Error: Installing bitauto.app failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js💯13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

我装的是签名包,开发者证书什么都设置过了,但是运行的时候老是报这个错,提示我的app没安装...求解呀。

恒温 #144 · September 19, 2016 作者

#143楼 @fengytn 他说你没装,那就是没装咯。bitauto.app

#144楼 @Lihuazhang 我装了呀,我自己用xcode build的代码,从开发那里拿到的开发版

恒温 #146 · September 19, 2016 作者

#145楼 @fengytn
看日志:

Encountered internal error running command: Error: Installing bitauto.app failed

你既然已经安装了,干嘛让 appium 再装一遍?

#146楼 @Lihuazhang 那这个设置在哪儿呀?我没有让重新装呀。

恒温 #148 · September 19, 2016 作者

#147楼 @fengytn 仔细看帖子,好吗?

#148楼 @Lihuazhang 请问应该看什么地方,我完全是按照帖子上设置的。没有什么地方有变动,除了app的名称

恒温 #150 · September 19, 2016 作者

#149楼 @fengytn 那把你的过程都说出来,不要贴个日志就来问,你当人人都是神啊

#150楼 @Lihuazhang

这两个是我的设置,然后我的设备已经加到开发者机器里了,开发也给了我相应的证书,我也替换了,拿到了代码,从xcode上build了一个app,Instruments 上调试过可以运行的,把Instruments 全都关了。然后运行appium,启动inspector时就弹如下的窗口,和我刚才发的日志。

恒温 #152 · September 19, 2016 作者

#151楼 @fengytn bundle id 截图看看?

恒温 #153 · September 19, 2016 作者

#151楼 @fengytn ideviceinstaller -l 这个运行结果贴出来

#153楼 @Lihuazhang
出现的是这个提示,谢谢,我先自己研究下这个问题怎么解决。谢谢给出查找问题的思路。

恒温 #155 · September 19, 2016 作者

#148楼 @fengytn lockdown 挂了。。。 那appium 和你的设备无法沟通了,所有的信息都拿不到。

恒温 #156 · September 19, 2016 作者

#154楼 @fengytn 建议重启下手机和mac电脑。

@fengytn
终端输入:
sudo chmod -R 777 /var/db/lockdown/

[debug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
[debug] [UIAuto] Dynamic bootstrap path: /Users/bobli/Library/Application Support/appium/bootstrap/bootstrap-0f2f33a19dafe5b0.js
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/bobli/Library/Application Support/appium/bootstrap/bootstrap-0f2f33a19dafe5b0.js
[debug] [iOS] Running ios real device reset flow
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'

[debug] [iOS] Creating iDevice object with udid 8897b2aa73751c4b4948c4c7d1bd53722cb263c3

[debug] [iOS] App is not installed. Will try to install.

[MJSONWP] Encountered internal error running command: Error: Installing /var/folders/2s/5p6vxhc94b35ng1_zr46_ll80000gn/T/2016821-47166-rf786b/Payload/ANETCheckin.app failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js💯13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)
请问我这个是什么原因?我一惊弄了好几天都解决不了,谢谢了!


我的mac是10.11版,Xcode8,安装的1.53版本的appium,用appium-doctor检测过没问题的。但是appium点击Launch后出现/bin/bash:/Users/me/appium:No such file or directory。楼主您知道是什么问题么,大神带我啊😭 😭

#154楼 @fengytn http://www.cnblogs.com/lishuai0214/p/4617051.html, 我遇到的问题和你一样,原来是homebrew对新的OS X不支持,需要重新安装一下,具体可以参考链接里的解决办法

#157楼 @Never_More
用这个方式 sudo chmod -R 777 /var/db/lockdown/是解决了,但是只要重启电脑(或开机 )ideviceinstaller都会挂,还得再次输入这个命令才能运行脚本,请问有什么方式可以不用每次开机都输入这个命令吗?

@Never_More @ffac 我也碰到了同样的问题。。有谁有高招吗?

#163楼 @zq1956 我也没有找到解决方法。。

@Lihuazhang 我是appium 新手,想在Mac 上连真机执行自动化测试脚本,遇到一个问题,启动inspector 就会报这个错误
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/pinschengdu/Library/Application Support/appium/bootstrap/bootstrap-f833f7f1c340492a.js
[debug] [iOS] Running ios real device reset flow
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'

[debug] [iOS] Creating iDevice object with udid 52cf4251f0d7d7c2e7dfee9c0953330de6d85463

[MJSONWP] Encountered internal error running command: Error: Command failed: ideviceinstaller -u 52cf4251f0d7d7c2e7dfee9c0953330de6d85463 -l
dyld: Library not loaded: /usr/local/lib/libplist.3.dylib
Referenced from: /usr/local/bin/ideviceinstaller
Reason: no suitable image found. Did find:
/usr/local/lib/libplist.3.dylib: mach-o, but wrong architecture
/usr/local/lib/libplist.3.dylib: mach-o, but wrong architecture

at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js💯13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)

在 usr/local/lib 目录下是有这个libelist.3. dylib这个 文件的,搜了一些解决方法,更新了brew,重新装了ideviceinstaller, 依然报这个错误,请楼主帮忙指导一下

求教通过 SafariLuancher 在真机上启动 safari 之后 怎么迁移到其他网址
java代码怎么写
我试过driver.get(“http://www.baidu.com1.5.3.我应该怎么做呢??”);这种写法无效下会报错

楼主您好,想在Mac 上连真机执行自动化测试脚本,遇到一个问题,启动inspector 就会报这个错误:

appium的设置是:

appium使用的是1.5.3版本,
真机上的app也使用xcode工具安装成功,但不知道为什么总提示“App is not installed. Will try to install.” 请楼主有空帮忙指导下,万分感谢!

我断开手机再重新连接后,启动inspector 就会报这个错误:

无语了……

恒温 #169 · October 14, 2016 作者

#167楼 @youtuyuanyuan 他说你没装那就是没装咯。bundleid 对不上吧

@Lihuazhang ,这个“app is not installed”问题已经解决,是因为lockdown挂了,后来通过这个方式解决了(sudo chmod -R 777 /var/db/lockdown/),但是解决后就出现了上图的问题:
Encountered internal error running command: Error: Could not find Automation.tracetemplate in any of the followinglocations /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate,/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate

楼主,启动appium,点击 inspector就报错了,我写了一段启动代码,也是相同的报错。。


大神,求指教

#170楼 @youtuyuanyuan 层主,你好,我也遇到相同的问题了,请问你是怎么解决的?谢谢了欢迎qq交流469474446

请问下,要是跳出来app,比如跳转到手机Home,是不是就不可以控制了?
我是想进入到系统设置里面,进行蓝牙操作

恒温 #175 · October 30, 2016 作者

#174楼 @csu 不可以。但是好像appium 提供了直接操控蓝牙的命令吧?

#175楼 @Lihuazhang 非常感谢第一时间回复。我尝试了很多操作:

self.driver.background_app(100)
self.driver.close_app()
self.driver.launch_app()
self.driver.quit()都是无效的

我们公司是音响公司,想进入到IOS系统设置里面查看蓝牙是否连接成功等判断。

那烦请告知下如何直接操控蓝牙命令,那个是最好的。非常感谢😀

#169楼 @csu 印象中没有这个api命令吧?

恒温 #178 · October 30, 2016 作者

#171楼 @csu android 的好像有

#178楼 @Lihuazhang 是的,安卓有self.driver.set_network_connection(connectionType)

安装appium 输入npm install wd 就是这个情况,麻烦问下这怎么解决呢,或者有其他办法,我想安oc语言的,,,

#168楼 @youtuyuanyuan 这个是由于Xcode版本不适配导致的,尝试使用低版本的Xcode

#143楼 @fengytn Xcode8已经移除了UIautomation,所以无法安装成功,在appium更新之前只能使用IOS9+Xcode7

恒温 #183 · November 07, 2016 作者

#182楼 @rasielf 可以使用最新的appium + wda

#183楼 @Lihuazhang 具体怎么实现?我已经被这个困扰了1个月了...
目前的环境:
Appium:1.5.3
Xcode:8.1
IOS:10.0(真机),证书都安装好了

恒温 #185 · November 07, 2016 作者

#184楼 @rasielf ios都10了。那你xcode也要升级,appium也要升级。https://testerhome.com/topics/6131

#185楼 @Lihuazhang 我申请加QQ了,帖子我看过,也成功升级好了,但是发现没有inspector定位不了元素。

恒温 #187 · November 07, 2016 作者

#186楼 @rasielf inspector 现在还么有呢

#187楼 @Lihuazhang So,现在虽然服务端可以升级,但是inspector用什么替代呢?

我在做appium ios自动化遇到一个问题。有些button开发使用set title方法设置了按钮名字,但是现在appium识别不出来这个按钮名的属性,包括在name,label这些属性都是空的,导致我们无法定位。请问下有谁知道这问题怎么解决吗?除了让开发一个一个去加属性外。

补充一下,开发说他们只有一个set title的方法来设置属性。无法设置name这些属性。

@Lihuazhang 你好,第一次接触测试。然后点inspector 出现界面了,点Record可以录制脚本了。请问下怎样运行脚本呢。脚本我用的是Objective-c 语言。我做了个简单的demo,实现登陆和退出。我想用脚本实现自动化运行100次怎样实现呢?

#132楼 @jiminy 我也出现这种情况 你解决了吗?怎么解决?
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Socket. (child_process.js:1183:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:485:12)

iOS真机测试
怎么解决啊

重新启动appium,点放大镜成这样了

您好,请问我现在运行appium的时候也是报SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.
现在不知道 deviceName 在哪填啊 ,我运行ideviceinstaller -l是可以检测到我手机中的app的。

#5楼 @xuxiujin 请问你这个问题怎么解决的
谢谢 求答

appium版本:1.5.3
Xcode版本:8.2.1
运行inspectors时appium server提示的错误信息:

[MJSONWP] Encountered internal error running command: Error: Xcode version [object Object] is not yet supported

哪位大神给解答一下

appium版本:1.5.3
Xcode版本:8.2.1
运行inspectors时appium server提示的错误信息:

[MJSONWP] Encountered internal error running command: Error: Xcode version [object Object] is not yet supported

哪位大神给解答一下

#197楼 @wangqingbinSunday
我是用的appium:1.5.3 Xcode:8.2.1 跑的iOS9.3的模拟器遇到了同样问题
感觉是appium1.5.3不支持高版本的xcode啊 等待大神讲真相

#199楼 @wangjl726 之前我用的Xcode7.3.1跑appium没有问题!后来由于开发需要就升级到了8.2.1,之后再跑appium的时候就提示这个错误了!

#199楼 @wangjl726

看来还是得换版本啊 两者不可兼得

#201楼 @wangqingbinSunday 好的太用心了 再装个7.x的xcode用吧

你好 我的xcode是7.3 appium是1.5.3 真机测试点击放大镜之后就出现这个错We exceeded the number of retries allowed for instruments to successfully start; failing launch 请问是怎么回事?

恒温 #204 · January 13, 2017 作者

#203楼 @diandian0209 真机是什么系统?

10.2 但是现在出现这个问题了

206Floor has been deleted

问下为啥我的模拟器可以正常跑,连真机的时候会有这样的错误呢?HW kbd: Failed to set (null) as keyboard focus

#201楼 @wangqingbinSunday 如果是appium1.6.3呢

我appium 1.6.3 xcode8.2

还是出现[MJSONWP] Encountered internal error running command: Error: Xcode version [object Object] is not yet supported
求解 还是需要再装回xcode7.x?

ios模拟器运行问题,求解决!求帮助(QQ:975841898)
appium版本:1.5.3
Xcode版本:7.3.1
mac系统:10.11.6
ios模拟器配置如下图:

点击运行后的截图:

点击放大镜的日志:






模拟器启动后总是不停关闭与启动

点击stop后的报错:
dian'j

恒温 #210 · February 06, 2017 作者

#209楼 @LiQingxin 日志不要截图,图片看起来非常不方便。

向大神请教,我的appium版本 1.6.3 xcode是 8.2.1 是使用命令行安装的appium
启动appium服务的时候会有下面的问题,请问如何解决?
SessionNotCreatedError: A new session could not be created. Details: Appium's IosDriver does not support xcode version 8.2.1. Apple has deprecated UIAutomation. Use the "XCUITest" automationName capability instead.

恒温 #212 · February 06, 2017 作者

#211楼 @wangjl726 读读看英文,它说iosdriver 和xcode版本不匹配啦。是不是automationName 不对?

#212楼 @Lihuazhang 嗯嗯 是的 启动时把 automationName设为XCUITest就解决了 谢谢!

想问一下,appium-ios 有启动指定应用的接口吗

@Lihuazhang

XC7.3/appium1.5.3
模拟器没问题, 真机跑的时候开始没报错 真机APP 一开又关 一个又关在闪屏,一会就报错了 都是那个提示框
日志报的这个
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 12 ms - 83

[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:30 iPhone6 SpringBoard[58] : [MPUSystemMediaControls] Disabling lock screen media controls updates for screen turning off.

[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:30 iPhone6 SpringBoard[58] : [MPUSystemMediaControls] Disabling lock screen media controls updates for screen turning off.

[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:30 iPhone6 syslogd[25] : ASL Sender Statistics
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:30 iPhone6 syslogd[25] : ASL Sender Statistics
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:30 iPhone6 backboardd[60] : [HID] [MT] MTSimpleHIDManager::setPropertyInternal detection mode: 3->255
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:30 iPhone6 backboardd[60] : [HID] [MT] MTSimpleHIDManager::setPropertyInternal detection mode: 3->255

[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : _UIGraphicsDrawIntoImageContextWithOptions: cannot draw into NULL context

[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : _UIGraphicsDrawIntoImageContextWithOptions: cannot draw into NULL context

[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : _UIGraphicsDrawIntoImageContextWithOptions: cannot draw into NULL context
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : _UIGraphicsDrawIntoImageContextWithOptions: cannot draw into NULL context
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : UserNextSleepPeriod value from context store is (null)
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : UserNextSleepPeriod value from context store is (null)
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : Failed to get user inactivity forecast
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : Failed to get user inactivity forecast
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 UserEventAgent[26] : [autosu error]: SPI for AutoSU: probabilityVector is empty
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : AutoSu doesn't have any prediction yet
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 UserEventAgent[26] : [autosu error]: SPI for AutoSU: probabilityVector is empty
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : AutoSu doesn't have any prediction yet
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : Failed to get device restart forecast
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 com.apple.CDScheduler[26] : Failed to get device restart forecast
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 wirelessproxd[59] : (Error) updateScanner - central is not powered on: 4
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 wirelessproxd[59] : (Error) updateScanner - central is not powered on: 4
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : _UIGraphicsDrawIntoImageContextWithOptions: cannot draw into NULL context
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : _UIGraphicsDrawIntoImageContextWithOptions: cannot draw into NULL context
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : [MPUSystemMediaControls] Updating supported commands for now playing application.
[iOSLog] [IOS_SYSLOG_ROW] Mar 3 16:15:31 iPhone6 SpringBoard[58] : [MPUSystemMediaControls] Updating supported commands for now playing application.

@Lihuazhang 楼主,我之前在真机的时候遇到这个问题,后面重装了些东西,就可以跑了,但不知道是什么引起的
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
WebDriveAgentRunner起来一下之后,就一直提示这个.

直接xcbuild WDA项目能安装上WebDriveAgentRunner
出现下面提示:
t = 0.00s Start Test at 2016-12-20 09:58:02:209
t = 0.01s Set Up

不出现:Listening on USB提示

Server 详细日志:

➜ ~ appium -U xxxxxx --app com. xxxxxx
[Appium] Welcome to Appium v1.6.3 (REV 589a9112bd0516befea756cc8e976fb1c4b031e9)
[Appium] Non-default server args:
[Appium] app: 'com. xxxxxx'
[Appium] udid: 'b0bd8418fd45d05837514c16d576a5c79ebb4c89'
[Appium] Deprecated server args:
[Appium] --app => --default-capabilities '{"app":"com. xxxxxx"}'
[Appium] -U,--udid => --default-capabilities '{"udid":"xxxxxx"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] app: 'com. xxxxxx'
[Appium] udid: 'xxxxxx'
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"requiredCapabilities":{},"desiredCapabilities":{"udid":"xxxxxx","deviceName":"iPhone 6s","app":"com.tzbank.pingAnFF","platformName":"iOS","automationName":"xcuitest"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"udid":"xxxxxx","deviceName":"iPhone 6s","app":"com.xxxxxx","platformName":"iOS","automationName":"xcuitest"},{},null,null,null]
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] udid: 'xxxxxx'
[Appium] deviceName: 'iPhone 6s'
[Appium] app: 'com.xxxxx'
[Appium] platformName: 'iOS'
[Appium] automationName: 'xcuitest'
[debug] [XCUITest] XCUITestDriver version: 2.4.2
[BaseDriver] Session created with session id: b9557498-09ba-4ce9-94b4-6afe4fcf7d71
[debug] [XCUITest] Xcode version set to '8.2.1'
[debug] [XCUITest] iOS SDK Version set to '10.2'
[debug] [XCUITest] Available devices: xxxxxx, xxxxxx
[debug] [XCUITest] Creating iDevice object with udid xxxxxx
[XCUITest] Determining device to run tests on: udid: 'xxxxxx', real device: true
[debug] [XCUITest] App is an iOS bundle, will attempt to run as pre-existing
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[XCUITest] Setting up real device
[XCUITest] Using WDA path: '/Users/dengwenbo/.nvm/versions/node/v6.9.5/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Users/dengwenbo/.nvm/versions/node/v6.9.5/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Using real device logger 'idevicesyslog'
[debug] [XCUITest] Beginning test with command 'xcodebuild build test -project /Users/dengwenbo/.nvm/versions/node/v6.9.5/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=xxxxxx -configuration Debug' in directory '/Users/dengwenbo/.nvm/versions/node/v6.9.5/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/dengwenbo/Library/Developer/Xcode/DerivedData/WebDriverAgent-hbhffnpetojvtsetwfwkjrmkaccw/Logs/Test/61D397D6-83C6-4BD1-ACB6-83E1C74E6D18/Session-WebDriverAgentRunner-2017-03-04_193011-0L2srM.log
[debug] [WebDriverAgent] Device: Mar 4 19:30:21 iStevende-iPhone XCTRunner[21780] <Notice>: Running tests...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [WebDriverAgent] Device: Mar 4 19:30:22 iStevende-iPhone XCTRunner[21780] <Notice>: Continuing to run tests in the background with task ID 1
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...

恒温 #217 · March 04, 2017 作者
center_on 回复

这个不懂

恒温 #218 · March 04, 2017 作者
steven 回复

现在是好的,还是不好的?

恒温 回复

现在是好的,但是今天在另一台电脑装又碰到这个问题,想弄清楚是什么引起的。
社区之前就有人提过
https://testerhome.com/topics/6774

@Lihuazhang 明确的说 我又重装了一下appium1.5,3 XC7.3运行,模拟器运行正常,真机跑就会出错是否也要按照你的方法去修改?现在项目是XC8.0以上 得用1.6.3了 但是学习 编写脚本用例我想从开始dmg学习,所以老师你刚用1.5.3时真机出错是怎么修改的?

恒温 回复

@Lihuazhang instruments -w device 有手机的deviceName
报的也是 A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.
在1.5.3dmg 里报的怎么解决老大

恒温 #222 · March 06, 2017 作者
center_on 回复

老大,看英文:

. Details: The desiredCapabilities object was not valid for the following reason(s): deviceName can't be blank.

恒温 回复

我只能在脚本里设置 deviceName? dmg配置里能UDID没错啊

楼主,

@Lihuazhang @iSteven @visionary

对于xpath的定位web元素我有一个问题:

使用chrome打开web,开发者工具中,右键,可以复制出来xpath,

例如,/html/body/div[7]/div/div[2]/div/ng-transclude/div[2]/div[1]/i;

但是这个路径在Python + ride 编辑使用:xpath=/html/body/div[7]/div/div[2]/div/ng-transclude/div[2]/div[1]/i,运行直接报错。

我的这个路径是一个web向右滑出之后的图片,没有文字,appium inspector无法直接获取xpath;

请问下,该如何改进xpath,可以定位到图片?

lionel-SF 回复

先了解下xpath的语法,看下xpath是否正确了,xpath也可以通过节点的属性去获取

运行自动化提示代理请求失败,怎么解决呢?
[JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/268D2905-9CA3-4903-BB1A-640DA9C42A74/source] with no body
[MJSONWP] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100
at JWProxy.proxy$ (../../../lib/jsonwp-proxy/proxy.js:144:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/.5.8.24@babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as throw

xujuan 回复

这个错误提示好像和你说的那个Force Device没有关系

228Floor has been deleted
229Floor has been deleted

老师您好,我这边用Appium(1.4.8)+macos(10.11)一直都可以进行自动化测试,但是前段时间mac升级了系统10.12.4,然后就不能用了,点击Inspector就提示
而且手机还会弹是否信任的弹窗,log如下:

info: --> GET /wd/hub/sessions {}
info: [debug] Responding to client with success: {"status":0,"value":[]}
info: <-- GET /wd/hub/sessions 200 0.853 ms - 23 {"status":0,"value":[]}
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"10.3","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone 6 Plus"}}
info: Client User-Agent string: Appium (unknown version) CFNetwork/811.4.18 Darwin/16.5.0 (x86_64)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 6f759b3a-bb06-4a65-babe-14d82a26d843
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/pearvideo.livideo.video/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/pearvideo.livideo.video/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/hujunyi/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/hujunyi/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Reusing dynamic bootstrap: /Users/hujunyi/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid 9a5b0963e6bdc020ebcc6775976a18edc45c5df6

info: [debug] App is not installed. Will try to install the app.

info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Installing pearvideo.livideo.video failed

info: [debug] Error: Installing pearvideo.livideo.video failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Socket.<anonymous> (child_process.js:1183:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:485:12)

info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Installing pearvideo.livideo.video failed)","origValue":"Installing pearvideo.livideo.video failed"},"sessionId":null}
info: <-- POST /wd/hub/session 500 1504.148 ms - 204

还有就是我的ANDROID仍然是可以跑的,点击doctor也是全部通过的,deviceconsole也是有的,ideviceinstall也安装,但是有如下提示:

hujunyideMacBook-Pro:~ hujunyi$ brew install ideviceinstaller
Warning: ideviceinstaller-1.1.0_2 already installed
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

Appium的配置如下:

希望能指导一下,万分感谢!

恒温 #231 · April 29, 2017 作者
紫电清风 回复

升级了当然不行了。关注社区呀,这问题都有几百个案例了。uiautomation已经被移除了。

恒温 回复

谢谢老师,我以后会关注社区的

恒温 回复

大神,我分别用npm和dmg文件安装了appium
命令行启动appium服务,执行sample-code-master里面的脚本,能正常启动

打开桌面版appium ,设置如图

运行脚本报错如下:
WebDriverException: Message: Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","sessionId","id","sessionId","id"]} and you sent ["capabilities","desiredCapabilities"]
看信息是参数不对;但命令行的服务是能执行的,请大神释疑

另外,dmg安装的appium(1.5.3);platform version 最高能选9.3;如果设备的是10.3,该怎么办呢?

jy503160 回复

你用的是appium1.5.3,要支持iOS10.x,可以去下载appium desktop,楼主有开帖聊过,可以去看下

steven 回复

你好,谢谢答复
能给个传送门么?我到楼主的主页没找到
谢谢

236Floor has been deleted

ios模拟器运行问题,求解决!求帮助
appium版本:1.4.3
Xcode版本:6.4
mac系统:10.11

log如下:
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.Maps
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.coretelephony
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.TextInput.kbd
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.VoiceOverTouch
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.cmfsyncagent
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.mobilesafari
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.accessibility.heard
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.CoreSuggestions
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.Maps(com.apple.Maps.recents)
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.Maps(com.apple.MapsSupport.history)
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.Maps(com.apple.MapsSupport.bookmarks)
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.cloudrecents.CloudRecentsAgent(com.apple.cloudrecents.phone)
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.mobilesafari(com.apple.Safari.WebFeedSubscriptions)
info: [IOS_SYSLOG_ROW ] May 22 04:04:26 localhost syncdefaultsd[2658]: (Note ) Found new store com.apple.mobilesafari(com.apple.Safari.UserRequests)

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Failed looking up pid of launched process
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #3
info: [debug] Killall iOS Simulator
info: [IOS_SYSLOG_ROW ] May 22 04:04:27 localhost DTMobileIS[2629]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
info: [IOS_SYSLOG_ROW ] May 22 04:04:27 localhost DTMobileIS[2629]: Could not create service named com.apple.instruments.server.services.launchdaemon
info: [IOS_SYSLOG_ROW ] May 22 04:04:27 localhost SpringBoard[2620]: Lost connection to sharingd

info: Launching instruments
info: [debug] Attempting to run app on iPhone 6 (8.4 Simulator)
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w "iPhone 6 (8.4 Simulator)" /Users/zly7032/test/FPDS.app -e UIASCRIPT "/Users/zly7032/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":180000}

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Unable to install app with path: /Users/zly7032/test/FPDS.app: "Invalid device state"

info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Killall iOS Simulator
info: [debug] Cleaning sim data files
info: node-simctl: Executing: xcrun with args: simctl erase 4EC3FA76-6361-4D82-B32A-0D9BF38A1D90 and timeout: 2000

info: node-simctl: Executing: xcrun with args: simctl erase 4EC3FA76-6361-4D82-B32A-0D9BF38A1D90 and timeout: 2000

info: node-simctl: Executing: xcrun with args: simctl erase 4EC3FA76-6361-4D82-B32A-0D9BF38A1D90 and timeout: 2000

info: node-simctl: Executing: xcrun with args: simctl erase 4EC3FA76-6361-4D82-B32A-0D9BF38A1D90 and timeout: 2000

info: <-- POST /wd/hub/session - - ms - -

info: [debug] Cleaning app data files

error: Failed to start an Appium session, err was: Error: Instruments crashed on startup

warn: Applications directory /Users/zly7032/Library/Developer/CoreSimulator/Devices/4EC3FA76-6361-4D82-B32A-0D9BF38A1D90/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
warn: Applications directory /Users/zly7032/Library/Developer/CoreSimulator/Devices/4EC3FA76-6361-4D82-B32A-0D9BF38A1D90/data/Containers/Bundle/Application doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Cleaning up appium session
info: [debug] Error: Instruments crashed on startup
at [object Object].Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:440:31)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:353:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}

undefined


一直都是报这个错,试了很多方法也没解决好,求大神帮看看

日志信息
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' appium/build/lib/main.js --address "127.0.0.1" --pre-launch --debug-log-spacing --platform-version "9.3" --platform-name "iOS" --app "com.joan.wrz" --udid "daddfba84c5cfce3d48d3c67b7324e4688997733" --no-reset --show-ios-log --device-name "iPhone 5s" --native-instruments-lib

[Appium] Welcome to Appium v1.5.3

[Appium] Non-default server args:

[Appium] address: '127.0.0.1'
[Appium] launch: true
[Appium] debugLogSpacing: true
[Appium] platformName: 'iOS'
[Appium] platformVersion: '9.3'
[Appium] deviceName: 'iPhone 5s'

[Appium] app: 'com.joan.wrz'
[Appium] udid: 'daddfba84c5cfce3d48d3c67b7324e4688997733'
[Appium] noReset: true
[Appium] nativeInstrumentsLib: true

[Appium] showIOSLog: true
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities '{"platformName":"iOS"}'
[Appium] --platform-version => --default-capabilities '{"platformVersion":"9.3"}'
[Appium] --device-name => --default-capabilities '{"deviceName":"iPhone 5s"}'
[Appium] --app => --default-capabilities '{"app":"com.joan.wrz"}'
[Appium] -U,--udid => --default-capabilities '{"udid":"daddfba84c5cfce3d48d3c67b7324e4688997733"}'
[Appium] --no-reset => --default-capabilities '{"noReset":true}'
[Appium] --native-instruments-lib => --default-capabilities '{"nativeInstrumentsLib":true}'
[Appium] --show-ios-log => --default-capabilities '{"showIOSLog":true}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:

[Appium] platformName: 'iOS'

[Appium] platformVersion: '9.3'
[Appium] deviceName: 'iPhone 5s'
[Appium] app: 'com.joan.wrz'
[Appium] udid: 'daddfba84c5cfce3d48d3c67b7324e4688997733'
[Appium] noReset: true
[Appium] nativeInstrumentsLib: true
[Appium] showIOSLog: true

[Appium] Appium REST http interface listener started on 127.0.0.1:4723

[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...

[HTTP] <-- GET /wd/hub/status 200 31 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 15 ms - 83

[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []

[MJSONWP] Responding to client with driver.getSessions() result: []

[HTTP] <-- GET /wd/hub/sessions 200 4 ms - 40

[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","newCommandTimeout":"7200","app":"/Users/wyb/Library/Developer/Xcode/DerivedData/wrz-henmzyssrrpjrtanpnymyqmvlopz/Build/Products/Debug-iphoneos/微融资.app","platformVersion":"9.3","deviceName":"iPhone 5s","bundleId":"com.joan.wrz","automationName":"Appium","udid":"daddfba84c5cfce3d48d3c67b7324e4688997733"}}

[MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformName":"iOS","new...

[Appium] Creating new IosDriver session

[Appium] Capabilities:

[Appium] platformName: 'iOS'

[Appium] newCommandTimeout: '7200'
[Appium] app: '/Users/wyb/Library/Developer/Xcode/DerivedData/wrz-henmzyssrrpjrtanpnymyqmvlopz/Build/Products/Debug-iphoneos/微融资.app'
[Appium] platformVersion: '9.3'
[Appium] deviceName: 'iPhone 5s'
[Appium] bundleId: 'com.joan.wrz'

[Appium] automationName: 'Appium'
[Appium] udid: 'daddfba84c5cfce3d48d3c67b7324e4688997733'
[Appium] noReset: true
[Appium] nativeInstrumentsLib: true
[Appium] showIOSLog: true
[BaseDriver] Capability 'newCommandTimeout' changed from string ('7200') to integer (7200). This may cause unexpected behavior

[BaseDriver] Session created with session id: 575f900e-a6ab-4778-96b4-c7e9fb4286f9

[debug] [iOS] Not auto-detecting udid.

[BaseDriver] Using local app '/Users/wyb/Library/Developer/Xcode/DerivedData/wrz-henmzyssrrpjrtanpnymyqmvlopz/Build/Products/Debug-iphoneos/微融资.app'

[debug] [iOS] Removing any remaining instruments sockets

[debug] [iOS] Cleaned up instruments socket /var/folders/06/69krqdpj2p1gnyx5w100nsq00000gn/T/instruments_sock

[debug] [iOS] No language specified. Using default strings

[debug] [iOS] Strings file not found. Looking in 'en.lproj' directory
[iOS] Could not file localizable strings file 'Localizable.strings'!

[debug] [iOS] Creating instruments
[debug] [UIAuto] Preparing bootstrap code

[debug] [UIAuto] Dynamic bootstrap dir: /Users/wyb/Library/Application Support/appium/bootstrap
[debug] [UIAuto] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js","instrumentsSock":"/var/folders/06/69krqdpj2p1gnyx5w100nsq00000gn/T/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}

[debug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...

[debug] [UIAuto] Dynamic bootstrap path: /Users/wyb/Library/Application Support/appium/bootstrap/bootstrap-6958804ed19bc6a4.js

[debug] [UIAuto] Reusing dynamic bootstrap: /Users/wyb/Library/Application Support/appium/bootstrap/bootstrap-6958804ed19bc6a4.js
[debug] [iOS] Reset not set, continuing
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'

[debug] [iOS] Creating iDevice object with udid daddfba84c5cfce3d48d3c67b7324e4688997733

[debug] [iOS] App is not installed. Will try to install.

[MJSONWP] Encountered internal error running command: Error: Installing /Users/wyb/Library/Developer/Xcode/DerivedData/wrz-henmzyssrrpjrtanpnymyqmvlopz/Build/Products/Debug-iphoneos/微融资.app failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js💯13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

[HTTP] <-- POST /wd/hub/session 500 1182 ms - 278

有人遇到过这种情况吗?在手机上安装好WebDriverAgentRunner app后,运行就闪退,报错的日志如下图:(xcode8.1,ios10.0,appium1.6.3)

@Lihuazhang appium 运行脚本报错。真机运行报错 error: Sdk '10.3.2' was not in list of simctl sdks。请指点,

恒温 #241 · July 21, 2017 作者

此文信息已经过于陈旧,先关闭了。

恒温 关闭了讨论 21 Jul 11:29
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up