Trying to run Test on real iOS device [spawn ENOENT]

I’m getting a spawn ENOENT (33) error, after upgrading to appium 1.2.2 from appium 1.1 where this was working. Here are the logs.

IOS - stdout: info: --> POST /wd/hub/session {“desiredCapabilities”:{“appium-version”:“1.1”,“platformVersion”:“7.0”,“browserName”:“safari”,“platformName”:“iOS”,“udid”:“23b8e657f90ea4464adcf13bea8d0a90112209b2”,“deviceName”:“iphone”,“platform”:“MAC”}}

IOS - stdout: info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, platform

IOS - stdout: info: [debug] Configuring Safari session

IOS - stdout: info: [debug] Using local .zip from command line: /usr/local/lib/node_modules/appium/build/SafariLauncher/SafariLauncher.zip

IOS - stdout: info: [debug] Copying local zip to tmp dir

IOS - stdout: info: [debug] /usr/local/lib/node_modules/appium/build/SafariLauncher/SafariLauncher.zip copied to /var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/appium-app.zip

IOS - stdout: info: [debug] Unzipping /var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/appium-app.zip

IOS - stdout: info: [debug] Testing zip archive: /var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/appium-app.zip

IOS - stdout: info: [debug] Zip archive tested clean

IOS - stdout: info: [debug] Unzip successful

IOS - stdout: info: [debug] Using locally extracted app: /var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/SafariLauncher.app

IOS - stdout: info: [debug] Creating new appium session 4110b0f3-a2ef-48c1-a22b-accb211b3953

IOS - stdout: info: [debug] Removing any remaining instruments sockets

IOS - stdout: info: [debug] Cleaned up instruments socket /tmp/instruments_sock

IOS - stdout: info: [debug] Setting Xcode folder

IOS - stdout: info: [debug] Setting Xcode version

IOS - stdout: info: [debug] Setting iOS SDK Version

IOS - stdout: info: [debug] iOS SDK Version set to 7.1

IOS - stdout: info: [debug] Detecting automation tracetemplate

IOS - stdout: info: [debug] Not auto-detecting udid, running on sim

IOS - ERROR ERROR ERROR: error: Could not parse plist file (as binary) at /var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/SafariLauncher.app/en.lproj/Localizable.strings

IOS - stdout: info: Will try to parse the plist file as XML

IOS - ERROR ERROR ERROR: parseFileSync() is deprecated. Use parseStringSync() instead.

IOS - ERROR ERROR ERROR: error: Could not parse plist file (as XML) at /var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/SafariLauncher.app/en.lproj/Localizable.strings

IOS - stdout: warn: Could not parse app Localizable.strings

IOS - stdout: info: [debug] Not setting locale because we’re using a real device

IOS - stdout: info: [debug] Creating instruments

IOS - stdout: info: [debug] Preparing uiauto bootstrap

IOS - stdout: info: [debug] Dynamic bootstrap dir:

IOS - stdout: info: [debug] Dynamic env:

IOS - stdout: info: [debug] Dynamic bootstrap code:

IOS - stdout: info: [debug] Dynamic bootstrap path:

IOS - stdout: info: [debug] Reusing dynamic bootstrap:

IOS - stdout: info: [debug] Not setting iOS and app preferences since we’re on a real device

IOS - stdout: info: [debug] Starting iOS device log capture via deviceconsole

IOS - ERROR ERROR ERROR: error: iOS log capture failed: spawn ENOENT

IOS - stdout: info: [debug] Cleaning up appium session

IOS - ERROR ERROR ERROR: error: Failed to start an Appium session, err was: Error: spawn ENOENT

IOS - stdout: info: [debug] Error: spawn ENOENT

at errnoException (child_process.js:998:11)

at Process.ChildProcess._handle.onexit (child_process.js:789:34)

IOS - stdout: info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: spawn ENOENT)”,“code”:“ENOENT”,“errno”:“ENOENT”,“syscall”:“spawn”,“origValue”:“spawn ENOENT”},“sessionId”:null}

IOS - stdout: info: <-- POST /wd/hub/session 500 220.656 ms - 197

IOS - stdout: info: [debug] Not setting device type since we’re connected to a device

IOS - stdout: info: [debug] Getting bundle ID from app

IOS - stdout: info: [debug] Parsed app Info.plist (as binary)

IOS - stdout: info: [debug] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 23b8e657f90ea4464adcf13bea8d0a90112209b2 --bundle com.bytearc.SafariLauncher

IOS - stdout: info: [debug] Installing app using cmd: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap install --id 23b8e657f90ea4464adcf13bea8d0a90112209b2 --bundle “/var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/SafariLauncher.app”

IOS - stdout: info: [debug] Not starting command proxy since we’re expecting that Instruments won’t be able to talk to it anyway

IOS - stdout: info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

IOS - stdout: info: Launching instruments

IOS - stdout: info: [debug] Attempting to run app on real device with UDID 23b8e657f90ea4464adcf13bea8d0a90112209b2

IOS - stdout: 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.bundle/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 23b8e657f90ea4464adcf13bea8d0a90112209b2 /var/folders/nx/2963dx3n3090gnt8_ztnvht00000gp/T/11489-2068-1inq9a7/SafariLauncher.app -e UIASCRIPT /Users/ultilab/Library/Application Support/appium/bootstrap/bootstrap-d1d9fbb0b8e3788e.js -e UIARESULTSPATH /tmp/appium-instruments

IOS - stdout: info: [debug] And extra without-delay env: {}

IOS - stdout: info: [debug] And launch timeouts (in ms): {“global”:90000}

IOS - stdout: info: --> GET /wd/hub/status {}

