Unable to open the application on IOS Simulator with Appium 1.6.3

  1. Ran the Appium
  2. Webdriver opened successfully on simulator
  3. Application just opened and closed immediately
  4. Please find the crash log below

Crash Log:

Last login: Mon Feb 13 11:04:46 on ttys000
cibers-mbp:~ Hilton-UAT$ appium
[Appium] Welcome to Appium v1.6.3
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“automationName”:“XCUITest”,“platform”:“iOS”,“app”:"/Users/ciber/Desktop/Abinai-Hilton/app/HHonors.app",“platformName”:“iOS”,“deviceName”:“iPhone 7”,“version”:“10.1”}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“automationName”:“XCUITest”,“platform”:“iOS”,“app”:"/Users/ciber/Desktop/Abinai-Hilton/app/HHonors.app",“platformName”:“iOS”,“deviceName”:“iPhone 7”,“version”:“10.1”},null,null,null,null]
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] automationName: ‘XCUITest’
[Appium] platform: ‘iOS’
[Appium] app: ‘/Users/ciber/Desktop/Abinai-Hilton/app/HHonors.app’
[Appium] platformName: ‘iOS’
[Appium] deviceName: ‘iPhone 7’
[Appium] version: ‘10.1’
[debug] [XCUITest] XCUITestDriver version: 2.4.2
[BaseDriver] The following capabilities were provided, but are not recognized by appium: platform, version.
[BaseDriver] Session created with session id: d8e98b70-1e8b-409e-a425-8b95eaf4cf12
[debug] [XCUITest] Xcode version set to ‘8.2.1’
[debug] [XCUITest] iOS SDK Version set to ‘10.2’
[XCUITest] Simluator udid not provided, using desired caps to create a new simulator
[XCUITest] No platformVersion specified. Using latest version Xcode supports: ‘10.2’ This may cause problems if a simulator does not exist for this platform version.
[iOSSim] Constructing iOS simulator for Xcode version 8.2.1 with udid ‘AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5’
[XCUITest] Created simulator with udid ‘AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5’.
[XCUITest] Determining device to run tests on: udid: ‘AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5’, real device: false
[BaseDriver] Using local app ‘/Users/ciber/Desktop/Abinai-Hilton/app/HHonors.app’
[debug] [XCUITest] Checking whether app ‘/Users/ciber/Desktop/Abinai-Hilton/app/HHonors.app’ is actually present
[debug] [XCUITest] App is present
[debug] [ios-app-utils] Getting bundle ID from app ‘/Users/ciber/Desktop/Abinai-Hilton/app/HHonors.app’: ‘com.hilton.hhonors’
[debug] [iOSLog] Starting iOS 10.2 simulator log capture
[debug] [iOSLog] System log path: /Users/ciber/Library/Logs/CoreSimulator/AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5/system.log
[XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[XCUITest] Simulator with udid ‘AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5’ not booted. Booting up now
[debug] [iOSSim] Killing all iOS Simulators
[iOSSim] Starting simulator with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5
[iOSSim] Simulator log at ‘/Users/ciber/Library/Logs/CoreSimulator/AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5/system.log’
[iOSSim] Tailing simulator logs until we encounter the string “com.apple.springboard”
[iOSSim] We will time out after 60000ms
[debug] [iOSSim] Waiting an extra 10000ms for the simulator to really finish booting
[debug] [iOSSim] Done waiting extra time for simulator
[iOSSim] Simulator booted in 11565ms
[debug] [XCUITest] Installing app ‘/Users/ciber/Desktop/Abinai-Hilton/app/HHonors.app’ on device
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5 -configuration Debug’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/35014057-3C92-44FA-87B3-62E42CAEFC4F/Session-WebDriverAgentRunner-2017-02-15_115435-OXZLQX.log
[debug] [WebDriverAgent] Sim: Feb 15 11:54:35 cibers-mbp CoreSimulatorBridge[84455]: Requesting installation of file:///Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app/ with options: {
[debug] [WebDriverAgent] Sim: CFBundleIdentifier = “com.apple.test.WebDriverAgentRunner-Runner”;
[debug] [WebDriverAgent] Sim: PackageType = Developer;
[debug] [WebDriverAgent] Sim: SimulatorRootPath = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk”;
[debug] [WebDriverAgent] Sim: SimulatorUserPath = “/Users/ciber/Library/Developer/CoreSimulator/Devices/AAB1B70E-AF2B-416E-9F18-E5A2455F3EF5/data”;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Feb 15 11:54:35 cibers-mbp CoreSimulatorBridge[84455]: Getting container class internal daemon!
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp CoreSimulatorBridge[84455]: Requesting launch of com.apple.test.WebDriverAgentRunner-Runner with options: {
[debug] [WebDriverAgent] Sim: arguments = (
[debug] [WebDriverAgent] Sim: “-NSTreatUnknownArgumentsAsOpen”,
[debug] [WebDriverAgent] Sim: NO,
[debug] [WebDriverAgent] Sim: “-ApplePersistenceIgnoreState”,
[debug] [WebDriverAgent] Sim: YES
[debug] [WebDriverAgent] Sim: );
[debug] [WebDriverAgent] Sim: environment = {
[debug] [WebDriverAgent] Sim: “DTX_CONNECTION_SERVICES_PATH” = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/PrivateFrameworks/DTXConnectionServices.framework”;
[debug] [WebDriverAgent] Sim: “DYLD_FRAMEWORK_PATH” = “/Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: “DYLD_LIBRARY_PATH” = “/Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: NSUnbufferedIO = YES;
[debug] [WebDriverAgent] Sim: “OS_ACTIVITY_DT_MODE” = YES;
[debug] [WebDriverAgent] Sim: “XCODE_DBG_XPC_EXCLUSIONS” = “com.apple.dt.xctestSymbolicator”;
[debug] [WebDriverAgent] Sim: XCTestConfigurationFilePath = “/var/folders/mc/crnr0sb91knds863cq27svhh0000gn/T/com.apple.dt.XCTest/CD14F4E7-EC62-4692-A2B5-8D288CDAFCE5/remote-container/tmp/WebDriverAgentRunner-CD14F4E7-EC62-4692-A2B5-8D288CDAFCE5.xctestconfiguration”;
[debug] [WebDriverAgent] Sim: “__XCODE_BUILT_PRODUCTS_DIR_PATHS” = “/Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_FRAMEWORK_PATH” = “/Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_LIBRARY_PATH” = “/Users/ciber/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: };
[debug] [WebDriverAgent] Sim: stderr = “/dev/ttys001”;
[debug] [WebDriverAgent] Sim: stdout = “/dev/ttys001”;
[debug] [WebDriverAgent] Sim: “wait_for_debugger” = 0;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp CoreSimulatorBridge[84455]: Beginning launch sequence for bundle ‘com.apple.test.WebDriverAgentRunner-Runner’
[debug] [WebDriverAgent] Sim: retryTimeout: 300.000000 (default write com.apple.CoreSimulatorBridge LaunchRetryTimeout )
[debug] [WebDriverAgent] Sim: bootTimeout: 300.000000 (default write com.apple.CoreSimulatorBridge BootRetryTimeout )
[debug] [WebDriverAgent] Sim: bootLeeway: 120.000000 (default write com.apple.CoreSimulatorBridge BootLeeway )
[debug] [WebDriverAgent] Sim: Note: Use 'xcrun simctl spawn booted defaults write ’ to modify defaults in the booted Simulator device.
[debug] [WebDriverAgent] Sim: Simulator booted at: 2017-02-15 06:24:16 +0000
[debug] [WebDriverAgent] Sim: Current time: 2017-02-15 06:24:40 +0000
[debug] [WebDriverAgent] Sim: Within boot leeway: YES
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp CoreSimulatorBridge[84455]: Launch attempt #0 for bundle ‘com.apple.test.WebDriverAgentRunner-Runner’, have been trying to launch for 0 seconds. Modern launch services = YES
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp CoreSimulatorBridge[84455]: Got LSBundleProxy for ‘com.apple.test.WebDriverAgentRunner-Runner’, sequenceNumber 510, cacheGUID 5BA62074-0EE1-4241-8EB1-0381479173DB
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp CoreSimulatorBridge[84455]: [Common] [FBSSystemService][0x90fe] Sending request to open “com.apple.test.WebDriverAgentRunner-Runner”
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp CoreSimulatorBridge[84455]: [Common] [FBSSystemService][0x90fe] Request successful: <FBSProcessHandle: 0x7fcbc540a240; XCTRunner:84585; valid: YES>
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp CoreSimulatorBridge[84455]: Launch successful for ‘com.apple.test.WebDriverAgentRunner-Runner’
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp XCTRunner[84585]: assertion failed: 16A323 14C89: libxpc.dylib + 62677 [0339A402-6531-30E9-8BC2-589C463CD6D6]: 0x7d
[debug] [WebDriverAgent] Sim: Feb 15 11:54:40 cibers-mbp XCTRunner[84585]: Running tests…
[debug] [WebDriverAgent] Sim: Feb 15 11:54:46 cibers-mbp XCTRunner[84585]: Continuing to run tests in the background with task ID 1
[debug] [WebDriverAgent] Sim: Feb 15 11:54:46 cibers-mbp XCTRunner[84585]: Built at Jan 23 2017 22:31:23
[XCUITest] Detected that WebDriverAgent is running at url ‘http://192.168.84.47:8100
[debug] [WebDriverAgent] Sim: Feb 15 11:54:46 cibers-mbp XCTRunner[84585]: ServerURLHere->http://192.168.84.47:8100<-ServerURLHere
[XCUITest] WebDriverAgent started at url ‘http://192.168.84.47:8100
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.hilton.hhonors”,“arguments”:[],“environment”:{},“shouldWaitForQuiescence”:true}}

Please help me Guys.

you might give sever port 127.0.0.1:4723 in your source code but while u started appium server by default port took 0.0.0.0:4723

when u starting appium server change to 127.0.0.1:4723 and and try it will work.

#er.pradeep4

Thank you for the info, yes its taking a wrong port number. But, could you please tell me how to change the port no once appium starts from 0.0.0.0:4723 to 127.0.0…1:4723

In fresh terminal type (appium --address 127.0.0.1 --port 4723)

Barz. The same issue with the same inputs: Application just opened and closed immediately.
App running without any exception on the iPhone simulator but failed on the iPad (‘iPad 2’, ‘iPad Air’)

@Odyssey

Please check with your App path (eg:-.ipa,.app) it should be .app bcz you are running your scripts on simulator.