ECLIPSE : Java : Unable to start XCUITest "Error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT".Please help!

I am trying to set and run automation our iOS app . I tried to run the code,its throwing me the error as below at XCUITest
Error: Command ‘idevice_id -l’ errored out: Error: spawn idevice_id ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at ChildProcess. (lib/teen_process.js:32:14)
at emitOne (events.js:96:13)
at ChildProcess.emit (events.js:188:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Please help me get it fixed.

Environment

Appium v1.6.0
iOS 9.3

Code To Reproduce Issue :

service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingAnyFreePort());
service.start();
DesiredCapabilities capabilities=DesiredCapabilities.ipad();

capabilities.setCapability(MobileCapabilityType.PLATFORM, “iOS”);

capabilities.setCapability(MobileCapabilityType.VERSION, “9.3”);

capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, “Rafi’s iPad”);
capabilities.setCapability(MobileCapabilityType.APP, “/Users/kiruba-xxxx/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app”);
capabilities.setCapability(MobileCapabilityType.UDID, “5a2f5b798b6f9c60278368ef8a60bb8ca937ae46”);//black iPad
capabilities.setCapability(“bundleId”, “com.zoho.xxxxx”);
capabilities.setCapability(“automationName”, “XCUITest”);

Install ideviceinstaller. ideviceinstaller includes idevice_id. Most people use Homebrew to install:

http://brewformulas.org/Ideviceinstaller

Hi,

  1. Launch Eclipse,
  2. Navigate to Run --> Run Configuration
  3. Create a environment variable by name PATH
  4. Set the environment variable in eclipse with PATH = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ssimakurthy/Desktop/android-sdk-macosx/tools:/Users/ssimakurthy/Desktop/android-sdk-macosx/platform-tools:/usr/local/Cellar/libimobiledevice/HEAD-2c16751/bin
  5. Click Apply and Close

This should resolve your issue

Hi wreed,thank you for the response.
When I tried to install ‘ideviceinstaller’ using brew,it told “already installed but not linked”. So I linked and then tried to run the code again. But still the issue isn’t resolved.:frowning:

I didn’t get from your description that you are running Eclipse, but if so try @SireeshaSimakurthy’s solution.

Hi Sireesha,
Thank you for the reply :slight_smile: the error is gone now after adding the path variable but got another error instead.

Finding XcodePath by symlink because Error: Command ‘xcode-select --print-path’ errored out: Error: spawn xcode-select ENOENT

Can you help?

Sorry Wreed,it is my mistake. Sorry…

If you can help with the below error,please help.

Finding XcodePath by symlink because Error: Command ‘xcode-select --print-path’ errored out: Error: spawn xcode-select ENOENT

Do you have Xcode installed? And the command line tools?

Hi Sireesha,
Sorry,previously I did not copy the whole path variables you mentioned and only provided partial variable ; so only got that issue persisted. After I copied the whole path variables,the issue is gone.

I have installed Xcode and command line tools to but now got different issues.

[Xcode] 2016-12-06 02:28:42.742 xcodebuild[4637:149778] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-11169/DTDeviceKitBase/DTDKRemoteDeviceConnection.mm:891
Details: Failed to start Instruments daemon on device “5a2f5b798b6f9c60278368ef8a60bb8ca937ae46”: Error Domain=com.apple.dtdevicekit Code=-402653083 “Could not connect to the device.” UserInfo={NSLocalizedFailureReason=Could not connect to the device., com.apple.dtdevicekit.stacktrace=(

[Xcode]
Testing failed:
Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the project editor.

Open WebDriverAgent.xcodeproj available at (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent) in XCode and update the Development profile which is used for App file

Hi Sireesha,
Thank you for the help so far,the solution you suggested has worked.
Now I think there is a problem with my JAVA code .

The code is installing WebDriverAgent,then launching the app some attempt.
Other attempt its not launching the app ,only launching the WebDriverAgent app.
Other attempT eclipse CRASHES.

please let me k=know if I am doing anything wrong.

	service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingAnyFreePort());
	service.start();
	DesiredCapabilities capabilities=DesiredCapabilities.ipad();
	
	capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
	capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "");
	capabilities.setCapability(MobileCapabilityType.PLATFORM, "iOS");
	capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.3");
	capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Rafi's iPad");
	capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "120");

	capabilities.setCapability(MobileCapabilityType.UDID, "5a2f5b798b6f9c602783ccccca60bb8ca937ae46");//black iPad
	capabilities.setCapability("realDeviceLogger", "/usr/local/lib/node_modules/deviceconsole/deviceconsole");//mentioned to mention it while installin

	capabilities.setCapability(MobileCapabilityType.APP, "/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app");

	capabilities.setCapability("bundleId", "com.zoho.zohoform");
    capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
    capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
	capabilities.setCapability("coreSimulator", "/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework");//mentioned to mention it while installin

	driver= new IOSDriver<IOSElement>(service.getUrl(),capabilities);
	
	driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	service.stop();

