基础环境

参数配置

错误日志

info: Launching instruments

info: [debug] Attempting to run app on iPhone 6 (9.3)

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 (9.3)" io.appium.TestApp -e UIASCRIPT "/Users/ufenqi/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":90000}

info: [IOS_SYSLOG_ROW ] Apr 15 15:12:20 --- last message repeated 3 times ---

info: [IOS_SYSLOG_ROW ] Apr 15 15:12:20 localhost SpringBoard[9946]: [FBSystemService] Error launching io.appium.TestApp: NotFound (4)

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 4.) : Failed to launch process with bundle identifier 'io.appium.TestApp'

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 #2
info: [debug] Killall iOS Simulator
info: [IOS_SYSLOG_ROW ] Apr 15 15:12:24 --- last message repeated 15 times ---
info: [IOS_SYSLOG_ROW ] Apr 15 15:12:24 localhost DTServiceHub[9955]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn

info: Launching instruments

info: [debug] Attempting to run app on iPhone 6 (9.3)
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 (9.3)" io.appium.TestApp -e UIASCRIPT "/Users/ufenqi/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":90000}

info: [IOS_SYSLOG_ROW ] Apr 15 15:12:31 localhost SpringBoard[9946]: [FBSystemService] Error launching io.appium.TestApp: NotFound (4)

info: [IOS_SYSLOG_ROW ] Apr 15 15:12:33 --- last message repeated 11 times ---
info: [IOS_SYSLOG_ROW ] Apr 15 15:12:33 localhost mstreamd[9936]: (Note ) PS: Media stream daemon stopping.

info: [IOS_SYSLOG_ROW ] Apr 15 15:12:33 localhost mstreamd[9936]: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x7f8372506020>: Shared Streams daemon has shut down.
info: [IOS_SYSLOG_ROW ] Apr 15 15:12:33 localhost mstreamd[9936]: (Warn ) mstreamd: mstreamd shutting down.

info: [IOS_SYSLOG_ROW ] Apr 15 15:12:34 localhost SpringBoard[9946]: [FBSystemService] Error launching io.appium.TestApp: NotFound (4)

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 4.) : Failed to launch process with bundle identifier 'io.appium.TestApp'

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 ] Apr 15 15:12:35 --- last message repeated 3 times ---
info: [IOS_SYSLOG_ROW ] Apr 15 15:12:35 localhost DTServiceHub[9955]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn

info: Launching instruments

info: [debug] Attempting to run app on iPhone 6 (9.3)
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 (9.3)" io.appium.TestApp -e UIASCRIPT "/Users/ufenqi/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":90000}

info: [IOS_SYSLOG_ROW ] Apr 15 15:12:41 localhost SpringBoard[9946]: [FBSystemService] Error launching io.appium.TestApp: NotFound (4)

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 4.) : Failed to launch process with bundle identifier 'io.appium.TestApp'

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

error: Could not pre-launch appium: Error: Instruments crashed on startup

日志中提示找不到 io.appium.TestApp,感觉是安装的过程出问题了,直接将 app 文件拖到模拟器上面可以正常进行下一步操作。请大家帮忙看看是什么问题导致的~~


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