Xcodebuild exited with code '65' and signal 'null'


#1

I have gone through multiple links but could not find a single possible solution.
I am trying to run appium 1.7.2
iOS version - 11.0

17:14:05:171 [Local Thread null] INFO - com.wipro.listener.Reporter - Setting the system info key map.

17:14:05:312 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - All testing parameters are present in the testng xml file.

17:14:05:313 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - Loaded iOS Object Repository to the driver.

17:14:05:375 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - Found a free port, 52347

[Appium] Welcome to Appium v1.7.2

[Appium] Non-default server args:

[Appium] port: 17687

[Appium] bootstrapPort: 52347

[Appium] loglevel: info:info

[Appium] Appium REST http interface listener started on 0.0.0.0:17687

[HTTP] --> GET /wd/hub/status {}

[HTTP] <-- GET /wd/hub/status 200 16 ms - 72

17:14:08:517 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - Setting up the iOS logs.

17:14:08:518 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - Found a free port, 52362

17:14:08:522 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - Is XCUITTEst needed is: true

17:14:08:522 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - Setting automation name as ‘XCuiTest’, since the iOS version is above 9.3

17:14:08:523 [Local Thread null] INFO - com.wipro.toolLibrary.AppiumLibrary - Found a free port, 52363

[HTTP] --> GET /wd/hub/status {}

[HTTP] <-- GET /wd/hub/status 200 14 ms - 72

[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“webkitResponseTimeout”:50000,“appiumVersion”:“1.7.1”,“bundleId”:“com.yourcompany.Virtual-Office”,“autoDismissAlerts”:false,“startIWDP”:true,“deviceName”:“iPhone6Plus”,“platform”:“IOS”,“wdaLocalPort”:52363,“acceptSslCerts”:true,“showXcodeLog”:false,“webkitDebugProxyPort”:52362,“newCommandTimeout”:“900”,“platformVersion”:“11.1.2”,“automationName”:“XCuiTest”,“autoWebview”:false,“udid”:“3193b4322e2c823af6b5b8c57e8ff6532db3e658”,“platformName”:“iOS”,“autoAcceptAlerts”:true},“requiredCapabilities”:{},“capabilities”:{“desiredCapabilities”:{“webkitResponseTimeout”:50000,“appiumVersion”:“1.7.1”,“bundleId”:“com.yourcompany.Virtual-Office”,“autoDismissAlerts”:false,“startIWDP”:true,“deviceName”:“iPhone6Plus”,“platform”:“IOS”,“wdaLocalPort”:52363,“acceptSslCerts”:true,“showXcodeLog”:false,“webkitDebugProxyPort”:52362,“newCommandTimeout”:“900”,“platformVersion”:“11.1.2”,“automationName”:“XCuiTest”,“autoWebview”:false,“udid”:“3193b4322e2c823af6b5b8c57e8ff6532db3e658”,"platfo

[Appium] Merged W3C capabilities {“desiredCapabilities”:{“webkitResponseTimeout”… into desiredCapabilities object {“webkitResponseTimeout”:50000,“appiumVersion”:…

[Appium] Creating new XCUITestDriver (v2.64.0) session

[Appium] Capabilities:

[Appium] webkitResponseTimeout: 50000

[Appium] appiumVersion: 1.7.1

[Appium] bundleId: com.yourcompany.Virtual-Office

[Appium] autoDismissAlerts: false

[Appium] startIWDP: true

[Appium] deviceName: iPhone6Plus

[Appium] platform: IOS

[Appium] wdaLocalPort: 52363

[Appium] acceptSslCerts: true

[Appium] showXcodeLog: false

[Appium] webkitDebugProxyPort: 52362

[Appium] newCommandTimeout: 900

[Appium] platformVersion: 11.1.2

[Appium] automationName: XCuiTest

[Appium] autoWebview: false

[Appium] udid: 3193b4322e2c823af6b5b8c57e8ff6532db3e658

[Appium] platformName: iOS

[Appium] autoAcceptAlerts: true

[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘900’) to integer (900). This may cause unexpected behavior

[BaseDriver] The following capabilities were provided, but are not recognized by appium: appiumVersion, platform, acceptSslCerts.

[XCUITest] The capabilities ‘autoAcceptAlerts’ and ‘autoDismissAlerts’ do not work for XCUITest-based tests. Please adjust your alert handling accordingly.

[BaseDriver] Session created with session id: 5453ae1d-862a-460a-bef4-67890437b274

[XCUITest] Determining device to run tests on: udid: ‘3193b4322e2c823af6b5b8c57e8ff6532db3e658’, real device: true

[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’

[XCUITest] Launching WebDriverAgent on the device

[Xcode] 2018-04-13 17:14:23.219 xcodebuild[64616:1979589] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “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}

[Xcode]

[Xcode]

[Xcode] Testing failed:

[Xcode] Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)

[Xcode] ** TEST EXECUTE FAILED **

[Xcode]

[Xcode]

[Xcode] dyld: Library not loaded: @rpath/XCTest.framework/XCTest

[Xcode] Referenced from: /var/containers/Bundle/Application/22C2C69E-235D-4F6E-BB8D-C910575115CD/WebDriverAgentRunner-Runner.app/WebDriverAgentRunner-Runner

[Xcode] Reason: no suitable image found. Did find:

[Xcode] /private/var/containers/Bundle/Application/22C2C69E-235D-4F6E-BB8D-C910575115CD/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of ‘/private/var/containers/Bundle/Application/22C2C69E-235D-4F6E-BB8D-C910575115CD/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest’

[Xcode] /private/var/containers/Bundle/Application/22C2C69E-235D-4F6E-BB8D-C910575115CD/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of ‘/private/var/containers/Bundle/Application/22C2C69E-235D-4F6E-BB8D-C910575115CD/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest’

[Xcode]

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’

[XCUITest] Shutting down sub-processes

[XCUITest] Shutting down iproxy process (pid 64614)

[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 65”. 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$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375: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 <anonymous>

Error: Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 65”. 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$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375: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 <anonymous>

[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 65”. Make sure you follow the tutorial at https://github.com/appium/appium-xcu


#2

Did you try the suggestions given in that error? The steps from that link normally solve this issue for me. Also restarting the phone, reinstalling app, restarting appium, deleting web driver from device can help.


#3

Yes I have tried all of them including removing expired certificates from keychain, deleting web driver, reinstalling app , restarting phone. This issue is coming over multiple systems.


#4

I normally have to follow the steps for the basic manual configuration at this link https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. You should try that if you haven’t