Can you share me the logs??

Below are the logs.

(node:11888) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[Appium] Welcome to Appium v1.6.0
[Appium] Non-default server args:
[Appium] port: 1800
[Appium] Appium REST http interface listener started on 0.0.0.0:1800
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0”…
[HTTP] <-- GET /wd/hub/status 200 16 ms - 83
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app",“noReset”:true,“bundleId”:“com.zoho.zohoform”,“version”:"",“deviceName”:“Rafi’s iPad”,“fullReset”:false,“platform”:“iOS”,“newCommandTimeout”:“120”,“realDeviceLogger”:"/usr/local/lib/node_modules/deviceconsole/deviceconsole",“platformVersion”:“9.3”,“automationName”:“XCUITest”,“browserName”:"",“coreSimulator”:"/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework",“udid”:“5a2f5b798b6f9c60278368ef8a60bb8ca937ae46”,“platformName”:“iOS”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/kiruba-3665…
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] app: ‘/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app’
[Appium] noReset: true
[Appium] bundleId: ‘com.zoho.zohoform’
[Appium] version: ‘’
[Appium] deviceName: ‘Rafi’s iPad’
[Appium] fullReset: false
[Appium] platform: ‘iOS’
[Appium] newCommandTimeout: ‘120’
[Appium] realDeviceLogger: ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’
[Appium] platformVersion: ‘9.3’
[Appium] automationName: ‘XCUITest’
[Appium] browserName: ‘’
[Appium] coreSimulator: ‘/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework’
[Appium] udid: ‘5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’
[Appium] platformName: ‘iOS’
[debug] [XCUITest] XCUITestDriver version: 2.0.26
[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘120’) to integer (120). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: version, platform, coreSimulator.
[BaseDriver] Session created with session id: 9893ebcf-f63b-4e5a-8046-3095284df70f
[debug] [XCUITest] Xcode version set to ‘8.0’
[debug] [XCUITest] iOS SDK Version set to ‘10.0’
[debug] [XCUITest] Available devices: 5a2f5b798b6f9c60278368ef8a60bb8ca937ae46
[debug] [XCUITest] Creating iDevice object with udid 5a2f5b798b6f9c60278368ef8a60bb8ca937ae46
[XCUITest] Determining device to run tests on: udid: ‘5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’, real device: true
[BaseDriver] Using local app ‘/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app’
[debug] [XCUITest] Checking whether app is actually present
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[XCUITest] Setting up real device
[debug] [XCUITest] Stdout from app isInstalled check: […] Waiting for iOS device to be connected
[…] Using iPad 4 (CDMA) ‘Rafi’s iPad’ (5a2f5b798b6f9c60278368ef8a60bb8ca937ae46).
true

