appium1.5.3, xcode7.3.1,mac os 10.12,使用模拟器测试一切正常,但是有些场景需要在真机上面测试,设置好 BundleID 和 UDID,Force Device、Version 后,启动 Inspector 报错。报错信息如下:

[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/13/qgt5vn416pj4y6gwc5n07fqh0000gn/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/hardyHardy/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/13/qgt5vn416pj4y6gwc5n07fqh0000gn/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/hardyHardy/Library/Application Support/appium/bootstrap/bootstrap-5a9cd5eae68395c8.js

[debug] [UIAuto] Reusing dynamic bootstrap: /Users/hardyHardy/Library/Application Support/appium/bootstrap/bootstrap-5a9cd5eae68395c8.js

[debug] [iOS] Reset not set, continuing

[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog

[iOSLog] Could not capture device log using libimobiledevice idevicesyslog. Libimobiledevice is probably not installed

[debug] [iOSLog] Attempting iOS device log capture via deviceconsole

[iOS] Could not initialize ideviceinstaller; make sure it is installed and works on your system

[iOS] Could not capture logs from device. Continuing without capturing logs.
[debug] [iOS] Creating iDevice object with udid 4536b26e21514bce00560c2f496580624edfb0a2
[debug] [iOS] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/build/libimobiledevice-macosx/ideviceinstaller

[MJSONWP] Encountered internal error running command: Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
at IosDriver.getIDeviceObj (lib/driver.js:380:15)
at IosDriver.get (lib/driver.js:950:49)
at IosDriver.installToRealDevice$ (lib/driver.js:335:21)
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.installToRealDevice (lib/driver.js:351:16)
at IosDriver.startRealDevice$ (lib/driver.js:309: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 GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

[HTTP] <-- POST /wd/hub/session 500 132 ms - 226


↙↙↙阅读原文可查看相关链接,并与作者交流