when I try to run my script i am getting below error message, can any one help on this plz!!
mac version: MacBook Pro, 10.10.5
device: Ios Simulator(Iphone 6 and version 8.4
I used below code:
import java.io.File;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.MobileCapabilityType;
public class script1 {
IOSDriver driver;
@Test
public void test() throws Exception {
DesiredCapabilities capability = new DesiredCapabilities();
//File f1=new File("/Users/appuser/Desktop/Appium/MingleApp/Mingle_12_0_0_39.ipa");
File f=new File("/Users/appuser/Desktop/scripts_eclipse_path/Appium1/src/");
File f1=new File(f,“Mingle_12_0_0_39.ipa”);
capability.setCapability(MobileCapabilityType.PLATFORM_VERSION, “8.4”);
capability.setCapability(MobileCapabilityType.DEVICE_NAME, “iPhone 6”);
//capability.setCapability(MobileCapabilityType.BROWSER_NAME, “”);
capability.setCapability(MobileCapabilityType.APP, f1.getAbsolutePath());
driver= new IOSDriver(new URL(“http://127.0.0.1:4723/wd/hub”),capability);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
}
}
Appium Console
info: --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/appuser/Desktop/scripts_eclipse_path/Appium1/src/Mingle_12_0_0_39.ipa",“platformName”:“iOS”,“deviceName”:“iPhone 6”,“platformVersion”:“8.4”}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_73)
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] Using local .ipa from desired caps: /Users/appuser/Desktop/scripts_eclipse_path/Appium1/src/Mingle_12_0_0_39.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/appuser/Desktop/scripts_eclipse_path/Appium1/src/Mingle_12_0_0_39.ipa copied to /var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/appium-app.zip
info: [debug] Unzipping /var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/appium-app.zip
info: [debug] Testing zip archive: /var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/Payload/Infor Ming.le.app
info: [debug] Creating new appium session 6495c04b-a05d-4aa4-aa0a-475b51c788b0
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode version
info: [debug] Xcode version set to 7.2
info: [debug] Setting iOS SDK Version
info: [debug] iOS SDK Version set to 9.2
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”:“7.2”,“iOSSDKVersion”:“9.2”,“deviceName”:“iPhone 6”,“platformVersion”:“8.4”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 6 (8.4)’
info: [debug] iOS sim UDID is C7837064-03A2-494D-B2BF-8DF3E62F0A05
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/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/Payload/Infor Ming.le.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/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/Payload/Infor Ming.le.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/appuser/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”:“oneByOne”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
…
info: [debug] Dynamic bootstrap path: /Users/appuser/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js
info: [debug] Reusing dynamic bootstrap: /Users/appuser/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“7.2”,“iOSSDKVersion”:“9.2”,“deviceName”:“iPhone 6”,“platformVersion”:“8.4”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 6 (8.4)’
info: [debug] We’re on iOS7.1+ so forcing defaultDevice on
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“7.2”,“iOSSDKVersion”:“9.2”,“deviceName”:“iPhone 6”,“platformVersion”:“8.4”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 6 (8.4)’
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] 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] 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 C7837064-03A2-494D-B2BF-8DF3E62F0A05 and timeout: 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/appuser/Library/Developer/CoreSimulator/Devices/C7837064-03A2-494D-B2BF-8DF3E62F0A05/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
warn: Applications directory /Users/appuser/Library/Developer/CoreSimulator/Devices/C7837064-03A2-494D-B2BF-8DF3E62F0A05/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] Isolating the requested simulator by deleting all others
info: node-simctl: Executing: xcrun with args: simctl list devices and timeout: 0
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] 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.4)
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)” “/var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/Payload/Infor Ming.le.app” -e UIASCRIPT “/Users/appuser/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib",“LIB_PATH”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7"}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST STDERR] dyld: could not load inserted library ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib’ because no suitable image found. Did find:
/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib: mmap() error 1 at address=0x10C00B000, size=0x00001000 segment=__TEXT in Segment::map() mapping /Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib
info: [debug] [INSTSERVER] Instruments exited with code null
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.4)
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)” “/var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/Payload/Infor Ming.le.app” -e UIASCRIPT “/Users/appuser/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib",“LIB_PATH”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7"}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST STDERR] dyld: could not load inserted library ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib’ because no suitable image found. Did find:
/Applications/Appium.app/Contents/Resources/node_modules/appium/submodu
info: [debug] [INST STDERR] les/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib: mmap() error 1 at address=0x10C2DC000, size=0x00001000 segment=__TEXT in Segment::map() mapping /Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib
info: [debug] [INSTSERVER] Instruments exited with code null
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.4)
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)” “/var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/Payload/Infor Ming.le.app” -e UIASCRIPT “/Users/appuser/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib",“LIB_PATH”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7"}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST STDERR] dyld: could not load inserted library ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib’ because no suitable image found. Did find:
/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib: mmap() error 1 at address=0x10E0D0000, size=0x00001000 segment=__TEXT in Segment::map() mapping /Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib
info: [debug] [INSTSERVER] Instruments exited with code null
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.4)
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)” “/var/folders/6t/c1dv8xp960df0004xrn5nph00000gp/T/116218-3912-1co496e/Payload/Infor Ming.le.app” -e UIASCRIPT “/Users/appuser/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib",“LIB_PATH”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7"}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST STDERR] dyld: could not load inserted library ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib’ because no suitable image found. Did find:
/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib: mm
info: [debug] [INST STDERR] ap() error 1 at address=0x10F235000, size=0x00001000 segment=__TEXT in Segment::map() mapping /Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/thirdparty/iwd7/InstrumentsShim.dylib
info: [debug] [INSTSERVER] Instruments exited with code null
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 C7837064-03A2-494D-B2BF-8DF3E62F0A05 and timeout: 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/appuser/Library/Developer/CoreSimulator/Devices/C7837064-03A2-494D-B2BF-8DF3E62F0A05/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
warn: Applications directory /Users/appuser/Library/Developer/CoreSimulator/Devices/C7837064-03A2-494D-B2BF-8DF3E62F0A05/data/Containers/Bundle/Application doesn’t exist. Have you run this simulator before?
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
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}
info: <-- POST /wd/hub/session 500 22913.038 ms - 182
Note: unable to run the scripts over mobile devices, even after set the mobile details in desired capabailities, still it is taking ios simulator only
Can anybody ASAP, bit urgenet. thanks!!