[debug] [XCUITest] App is installed.
[debug] [XCUITest] Full reset not requested. No need to install.
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Beginning test with command ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’ 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/kiruba-3665/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/E6332C79-7D16-4410-AD6F-77E4DCB31AD2/Session-WebDriverAgentRunner-2016-12-06_225840-i15SfF.log
[Xcode] 2016-12-06 22:58:50.202 xcodebuild[11902:312541] DTDeviceKit: Could not start house arrest service for app identifier com.apple.test.WebDriverAgentRunner-Runner [Error Domain=com.apple.dtdevicekit Code=-402653093 “Too many instances of this service are already running.” UserInfo={NSLocalizedFailureReason=Too many instances of this service are already running., com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x0000000110c5c3cb DTDKCreateNSError + 113
1 DTDeviceKitBase 0x0000000110c5cb09 DTDK_AMDErrorToNSError + 791
2 DTDeviceKitBase 0x0000000110c6e2f5 __70-[DTDKRemoteDeviceConnection startHouseArrestServiceForAppIdentifier:]_block_invoke + 100
3 DTDeviceKitBase 0x0000000110c6d1d1 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_4 + 22
4 DTDeviceKitBase 0x0000000110c5f317 __DTDKExecuteInSession_block_invoke + 38
5 DTDeviceKitBase 0x0000000110c5e940 __DTDKExecuteWithConnection_block_invoke_2 + 477
6 DTDeviceKitBase 0x0000000110c5e73c __DTDKExecuteWithConnection_block_invoke + 107
7 libdispatch.dylib 0x00007fff991ac40b _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff991ad9f2 _dispatch_barrier_sync_f_invoke + 74
9 DVTFoundation 0x0000000107adcbef DVTDispatchBarrierSync + 206
10 DVTFoundation 0x0000000107ab959b -[DVTDispatchLock performLockedBlock:] + 116
11 DTDeviceKitBase 0x0000000110c5e646 DTDKExecuteWithConnection + 223
12 DTDeviceKitBase 0x0000000110c5f2a1 DTDKExecuteInSession + 121
13 DTDeviceKitBase 0x0000000110c6d108 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 117
14 DVTFoundation 0x0000000107adbf4b __DVTDispatchAsync_block_invoke + 827
15 libdispatch.dylib 0x00007fff991b793d _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x00007fff991ac40b _dispatch_client_callout + 8
17 libdispatch.dylib 0x00007fff991bebd7 _dispatch_async_redirect_invoke + 1733
18 libdispatch.dylib 0x00007fff991ac40b _dispatch_client_callout + 8
19 libdispatch.dylib 0x00007fff991b029b _dispatch_root_queue_drain + 1890
20 libdispatch.dylib 0x00007fff991afb00 _dispatch_worker_thread3 + 91
21 libsystem_pthread.dylib 0x00007fff897454de _pthread_wqthread + 1129
22 libsystem_pthread.dylib 0x00007fff89743341 start_wqthread + 13
), NSLocalizedRecoverySuggestion=Too many instances of this service are already running., NSLocalizedDescription=Too many instances of this service are already running.}]