IOS - stdout: info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.2.2”,“revision”:“cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4”}}}

IOS - stdout: info: <-- GET /wd/hub/status 200 1.760 ms - 104 {“status”:0,“value”:{“build”:{“version”:“1.2.2”,“revision”:“cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4”}}}

I think I found the solution here ( https://github.com/appium/appium/issues/3503), I’ll update this if it works.

I got this error fixed through the above link, although now I’m getting “cannot navigate to WebView” errors for iOS still

issue__How to fix this?? I am using Mac Os 10.10.1 & Xcode 6.1 and

trying to launch the ios app through eclipse to perform some
testing but

getting this error dont
know how to reseolve this issue. I have updated

the appium to 1.3.4 but
still same. Tried to launch same ios app with

appium 1.3.3 GUI this app launches properly. Anyone can suggest

anything.

Above issue is observed with simulator 7.1,8.1 etc

By any chance can this be happening bcoz of “No signing
Identity found” in xcode

info: Welcome to Appium v1.3.4 (REV
056f5bd277987bed391aef04acf2be38ea161e50)

info: Appium REST http interface listener started on 0.0.0.0:4723

info: Console LogLevel: debug

info:

–> POST
/wd/hub/session

{“desiredCapabilities”:{“app”:"/Users/Anand/Library/Developer/Xcode/DerivedData/TestApp-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/TestApp.app",“appium-version”:“1.0”,“platformVersion”:“7.1”,“browserName”:"",“platformName”:“iOS”,“udid”:“13FF8920-587E-4AF6-A3B9-AA32E81624EC”,“deviceName”:"iPhone

5s"}}

info: Client User-Agent string: Apache-HttpClient/4.3.4 (java
1.5)

info:

[debug] The following
desired capabilities were provided, but not

recognized by appium. They will be passed on to any other
services

running on this server. : appium-version

info: [debug] Using local

app from desired caps:

/Users/Anand/Library/Developer/Xcode/DerivedData/TestApp-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/TestApp.app

info: [debug] Creating new appium session
2eb74755-4582-46cf-97b9-78b548cfa1b9

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] Not checking whether simulator is available since
we’re on a real device

info: [debug] Detecting automation tracetemplate

info: [debug] Not auto-detecting udid, running on sim

info:

[debug] Could not parse
plist file (as binary) at

/Users/Anand/Library/Developer/Xcode/DerivedData/TestApp-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/TestApp.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

/Users/Anand/Library/Developer/Xcode/DerivedData/TestApp-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/TestApp.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/Anand/Library/Application Support/appium/bootstrap

info:

[debug] Dynamic env:

{“nodePath”:"/usr/local/bin/node",“commandProxyClientPath”:"/Users/Anand/appium/node_modules/appium-uiauto/bin/command-proxy-client.js",“instrumentsSock”:"/tmp/instruments_sock",“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“sendKeyStrategy”:“grouped”}

…o: [debug] Dynamic bootstrap code: // This file is
automatically generated. Do not manually modify!

info: [debug] Dynamic bootstrap path:
/Users/Anand/Library/Application
Support/appium/bootstrap/bootstrap-723f69bfa90dadc3.js

info: [debug] Reusing dynamic bootstrap:
/Users/Anand/Library/Application
Support/appium/bootstrap/bootstrap-723f69bfa90dadc3.js

info:

[debug] Getting device
string from opts:

{“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1.1”,“iOSSDKVersion”:“8.1”,“deviceName”:"iPhone

5s",“platformVersion”:“7.1”}

info: [debug] fixDevice is on

info: [debug] Final device string is: ‘iPhone 5s (7.1
Simulator)’

info: [debug] Not setting device type since we’re on a real
device

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] Killall iOS Simulator

info: [debug] Killing any other simulator daemons

info: [debug] On a real device; cannot clean device state

info: [debug] Not setting locale because we’re using a real
device

info: [debug] No iOS / app preferences to set

info: [debug] Starting iOS device log capture via deviceconsole

error: Log capture did not start in a reasonable amount of time

info: [debug] Cleaning up appium session

error: Failed to start an Appium session, err was: Error: Log
capture did not start in a reasonable amount of time

info: [debug] Error: Log capture did not start in a reasonable
amount of time

at null._onTimeout

(/Users/Anand/appium/lib/devices/ios/ios-log.js:137:10)

at Timer.listOnTimeout

as ontimeout

info:

[debug] Responding to
client with error:

{“status”:33,“value”:{“message”:"A
new session could not be created.

(Original error: Log capture did not start in a reasonable
amount of

time)",“origValue”:"Log capture did not
start in a reasonable amount of

time"},“sessionId”:null}

info: <-- POST /wd/hub/session 500 11780.237 ms - 234

info: [debug] Not pre-launching simulator

info: [debug] Creating iDevice object with udid
13FF8920-587E-4AF6-A3B9-AA32E81624EC

info:

[debug] Couldn’t find
ideviceinstaller, trying built-in at

/Users/Anand/appium/build/libimobiledevice-macosx/ideviceinstaller

info:

[debug] Checking app
install status using:

/Users/Anand/appium/build/fruitstrap/fruitstrap isInstalled --id

13FF8920-587E-4AF6-A3B9-AA32E81624EC --bundle com.TestAppparking.mobile

Please check the iOS app . It should be build for iOS device.

This app is developed for IOS devices and is working fine with xcode, Titanium sdk and Appium GUI 1.3.3, the only difficulty I am facing is that I am unable to launch it through eclipse with java coding the error I am getting is : “Failed to start an Appium session, err was: Error: Log capture did not start in a reasonable amount of time”