Appium Error: Instruments crashed on startup

储晓风 · 2014年05月11日 · 最后由 bingle 回复于 2015年01月05日 · 1680 次阅读

系统:mac os x 10.9.2
xcode: Version 5.1.1
本机安装了 npm,appium,python2.7.5
自己的 app 放在/Users/xx/Documents 下,xxx-Debug.ipa,权限:-rwxrwxrwx

启动 appium:appium --platform-name ios &
启动信息:
192:usr xx$ info: Welcome to Appium v1.0.0 (REV f0a00fab2335fa88cb355ab4dc43a9cd3f3236c0)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: socket.io started
info: Non-default server args: {"platformName":"ios"}

运行测试脚本 test.py
nosetests test.py,错误如下:求解救。

192:usr xx$ info: Welcome to Appium v1.0.0 (REV f0a00fab2335fa88cb355ab4dc43a9cd3f3236c0)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: socket.io started
info: Non-default server args: {"platformName":"ios"}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"platform":"Mac","browserName":"iOS","version":"7.1","app":"/Users/xx/Documents/xxx-Debug.ipa","deviceName":"iPad"}}
info: Using local .ipa from desired caps: /Users/xx/Documents/xxx-Debug.ipa
info: Copying local zip to tmp dir
info: /Users/xx/Documents/xxx-Debug.ipa copied to /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/appium-app.zip
info: Unzipping /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/appium-app.zip
info: Testing zip archive: /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/appium-app.zip
info: Zip archive tested clean
info: Unzip successful
info: Using locally extracted app: /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app
info: Creating new appium session 82aabb1f-7100-47fe-b215-5576ce30db50
info: Removing any remaining instruments sockets
info: Cleaned up instruments socket /tmp/instruments_sock
info: Cleaning up any tracedirs
info: No tracedirs to clean up
info: Setting Xcode folder
info: Setting Xcode version
info: Setting iOS SDK Version
info: iOS SDK Version set to 7.1
info: Detecting automation tracetemplate
info: Not auto-detecting udid, running on sim
warn: Could not parse plist file at /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app/en.lproj/Localizable.strings
info: Not setting locale
debug: Creating instruments
info: No iOS / app preferences to set
info: Starting iOS 7.* simulator log capture
info: Killing the simulator process
info: Killing any other simulator daemons
debug: Checking whether instruments supports our device string
info: Getting list of devices instruments supports
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Cleaning app state.
info: No folders found to remove
debug: No device id or app, not installing to real device.
debug: Starting instruments
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #1
info: Killall iPhoneSimulator
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #2
info: Killall iPhoneSimulator
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #3
info: Killall iPhoneSimulator
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-1cbxpcz/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
error: Instruments crashed on startup
info: Stopping iOS log capture
info: Killing the simulator process
info: Killing any other simulator daemons
info: Cleaning app state.
info: No folders found to remove
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:398:31)
at null. (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:328:12)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:807:12)
info: 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}
POST /wd/hub/session 500 22992ms - 210b
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"platform":"Mac","browserName":"iOS","version":"7.1","app":"/Users/xx/Documents/xxx-Debug.ipa","deviceName":"iPad"}}
info: Using local .ipa from desired caps: /Users/xx/Documents/xxx-Debug.ipa
info: Copying local zip to tmp dir
info: /Users/xx/Documents/xxx-Debug.ipa copied to /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/appium-app.zip
info: Unzipping /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/appium-app.zip
info: Testing zip archive: /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/appium-app.zip
info: Zip archive tested clean
info: Unzip successful
info: Using locally extracted app: /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app
info: Creating new appium session c37d2ef6-c9fb-4661-bbc3-cd5279d9b24c
info: Removing any remaining instruments sockets
info: Cleaned up instruments socket /tmp/instruments_sock
info: Cleaning up any tracedirs
info: No tracedirs to clean up
info: Setting Xcode folder
info: Setting Xcode version
info: Setting iOS SDK Version
info: iOS SDK Version set to 7.1
info: Detecting automation tracetemplate
info: Not auto-detecting udid, running on sim
warn: Could not parse plist file at /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app/en.lproj/Localizable.strings
info: Not setting locale
debug: Creating instruments
info: No iOS / app preferences to set
info: Starting iOS 7.* simulator log capture
info: Killing the simulator process
info: Killing any other simulator daemons
debug: Checking whether instruments supports our device string
info: Getting list of devices instruments supports
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Cleaning app state.
info: No folders found to remove
debug: No device id or app, not installing to real device.
debug: Starting instruments
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #1
info: Killall iPhoneSimulator
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #2
info: Killall iPhoneSimulator
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
info: Attempting to retry launching instruments, this is retry #3
info: Killall iPhoneSimulator
info: Instruments device was changed from:" iPad - Simulator - iOS 7.1 " to:" iPad Retina (64-bit) - Simulator - iOS 7.1"
info: Attempting to run app on iPad Retina (64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPad Retina (64-bit) - Simulator - iOS 7.1 /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /var/folders/5g/83rjbmts255169z9q2nbz82w0000gn/T/114411-1962-255gy9/Payload/xxx.app/xxx).

info: [INST STDERR] Instruments Trace Error : Error Starting Recording

info: [INSTSERVER] Instruments exited with code 253
info: Killall instruments
error: Instruments crashed on startup
info: Stopping iOS log capture
info: Killing the simulator process
info: Killing any other simulator daemons
info: Cleaning app state.
info: No folders found to remove
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:398:31)
at null. (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:328:12)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:807:12)
info: 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}
POST /wd/hub/session 500 23000ms - 210b

共收到 6 条回复 时间 点赞

我也遇到相同的问题现在还在纠结,不知道你解决了吗?

[INST STDERR] posix spawn failure; aborting launch (binary == /Users/liuhaijun/Documents/iosAutoTesting/app/AMapiPhone.app/AMapiPhone).

我也遇到这个问题了 不知道 app 里应该怎么设置

同求解

有人解决了吗?

同求解决办法

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