[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : Running tests…
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : Unable to load configuration data from specified path /var/folders/70/h32fgf795yx_hlx478b9_1_rw20c9s/T/com.apple.dt.XCTest/BF96BC2B-C998-4298-8A1F-303B9C52BFBC/remote-container/tmp/WebDriverAgentRunner-BF96BC2B-C998-4298-8A1F-303B9C52BFBC.xctestconfiguration; error: The file doesn’t exist.
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : Looking for test bundles in /var/containers/Bundle/Application/2192ADA2-88E3-434D-826A-EBC2A0EC00CE/WebDriverAgentRunner-Runner.app/PlugIns
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : Found test bundle at /var/containers/Bundle/Application/2192ADA2-88E3-434D-826A-EBC2A0EC00CE/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : Looking for configurations in /var/containers/Bundle/Application/2192ADA2-88E3-434D-826A-EBC2A0EC00CE/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : No configurations found, creating a default configuration that will run all tests.
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad securityd[90] : secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad securityd[90] : secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad amfid[215] : SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad kernel[0] : Sandbox: XCTRunner(302) deny(1) file-write-data /private/var/mobile/Library/Preferences/com.apple.Accessibility.plist
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : Built at Dec 6 2016 22:58:42
[XCUITest] Detected that WebDriverAgent is running at url ‘http://(null):8100’
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : ServerURLHere->http://(null):8100<-ServerURLHere
[XCUITest] WebDriverAgent started at url ‘http://(null):8100’
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [WebDriverAgent] Device: Dec 6 22:58:47 Rafis-iPad XCTRunner[302] : Listening on USB
[debug] [iProxy] bind(): Address already in use
[debug] [iProxy] Error creating socket: Address already in use
[XCUITest] Error: iproxy exited with code ‘208’
at SubProcess. (lib/webdriveragent.js:378:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Error: iproxy exited with code ‘208’
at SubProcess. (lib/webdriveragent.js:378:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[debug] [XCUITest] Reset not set, continuing
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: iproxy exited with code ‘208’
at SubProcess. (lib/webdriveragent.js:378:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[HTTP] <-- POST /wd/hub/session 500 22397 ms - 166
Exception in thread “main” org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: iproxy exited with code ‘208’ (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 22.56 seconds
Build info: version: ‘2.53.1’, revision: ‘a36b8b1’, time: ‘2016-06-30 17:37:03’
System info: host: ‘kiruba-3665’, ip: ‘192.168.0.102’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.6’, java.version: ‘1.8.0_77’
Driver info: io.appium.java_client.ios.IOSDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:82)
at Test.main(Test.java:41)

The above logs came while running for the second time.
Below log comes for the first time.

(node:633) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[Appium] Welcome to Appium v1.6.0
[Appium] Non-default server args:
[Appium] port: 13562
[Appium] Appium REST http interface listener started on 0.0.0.0:13562
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0”…
[HTTP] <-- GET /wd/hub/status 200 18 ms - 83
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app",“noReset”:true,“bundleId”:“com.zoho.zohoform”,“version”:"",“deviceName”:“Rafi’s iPad”,“fullReset”:false,“platform”:“iOS”,“newCommandTimeout”:“120”,“realDeviceLogger”:"/usr/local/lib/node_modules/deviceconsole/deviceconsole",“platformVersion”:“9.3”,“automationName”:“XCUITest”,“browserName”:"",“coreSimulator”:"/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework",“udid”:“5a2f5b798b6f9c60278368ef8a60bb8ca937ae46”,“platformName”:“iOS”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/kiruba-3665…
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] app: ‘/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app’
[Appium] noReset: true
[Appium] bundleId: ‘com.zoho.zohoform’
[Appium] version: ‘’
[Appium] deviceName: ‘Rafi’s iPad’
[Appium] fullReset: false
[Appium] platform: ‘iOS’
[Appium] newCommandTimeout: ‘120’
[Appium] realDeviceLogger: ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’
[Appium] platformVersion: ‘9.3’
[Appium] automationName: ‘XCUITest’
[Appium] browserName: ‘’
[Appium] coreSimulator: ‘/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework’
[Appium] udid: ‘5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’
[Appium] platformName: ‘iOS’
[debug] [XCUITest] XCUITestDriver version: 2.0.26
[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘120’) to integer (120). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: version, platform, coreSimulator.
[BaseDriver] Session created with session id: 36da2b01-7970-4613-a1b7-1a2b7405a86d
[debug] [XCUITest] Xcode version set to ‘8.0’
[debug] [XCUITest] iOS SDK Version set to ‘10.0’
[debug] [XCUITest] Available devices: 5a2f5b798b6f9c60278368ef8a60bb8ca937ae46
[debug] [XCUITest] Creating iDevice object with udid 5a2f5b798b6f9c60278368ef8a60bb8ca937ae46
[XCUITest] Determining device to run tests on: udid: ‘5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’, real device: true
[BaseDriver] Using local app ‘/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app’
[debug] [XCUITest] Checking whether app is actually present
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[XCUITest] Setting up real device
[debug] [XCUITest] Stdout from app isInstalled check: […] Waiting for iOS device to be connected
[…] Using iPad 4 (CDMA) ‘Rafi’s iPad’ (5a2f5b798b6f9c60278368ef8a60bb8ca937ae46).
true

[debug] [XCUITest] App is installed.
[debug] [XCUITest] Full reset not requested. No need to install.
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Beginning test with command ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’ 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/kiruba-3665/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/32211DF4-E2FA-4FEC-BD78-DBB818FB14E1/Session-WebDriverAgentRunner-2016-12-06_231059-Ujscwu.log
[Xcode] 2016-12-06 23:11:09.971 xcodebuild[658:8475] DTDeviceKit: Could not start house arrest service for app identifier com.apple.test.WebDriverAgentRunner-Runner [Error Domain=com.apple.dtdevicekit Code=-402653093 “Too many instances of this service are already running.” UserInfo={NSLocalizedFailureReason=Too many instances of this service are already running., com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x000000010e5023cb DTDKCreateNSError + 113
1 DTDeviceKitBase 0x000000010e502b09 DTDK_AMDErrorToNSError + 791
2 DTDeviceKitBase 0x000000010e5142f5 __70-[DTDKRemoteDeviceConnection startHouseArrestServiceForAppIdentifier:]_block_invoke + 100
3 DTDeviceKitBase 0x000000010e5131d1 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_4 + 22
4 DTDeviceKitBase 0x000000010e505317 __DTDKExecuteInSession_block_invoke + 38
5 DTDeviceKitBase 0x000000010e504940 __DTDKExecuteWithConnection_block_invoke_2 + 477
6 DTDeviceKitBase 0x000000010e50473c __DTDKExecuteWithConnection_block_invoke + 107
7 libdispatch.dylib 0x00007fff974c540b _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff974c69f2 _dispatch_barrier_sync_f_invoke + 74
9 DVTFoundation 0x000000010537cbef DVTDispatchBarrierSync + 206
10 DVTFoundation 0x000000010535959b -[DVTDispatchLock performLockedBlock:] + 116
11 DTDeviceKitBase 0x000000010e504646 DTDKExecuteWithConnection + 223
12 DTDeviceKitBase 0x000000010e5052a1 DTDKExecuteInSession + 121
13 DTDeviceKitBase 0x000000010e513108 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 117
14 DVTFoundation 0x000000010537bf4b __DVTDispatchAsync_block_invoke + 827
15 libdispatch.dylib 0x00007fff974d093d _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x00007fff974c540b _dispatch_client_callout + 8
17 libdispatch.dylib 0x00007fff974d7bd7 _dispatch_async_redirect_invoke + 1733
18 libdispatch.dylib 0x00007fff974c540b _dispatch_client_callout + 8
19 libdispatch.dylib 0x00007fff974c929b _dispatch_root_queue_drain + 1890
20 libdispatch.dylib 0x00007fff974c8b00 _dispatch_worker_thread3 + 91
21 libsystem_pthread.dylib 0x00007fff87a5e4de _pthread_wqthread + 1129
22 libsystem_pthread.dylib 0x00007fff87a5c341 start_wqthread + 13
), NSLocalizedRecoverySuggestion=Too many instances of this service are already running., NSLocalizedDescription=Too many instances of this service are already running.}]

[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : Running tests…
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : Unable to load configuration data from specified path /var/folders/70/h32fgf795yx_hlx478b9_1_rw20c9s/T/com.apple.dt.XCTest/F86CEF17-5BC6-4C85-9770-98962319E19E/remote-container/tmp/WebDriverAgentRunner-F86CEF17-5BC6-4C85-9770-98962319E19E.xctestconfiguration; error: The file doesn’t exist.
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : Looking for test bundles in /var/containers/Bundle/Application/9998F675-68C7-4845-9468-28A60B32B0C9/WebDriverAgentRunner-Runner.app/PlugIns
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : Found test bundle at /var/containers/Bundle/Application/9998F675-68C7-4845-9468-28A60B32B0C9/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : Looking for configurations in /var/containers/Bundle/Application/9998F675-68C7-4845-9468-28A60B32B0C9/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : No configurations found, creating a default configuration that will run all tests.
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad kernel[0] : Sandbox: XCTRunner(309) deny(1) file-write-data /private/var/mobile/Library/Preferences/com.apple.Accessibility.plist
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : Built at Dec 6 2016 23:11:01
[XCUITest] Detected that WebDriverAgent is running at url ‘http://(null):8100’
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : ServerURLHere->http://(null):8100<-ServerURLHere
[XCUITest] WebDriverAgent started at url ‘http://(null):8100’
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [WebDriverAgent] Device: Dec 6 23:11:07 Rafis-iPad XCTRunner[309] : Listening on USB
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{"bu…
[debug] [WebDriverAgent] Device: Dec 6 23:12:12 Rafis-iPad XCTRunner[309] : Enqueue Failure: UI Testing Failure - Unable to update application state promptly. 0 1
[debug] [WebDriverAgent] Device: Dec 6 23:13:27 Rafis-iPad XCTRunner[309] : Enqueue Failure: UI Testing Failure - App state of (null) is still unknown 0 1

This is another one.

(node:2313) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[Appium] Welcome to Appium v1.6.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0”…
[HTTP] <-- GET /wd/hub/status 200 18 ms - 83
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app",“noReset”:true,“bundleId”:“com.zoho.zohoform”,“version”:"",“deviceName”:“Rafi’s iPad”,“fullReset”:false,“platform”:“iOS”,“newCommandTimeout”:“120”,“realDeviceLogger”:"/usr/local/lib/node_modules/deviceconsole/deviceconsole",“platformVersion”:“9.3”,“automationName”:“XCUITest”,“browserName”:"",“coreSimulator”:"/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework",“udid”:“5a2f5b798b6f9c60278368ef8a60bb8ca937ae46”,“platformName”:“iOS”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/kiruba-3665…
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] app: ‘/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app’
[Appium] noReset: true
[Appium] bundleId: ‘com.zoho.zohoform’
[Appium] version: ‘’
[Appium] deviceName: ‘Rafi’s iPad’
[Appium] fullReset: false
[Appium] platform: ‘iOS’
[Appium] newCommandTimeout: ‘120’
[Appium] realDeviceLogger: ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’
[Appium] platformVersion: ‘9.3’
[Appium] automationName: ‘XCUITest’
[Appium] browserName: ‘’
[Appium] coreSimulator: ‘/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework’
[Appium] udid: ‘5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’
[Appium] platformName: ‘iOS’
[debug] [XCUITest] XCUITestDriver version: 2.0.26
[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘120’) to integer (120). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: version, platform, coreSimulator.
[BaseDriver] Session created with session id: f549aa23-72b9-4eea-bdd2-1d06c431d314
[debug] [XCUITest] Xcode version set to ‘8.0’
[debug] [XCUITest] iOS SDK Version set to ‘10.0’
[debug] [XCUITest] Available devices: 5a2f5b798b6f9c60278368ef8a60bb8ca937ae46
[debug] [XCUITest] Creating iDevice object with udid 5a2f5b798b6f9c60278368ef8a60bb8ca937ae46
[XCUITest] Determining device to run tests on: udid: ‘5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’, real device: true
[BaseDriver] Using local app ‘/Users/kiruba-3665/Library/Developer/Xcode/DerivedData/zohoform-apfvajhhubdtpddzzgymxvssgkev/Build/Products/Release-iphoneos/Zoho Forms.app’
[debug] [XCUITest] Checking whether app is actually present
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[XCUITest] Setting up real device
[debug] [XCUITest] Stdout from app isInstalled check: […] Waiting for iOS device to be connected
[…] Using iPad 4 (CDMA) ‘Rafi’s iPad’ (5a2f5b798b6f9c60278368ef8a60bb8ca937ae46).
true

[debug] [XCUITest] App is installed.
[debug] [XCUITest] Full reset not requested. No need to install.
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Beginning test with command ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=5a2f5b798b6f9c60278368ef8a60bb8ca937ae46’ 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/kiruba-3665/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/9FD97AC6-B26E-454A-9279-02B3A940D6A6/Session-WebDriverAgentRunner-2016-12-06_233017-85YQTG.log
[Xcode] 2016-12-06 23:30:27.912 xcodebuild[2324:29836] DTDeviceKit: Could not start house arrest service for app identifier com.apple.test.WebDriverAgentRunner-Runner [Error Domain=com.apple.dtdevicekit Code=-402653093 “Too many instances of this service are already running.” UserInfo={NSLocalizedFailureReason=Too many instances of this service are already running., com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x00000001184d43cb DTDKCreateNSError + 113
1 DTDeviceKitBase 0x00000001184d4b09 DTDK_AMDErrorToNSError + 791
2 DTDeviceKitBase 0x00000001184e62f5 __70-[DTDKRemoteDeviceConnection startHouseArrestServiceForAppIdentifier:]_block_invoke + 100
3 DTDeviceKitBase 0x00000001184e51d1 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_4 + 22
4 DTDeviceKitBase 0x00000001184d7317 __DTDKExecuteInSession_block_invoke + 38
5 DTDeviceKitBase 0x00000001184d6940 __DTDKExecuteWithConnection_block_invoke_2 + 477
6 DTDeviceKitBase 0x00000001184d673c __DTDKExecuteWithConnection_block_invoke + 107
7 libdispatch.dylib 0x00007fff974c540b _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff974c69f2 _dispatch_barrier_sync_f_invoke + 74
9 DVTFoundation 0x000000010f354bef DVTDispatchBarrierSync + 206
10 DVTFoundation 0x000000010f33159b -[DVTDispatchLock performLockedBlock:] + 116
11 DTDeviceKitBase 0x00000001184d6646 DTDKExecuteWithConnection + 223
12 DTDeviceKitBase 0x00000001184d72a1 DTDKExecuteInSession + 121
13 DTDeviceKitBase 0x00000001184e5108 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 117
14 DVTFoundation 0x000000010f353f4b __DVTDispatchAsync_block_invoke + 827
15 libdispatch.dylib 0x00007fff974d093d _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x00007fff974c540b _dispatch_client_callout + 8
17 libdispatch.dylib 0x00007fff974d7bd7 _dispatch_async_redirect_invoke + 1733
18 libdispatch.dylib 0x00007fff974c540b _dispatch_client_callout + 8
19 libdispatch.dylib 0x00007fff974c929b _dispatch_root_queue_drain + 1890
20 libdispatch.dylib 0x00007fff974c8b00 _dispatch_worker_thread3 + 91
21 libsystem_pthread.dylib 0x00007fff87a5e4de _pthread_wqthread + 1129
22 libsystem_pthread.dylib 0x00007fff87a5c341 start_wqthread + 13
), NSLocalizedRecoverySuggestion=Too many instances of this service are already running., NSLocalizedDescription=Too many instances of this service are already running.}]

[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : Running tests…
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : Unable to load configuration data from specified path /var/folders/70/h32fgf795yx_hlx478b9_1_rw20c9s/T/com.apple.dt.XCTest/0EE46EC4-D900-494A-B38E-4098D2E03BCB/remote-container/tmp/WebDriverAgentRunner-0EE46EC4-D900-494A-B38E-4098D2E03BCB.xctestconfiguration; error: The file doesn’t exist.
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : Looking for test bundles in /var/containers/Bundle/Application/6A7FB83D-7F24-4B75-A5BA-83678D2AC8A4/WebDriverAgentRunner-Runner.app/PlugIns
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : Found test bundle at /var/containers/Bundle/Application/6A7FB83D-7F24-4B75-A5BA-83678D2AC8A4/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : Looking for configurations in /var/containers/Bundle/Application/6A7FB83D-7F24-4B75-A5BA-83678D2AC8A4/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : No configurations found, creating a default configuration that will run all tests.
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : Built at Dec 6 2016 23:30:20
[XCUITest] Detected that WebDriverAgent is running at url ‘http://(null):8100’
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : ServerURLHere->http://(null):8100<-ServerURLHere
[debug] [WebDriverAgent] Device: Dec 6 23:30:25 Rafis-iPad XCTRunner[321] : Listening on USB
[XCUITest] WebDriverAgent started at url ‘http://(null):8100’
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{"bu…
[debug] [WebDriverAgent] Device: Dec 6 23:31:27 Rafis-iPad XCTRunner[321] : Enqueue Failure: UI Testing Failure - Unable to update application state promptly. 0 1
[debug] [WebDriverAgent] Device: Dec 6 23:32:42 Rafis-iPad XCTRunner[321] : Enqueue Failure: UI Testing Failure - App state of (null) is still unknown 0 1
[debug] [WebDriverAgent] Device: Dec 6 23:33:42 Rafis-iPad XCTRunner[321] : Enqueue Failure: UI Testing Failure - App accessibility isn’t loaded 0 1
[debug] [iProxy] recv failed: Resource temporarily unavailable
[XCUITest] ProxyRequestError: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
at JWProxy.proxy$ (lib/jsonwp-proxy/proxy.js:122:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
{ ProxyRequestError: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
at JWProxy.proxy$ (lib/jsonwp-proxy/proxy.js:122:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
jsonwp:
{ Error: ESOCKETTIMEDOUT
at ClientRequest. (/usr/local/lib/node_modules/appium/node_modules/request/request.js:776:19)
at ClientRequest.g (events.js:292:16)
at emitNone (events.js:86:13)
at ClientRequest.emit (events.js:185:7)
at Socket.socket.once (_http_client.js:565:38)
at Socket.g (events.js:292:16)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at Socket._onTimeout (net.js:342:8)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5) code: ‘ESOCKETTIMEDOUT’, connect: false } }
[JSONWP Proxy] Proxying [DELETE /session/f549aa23-72b9-4eea-bdd2-1d06c431d314] to [DELETE http://localhost:8100/session/f549aa23-72b9-4eea-bdd2-1d06c431d314] with no body
[debug] [iProxy] recv failed: Resource temporarily unavailable
[debug] [iProxy] recv failed: Operation not permitted
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad XCTRunner[321] : Enqueue Failure: UI Testing Failure - ‘<XCUIApplicationImpl: 0x14f19450 com.zoho.zohoform>’ App state is still not running active, state = XCApplicationStateUnknown 0 1
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad com.apple.xpc.launchd[1] (UIKitApplication:com.apple.test.WebDriverAgentRunner-Runner[0x4f9f][321]) : Service exited due to signal: Abort trap: 6
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad XCTRunner[321] : *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSSetM addObject:]: object cannot be nil’
[debug] [WebDriverAgent] Device: *** First throw call stack:
[debug] [WebDriverAgent] Device: (0x2122db0b 0x209eadff 0x21145f01 0x20dbfcbf 0x20dc9e7f 0x20dc2e17 0x20dcb6a1 0x20dcb07b 0x20f5ee0d 0x20f5e9fc)
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad diagnosticd[82] : error evaluating process info - pid: 321, puniqueid: 321
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad SpringBoard[48] : Unable to get short BSD proc info for 321: No such process
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad SpringBoard[48] : Unable to get short BSD proc info for 321: No such process
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad SpringBoard[48] : Unable to get short BSD proc info for 321: No such process
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad testmanagerd[319] : testmanagerd exiting, idle with no test activity.
[debug] [WebDriverAgent] Device: Dec 6 23:34:43 Rafis-iPad notification_proxy[180] : 0x40081000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!
[Xcode] 2016-12-06 23:34:46.781 xcodebuild[2324:29811] Error Domain=IDETestOperationsObserverErrorDomain Code=5 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}

Testing failed:
Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **

[XCUITest] xcodebuild exited with code ‘1’ and signal ‘null’
[MJSONWP] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: socket hang up
at JWProxy.proxy$ (lib/jsonwp-proxy/proxy.js:122:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 280248 ms - 216
Exception in thread “main” org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 280.42 seconds
Build info: version: ‘2.53.1’, revision: ‘a36b8b1’, time: ‘2016-06-30 17:37:03’
System info: host: ‘kiruba-3665’, ip: ‘192.168.0.102’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.6’, java.version: ‘1.8.0_77’
Driver info: io.appium.java_client.ios.IOSDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:82)
at Test.main(Test.java:46)

Please follow the below steps once… and let me know if you still facing the issue

  1. Restart the machine or kill the ports which are used by appium using
    lsof -i tcp:2331 (to find the process id which is using a specific port Id )
    lsof -P | grep ‘:2331’ | awk ‘{print $2}’ | xargs kill -9) - to kill the port from terminal
  2. Navigate to Scripts folder available @ appium/node_modules/appium-xcuitest-driver and execute this command - ./Scripts/bootstrap.sh -d
  3. Provide permission to /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/ folder by using the below command
    sudo chmod -R 777 /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver

Hi Sireesha,
I was able to do the step 1 and 3 but not the step 2.
For step 2, I went to ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver’ but unable to find the Scripts folder inside it.

FYI,the code is working for the first time.But for the next time it is telling that “the address is in use”. So I tried to kill it using the command you gave (also I need to kill my app and WebDriverAgent app from iOS device),it is working fine after that.

The above things are working only for some 10 times.Post that I need to restart my iOS device to make it work. Then it is posting me the below logs.

“[debug] [WebDriverAgent] Device: Dec 7 19:49:12 Rafis-iPad XCTRunner[249] : Enqueue Failure: UI Testing Failure - Unable to update application state promptly. 0 1
[debug] [WebDriverAgent] Device: Dec 7 19:49:27 Rafis-iPad XCTRunner[249] : Enqueue Failure: UI Testing Failure - Failed to get screenshot within 15s 0 1
[debug] [WebDriverAgent] Device: Dec 7 19:49:49 Rafis-iPad XCTRunner[249] : Continuing to run tests in the background with task ID 1
[debug] [WebDriverAgent] Device: Dec 7 19:50:27 Rafis-iPad XCTRunner[249] : Enqueue Failure: UI Testing Failure - App state of (null) is still unknown 0 1”

Is there any other way I can release the address using JAVA code instead of doing this manually every time?

Currently I am just using service.stop(); at the end of code every time.

Thank you in advance.:slight_smile:

You can code those steps as system calls and add them to a method you call at then end of testing. If you are using JUnit or TestNg you can put them in an ‘after’ method.

You can use the below methods for starting and stopping Appium Server from Eclipse

Try to use StartAppium() in BeforeTest and StopAppium in AfterTest()

public static void startAppium(){
Boolean blnServiceStatus;

	System.out.println("Starting Appium");
	service = new AppiumServiceBuilder()
			.usingDriverExecutable(new File("/Users/ssimakurthy/local/bin/node"))
			.withAppiumJS(new File("/usr/local/lib/node_modules/appium/build/lib/main.js"));

	//.withIPAddress("127.0.0.1").usingPort(4723));
	blnServiceStatus = service.build().isRunning();
	
	if (blnServiceStatus.equals(false)){
		service.build().start();
		System.out.println("Appium server Started");
	}
	
	service_url = service.build().getUrl().toString();
	System.out.println(service_url);
}

public static void stopAppium(){
	
	System.out.println("Stopping Appium");
	try{
		service.build().stop();
	}
	catch(Exception e){
		System.out.println("Appium server is already stopped");
	}
	System.out.println("Stopped Appium Server");
	
}

Scripts folder is available @ /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent