question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Unable to start iproxy. Is it installed?

See original GitHub issue

Hi Guys,

I’m facing the following issue when running automation on Appium's Integration Test App and code snippet for the same is embedded here when I try to run on

Appium Version appium --version :: 1.7.0

Xcode Version xcodebuild -version :: Xcode 8.3.2 Build version 8E2002

Desired Capabilities

desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, prop.getProperty("testIphone6PlusDeviceName"));
		
desiredCapabilities.setCapability(MobileCapabilityType.APP, prop.getProperty("webDriverIntegratinTestAppPath"));
		
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, prop.getProperty("platformName"));
			
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, prop.getProperty("platformVersion"));
				
desiredCapabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, prop.getProperty("automationName"));
		
desiredCapabilities.setCapability(MobileCapabilityType.UDID, prop.getProperty("udidTestIPhone6Plus"));
		
desiredCapabilities.setCapability(IOSMobileCapabilityType.WDA_LOCAL_PORT, "8100");
		
desiredCapabilities.setCapability(IOSMobileCapabilityType.SHOW_XCODE_LOG, true);
		
desiredCapabilities.setCapability(IOSMobileCapabilityType.SHOW_IOS_LOG, true);

Appium Server Logs

[Appium] Welcome to Appium v1.7.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"showIOSLog":true,"showXcodeLog":true,"platformVersion":"10.3","automationName":"XCUITest","bundleId":"com.facebooksrITest.IntegrationApp","platformName":"iOS","udid":"67840d8ffcb8b2e3d4cc26fa1808087cc2994d01","deviceName":"iPhone","wdaLocalPort":"8100"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"showIOSLog":true,"showXcodeLog":true,"platformVersion":"10.3","automationName":"XCUITest","bundleId":"com.facebooksrITest.IntegrationApp","platformName":"iOS","udid":"67840d8ffcb8b2e3d4cc26fa1808087cc2994d01","deviceName":"iPhone","wdaLocalPort":"8100"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"showIOSLog":true,"showXcodeLog":true,"platformVersion":"10.3","automationName":"XCUITest","bundleId":"com.facebooksrITest.IntegrationApp","platformName":"iOS","udid":"67840d8ffcb8b2e3d4cc26fa1808087cc2994d01","deviceName":"iPhone","wdaLocalPort":"8100"},{},{"desiredCapabilities":{"showIOSLog":true,"showXcodeLog":true,"platformVersion":"10.3","automationName":"XCUITest","bundleId":"com.facebooksrITest.IntegrationApp","platformName":"iOS","udid":"67840d8ffcb8b2e3d4cc26fa1808087cc2994d01","deviceName":"iPhone","wdaLocalPort":"8100"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1505817524244 (16:08:44 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.49.0) session
[Appium] Capabilities:
[Appium]   showIOSLog: true
[Appium]   showXcodeLog: true
[Appium]   platformVersion: '10.3'
[Appium]   automationName: 'XCUITest'
[Appium]   bundleId: 'com.facebooksrITest.IntegrationApp'
[Appium]   platformName: 'iOS'
[Appium]   udid: '67840d8ffcb8b2e3d4cc26fa1808087cc2994d01'
[Appium]   deviceName: 'iPhone'
[Appium]   wdaLocalPort: '8100'
[BaseDriver] Capability 'wdaLocalPort' changed from string ('8100') to integer (8100). This may cause unexpected behavior
[BaseDriver] Session created with session id: e067d363-4aca-4024-89ea-6024adc840fa
[debug] [XCUITest] Xcode version set to '8.3.2' (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to '10.3'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1505817524408 (16:08:44 GMT+0530 (IST))
[debug] [XCUITest] Available devices: 67840d8ffcb8b2e3d4cc26fa1808087cc2994d01
[debug] [XCUITest] Creating iDevice object with udid '67840d8ffcb8b2e3d4cc26fa1808087cc2994d01'
[XCUITest] Determining device to run tests on: udid: '67840d8ffcb8b2e3d4cc26fa1808087cc2994d01', real device: true
[debug] [BaseDriver] Event 'appConfigured' logged at 1505817525537 (16:08:45 GMT+0530 (IST))
[debug] [BaseDriver] Event 'resetStarted' logged at 1505817525537 (16:08:45 GMT+0530 (IST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event 'resetComplete' logged at 1505817525539 (16:08:45 GMT+0530 (IST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1505817526647 (16:08:46 GMT+0530 (IST))
[XCUITest] Setting up real 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'
[debug] [XCUITest] Capability 'useNewWDA' set to false, so trying to reuse currently running WDA instance at 'http://localhost:8100/'
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] WDA is not listening at 'http://localhost:8100/'. Rebuilding...
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1505817526900 (16:08:46 GMT+0530 (IST))
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing running processes 'xcodebuild.*67840d8ffcb8b2e3d4cc26fa1808087cc2994d01, iproxy 8100' for the device 67840d8ffcb8b2e3d4cc26fa1808087cc2994d01...
[debug] [XCUITest] 'pgrep -nif xcodebuild.*67840d8ffcb8b2e3d4cc26fa1808087cc2994d01' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] iproxy exited with code '0'
[XCUITest] Error starting iproxy: 'Cannot read property 'unref' of null'
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1505817531973 (16:08:51 GMT+0530 (IST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "Unable to start iproxy. Is it installed?". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Unable to start iproxy. Is it installed?". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
    at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:381: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 next] (/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)
    at process._tickCallback (internal/process/next_tick.js:109:7)
 Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Unable to start iproxy. Is it installed?". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
    at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:381: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 next] (/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)
    at process._tickCallback (internal/process/next_tick.js:109:7)
[debug] [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Unable to start iproxy. Is it installed?". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
    at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:381: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 next] (/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)
    at process._tickCallback (internal/process/next_tick.js:109:7)
[HTTP] <-- POST /wd/hub/session 500 17996 ms - 480 


Xcode xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=67840d8ffcb8b2e3d4cc26fa1808087cc2994d01' test command output

INPUNML310864:WebDriverAgent ssrihar$ pwd
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
INPUNML310864:WebDriverAgent ssrihar$ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=67840d8ffcb8b2e3d4cc26fa1808087cc2994d01' test
2017-09-19 16:27:26.189 xcodebuild[35598:3692966]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/ssrihar/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/086C9163-2385-42C8-9227-63CD3EDC75B6/Session-WebDriverAgentRunner-2017-09-19_162726-j7UrvZ.log
2017-09-19 16:27:26.190 xcodebuild[35598:3692930] [MT] IDETestOperationsObserverDebug: (93E0EE6D-A61B-4465-924C-8516BB51034F) Beginning test session WebDriverAgentRunner-93E0EE6D-A61B-4465-924C-8516BB51034F at 2017-09-19 16:27:26.190 with Xcode 8E2002 on target <DVTiOSDevice: 0x7fb3feccc630> {
		deviceSerialNumber:         FCDQK01NG5QQ
		identifier:                 67840d8ffcb8b2e3d4cc26fa1808087cc2994d01
		deviceClass:                iPhone
		deviceName:                 TestiPhone6plus
		deviceIdentifier:           67840d8ffcb8b2e3d4cc26fa1808087cc2994d01
		productVersion:             10.3.3
		buildVersion:               14G60
		deviceSoftwareVersion:      10.3.3 (14G60)
		deviceArchitecture:         arm64
		deviceTotalCapacity:        12002762752
		deviceAvailableCapacity:    8835588096
		deviceIsTransient:          NO
		ignored:                    NO
		deviceIsBusy:               NO
		deviceIsActivated:          YES
		deviceActivationState:      Activated
		isPasscodeLocked:           NO
		deviceType:                 <DVTDeviceType:0x7fb3fea764d0 Xcode.DeviceType.iPhone>
		supportedDeviceFamilies:    (
    1
)
		applications:              (null)
		provisioningProfiles:      (null)
		activityProgress:          -2
		activityTitle:             
		hasInternalSupport:        NO
		isSupportedOS:             YES
		developerDiskMountError:   (null)
(null)
	bootArgs:                  <unavailable>
		} (10.3.3 (14G60))
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

Write auxiliary files
write-file /Users/ssrihar/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Intermediates/WebDriverAgent.build/Debug-iphoneos/WebDriverAgentLib.build/WebDriverAgentLib-all-non-framework-target-headers.hmap

=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/1b/9kg8kqc95fv7s04f9k8yf4km5d69x2/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/ab1aa40a7dfad79631c5f6675db051bc/67840d8ffcb8b2e3d4cc26fa1808087cc2994d01/ManifestCache.plist
2017-09-19 16:27:34.114335+0530 XCTRunner[315:32451] Running tests...
2017-09-19 16:27:35.389838+0530 XCTRunner[315:32451] Continuing to run tests in the background with task ID 1
Test Suite 'All tests' started at 2017-09-19 16:27:35.548
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-09-19 16:27:35.550
Test Suite 'UITestingUITests' started at 2017-09-19 16:27:35.551
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.00s     Start Test at 2017-09-19 16:27:35.553
    t =     0.01s     Set Up
2017-09-19 16:27:35.593422+0530 XCTRunner[315:32451] Built at Sep 19 2017 15:00:22
2017-09-19 16:27:35.668961+0530 XCTRunner[315:32451] ServerURLHere->http://192.168.0.105:0<-ServerURLHere

I’m not able to understand where I’m mistaken ie either in setup or something else.

Require your noble inputs on this and help resolve this issue at earliest.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
ssskkprdcommented, Sep 19, 2017

@mykola-mokhnach : Thanks ! I was able to figure it out. iproxy was pointing wrongly. I’ve removed all such wrong links & removed it from PATH and freshly installed via npm install -g iproxy. Then it got fixed

0reactions
lock[bot]commented, Apr 23, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to launch WebDriverAgent because of xcodebuild failure
An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: ...
Read more >
Error: Unable to launch WebDriverAgent because of ...
Hi I am having this issue that when i try to use spy mobile feature on the IOS mobile phone, while installing the...
Read more >
Xcode 12.0.1 : Unable to launch WebDriverAgent because of ...
Xcode 12.0.1 : Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 #14796.
Read more >
Unable to launch WebDriverAgent because of xcodebuild failure
Run the below command to Open the WebDriverAgent using Xcode. open /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/ ...
Read more >
Appium error [resolved] - Unable to launch WebDriverAgent ...
Most of times, if you have setup ios for appium tests, you might get error “Unable to launch WebDriverAgent because of xcodebuild failure: ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found