How to run a real app(it's a .ipa file which is not developed by myself) in a iphone simulator?
See original GitHub issueI have test the python code by using the ios_simple.py and test.app What if i want to test some real app that I have download from the Internet. I just replace the app file path to a .ipa file path.It can’t work.
The log info
info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformVersion”:“8.1”,“deviceName”:“iPhone 6”,“app”:“/Users/mactest/Downloads/ipa/1010.ipa”,“platformName”:“iOS”}}
info: Client User-Agent string: Python-urllib/2.7
info: [debug] Using local .ipa from desired caps: /Users/mactest/Downloads/ipa/1010.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/mactest/Downloads/ipa/1010.ipa copied to /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/appium-app.zip
info: [debug] Unzipping /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/appium-app.zip
info: [debug] Testing zip archive: /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/Payload/1010.app
info: [debug] Creating new appium session 86b8fff2-1cba-49e0-ab5c-61a02cf8169b
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.1
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iPhone 6”,“platformVersion”:“8.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 6 (8.1 Simulator)’
info: [debug] iOS sim UDID is BE8F8E67-A042-4ED2-8E89-F769E0B4C723
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/Payload/1010.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
parseFileSync()
is deprecated. Use parseStringSync()
instead.
info: [debug] Could not parse plist file (as XML) at /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/Payload/1010.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: 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/mactest/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:“/usr/local/Cellar/node/0.12.0/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,“sendKeyStrategy”:“oneByOne”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D…ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/mactest/Library/Application Support/appium/bootstrap/bootstrap-d0a2eebf2b131c37.js
info: [debug] Reusing dynamic bootstrap: /Users/mactest/Library/Application Support/appium/bootstrap/bootstrap-d0a2eebf2b131c37.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iPhone 6”,“platformVersion”:“8.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 6 (8.1 Simulator)’
info: [debug] We’re on iOS7.1+ so forcing defaultDevice on
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iPhone 6”,“platformVersion”:“8.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 6 (8.1 Simulator)’
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Wrote new app Info.plist with device type
info: [debug] Checking whether we need to set app preferences
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] Cleaning sim data files
info: [debug] Executing: xcrun simctl erase BE8F8E67-A042-4ED2-8E89-F769E0B4C723
info: [debug] Cleaning app data files
warn: Applications directory /Users/mactest/Library/Developer/CoreSimulator/Devices/BE8F8E67-A042-4ED2-8E89-F769E0B4C723/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
warn: Applications directory /Users/mactest/Library/Developer/CoreSimulator/Devices/BE8F8E67-A042-4ED2-8E89-F769E0B4C723/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] Not setting locale
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS 8.* simulator log capture
info: [debug] Not pre-launching simulator
info: [debug] No device id or app, not installing to real device.
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.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on iPhone 6 (8.1 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.1 Simulator)” /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/Payload/1010.app -e UIASCRIPT “/Users/mactest/Library/Application Support/appium/bootstrap/bootstrap-d0a2eebf2b131c37.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib”,“LIB_PATH”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6”}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST] Waiting for device to boot…
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 #1
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on iPhone 6 (8.1 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.1 Simulator)” /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/Payload/1010.app -e UIASCRIPT “/Users/mactest/Library/Application Support/appium/bootstrap/bootstrap-d0a2eebf2b131c37.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib”,“LIB_PATH”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6”}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST] Waiting for device to boot…
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 #2
info: [debug] Killall iOS Simulator
info: Launching instruments
info: [debug] Attempting to run app on iPhone 6 (8.1 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.1 Simulator)” /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/Payload/1010.app -e UIASCRIPT “/Users/mactest/Library/Application Support/appium/bootstrap/bootstrap-d0a2eebf2b131c37.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib”,“LIB_PATH”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6”}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST] Waiting for device to boot…
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: Launching instruments
info: [debug] Attempting to run app on iPhone 6 (8.1 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.1 Simulator)” /var/folders/rd/wp2l5wlx0l39w_yr27fjvh2h0000gn/T/115213-372-8ys4cw/Payload/1010.app -e UIASCRIPT “/Users/mactest/Library/Application Support/appium/bootstrap/bootstrap-d0a2eebf2b131c37.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib”,“LIB_PATH”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6”}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST] Waiting for device to boot…
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 8.) : Failed to launch process with bundle identifier ‘com.gramgames.1010’
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] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] Cleaning sim data files
info: [debug] Executing: xcrun simctl erase BE8F8E67-A042-4ED2-8E89-F769E0B4C723
info: [debug] Cleaning app data files
warn: Applications directory /Users/mactest/Library/Developer/CoreSimulator/Devices/BE8F8E67-A042-4ED2-8E89-F769E0B4C723/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
warn: Applications directory /Users/mactest/Library/Developer/CoreSimulator/Devices/BE8F8E67-A042-4ED2-8E89-F769E0B4C723/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
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
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:387:31)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1067: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 131559.734 ms - 182
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
@Pushpank If you are in Xcode, you can click on the “target” from the file organizer. In the “properties” pane it will give a path to the compiled .app file.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.