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

Hello I am having issues in launching ios real device for testing.

My xcode version: 11.2.1 (11B500) Appium Version : 1.13.0 (1.13.0.20190505.6)

These are my capabilities:

    deviceSerialNumber:         F71SVVQ2HG7F
[Xcode]         identifier:                 bfda036179b938524f01eff8c673de3388a07fcc
[Xcode]         deviceClass:                iPhone
[Xcode]         deviceName:                 iPhone 7
[Xcode]         deviceIdentifier:           bfda036179b938524f01eff8c673de3388a07fcc
[Xcode]         productVersion:             13.1.1
[Xcode]         buildVersion:               17A854
[Xcode]         deviceSoftwareVersion:      13.1.1 (17A854)
[Xcode]         deviceArchitecture:         arm64
[Xcode]         deviceTotalCapacity:        26495004672
[Xcode]         deviceAvailableCapacity:    9949319168
[Xcode]         deviceIsTransient:          NO
[Xcode]         ignored:                    NO
[Xcode]         deviceIsBusy:               NO
[Xcode]         deviceIsPaired:             YES
[Xcode]         deviceIsActivated:          YES
[Xcode]         deviceActivationState:      Activated
[Xcode]         isPasscodeLocked:           NO
[Xcode]         deviceType:                 
[Xcode]         supportedDeviceFamilies:    (
[Xcode]     1
[Xcode] )
[Xcode]         applications:              (null)
[Xcode]         provisioningProfiles:      (null)
[Xcode]         hasInternalSupport:        NO
[Xcode]         hasWritableSystem:         NO
[Xcode]         isSupportedOS:             YES
[Xcode]         bootArgs:                  (null)
[Xcode]         nextBootArgs:              (null)
[Xcode]         connected:                 YES
[Xcode]         isWirelessEnabled:         NO
[Xcode]         connectionType:            direct
[Xcode]         hostname:                  iPhone-7.local.
[Xcode]         bonjourServiceName:        d0:c5:f3:d7:01:46@fe80::d2c5:f3ff:fed7:146._apple-mobdev2._tcp.local.
[Xcode]         activeProxiedDevice:       (null)
[Xcode]         } (13.1.1 (17A854))

This says xcode needs provisioning profile whereas I have set the certificates and profiles in the xode...

[Xcode] Testing failed:
[Xcode]     "WebDriverAgentRunner" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor.
[Xcode]     No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "BNL4VQ2576" with a private key was found.
[Xcode]     WebDriverAgentRunner:
[Xcode]         WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying error: The operation couldn’t be completed. No such file or directory)))




[Xcode] ** TEST EXECUTE FAILED **
[Xcode] 
[Xcode] 
[Xcode] Testing started on 'iPhone 7'
[Xcode] 
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing running processes 'xcodebuild.*bfda036179b938524f01eff8c673de3388a07fcc, iproxy 8100' for the device bfda036179b938524f01eff8c673de3388a07fcc...
[XCUITest] 'pgrep -nif xcodebuild.*bfda036179b938524f01eff8c673de3388a07fcc' didn't detect any matching processes. Return code: 1

This says the folder is not present. I manually opened the directory and there is no folder there. I don't know how to get that folder.

[Xcode] 2019-11-22 16:17:12.722 xcodebuild[37042:259128] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/ahmsam/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fdfc6b5e4c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}


Solution 1:[1]

  1. You need to setup WDA by following Full Manual configuration in http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/#full-manual-configuration (If you skipped any of the steps, WDA won't work)
  2. Update the product bundle identifier with the custom one you added com.companyName.WebDriverAgentRunner
  3. open WebDriverAgent.xcodeproj from /path/where/installed/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent in Xcode
  4. Project -> Build

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dee Fun