Xcodebuild exited with code '70' and signal 'null'- iOS 13.5.1

I have installed Appium 1.17.0 for iOS 13.5.1
Xcode 11.5, macOS 10.15.5

I am getting the below in my iOSDriver exception:

org.openqa.selenium.WebDriverException: It is impossible to create a new session because ‘createSession’ which takes HttpClient, InputStream and long was not found or it is not accessible

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’

System info: host: ‘HOSTNAME’, ip: ‘IP’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.5’, java.version: ‘1.8.0_191’

Driver info: driver.version: IOSDriver

Console logs:

35m[WD Proxy]e[39m Got response with unknown status: {“code”:“ECONNRESET”}
e[35m[WebDriverAgent]e[39m xcodebuild exited with code ‘70’ and signal ‘null’
e[35m[WebDriverAgent]e[39m Launching WebDriverAgent on the device
e[35m[WebDriverAgent]e[39m Fetching dependencies
e[35m[WebDriverAgent]e[39m Dependencies up-to-date
*[debug] e[35m[WebDriverAgent]e[39m Killing running processes 'xcodebuild.UDID’ for the device UDID
*[debug] e[35m[WebDriverAgent]e[39m 'pgrep -if xcodebuild.UDID’ didn’t detect any matching processes. Return code: 1

Any suggestions in resolving the issue will be helpful.

Thanks in advance.

I did a quick search on the above and found a SO thread with a bunch of possible answers:

My Builds are successful but egetting console error
[35m[Xcode]e[39m xcodebuild: error: Failed to build project WebDriverAgent with scheme WebDriverAgentRunner.
alongwith exit code 70 error

@Aleksei: Can you please help!!!

Describe how you build WDA. Maybe this will help us to find your problem.

E.g.

  1. uninstalled appium with command ???
  2. instalelled appium with …
  3. navigated to x folder
  4. open x folder in terminal
  5. run build project commands y
  6. open wda project file … with xCode
  7. add my signature to …
  8. build wda as ?
  9. now close xcode
  10. i am starting appium during test how ?
  11. i am open driver with capabilities ?
  12. real device or simulator?

Thanks for responding.

Please find the details below:

  1. Uninstalled appium and other installed configurations through terminal/command

  2. Installed appium 1.17.1 through terminal

  3. Navigated /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/

  4. opened in terminal

  5. Created sh ./Scripts/bootstrap.sh -d

  6. Launched the WDA proj file in XCode from the path mentioned in 3

  7. Added the profiles and certificates.

  8. Build the WDA. Build succeeded

  9. Closed xCode

  10. Appium is starting the automation scripts and at http://127.0.0.1:4723

  11. cap.setCapability(MobileCapabilityType. UDID , UDID );
    cap.setCapability(MobileCapabilityType. PLATFORM_NAME , PLATFORM_NAME );
    cap.setCapability(MobileCapabilityType. PLATFORM_VERSION , PLATFORM_VERSION );
    // cap.setCapability(“autoWebview”, true);
    cap.setCapability(MobileCapabilityType. AUTOMATION_NAME , AutomationName. IOS_XCUI_TEST );
    cap.setCapability(“startIWDP”, true );
    cap.setCapability(“useNewWDA”, true );
    // cap.setCapability(“webDriverAgentUrl”, “http://localhost:8100”);
    cap.setCapability(“shouldUseTestManagerForVisibilityDetection”, true );
    cap.setCapability(“locationContextEnabled”, true );
    cap.setCapability(“webkitResponseTimeout”, 30000);
    cap.setCapability(“newCommandTimeout”, 30000);
    cap.setCapability(“showXcodeLog”, true );
    //cap.setCapability(“showIOSLog”, true);
    cap.setCapability(“bundleId”, “BundleId”);
    cap.setCapability(“autoWebView”, true );

  12. Real device

Exception 1: On debugging, Getting exception in the IOSDriver for HTTPClient

org.openqa.selenium.WebDriverException: It is impossible to create a new session because ‘createSession’ which takes HttpClient, InputStream and long was not found or it is not accessible

driver = new IOSDriver( new URL(“http://127.0.0.1:4723/wd/hub”), cap);

iosDriver = (IOSDriver) driver ;

Exception 2:
[39m Connection was refused to port 8100
e[35m[WD Proxy]e[39m Got response with unknown status: {“code”:“ECONNRESET”}

m WDA is not listening at ‘http://127.0.0.1:8100/

Exception 3:
[debug] e[35m[W3C]e[39m xcodebuild: error: Failed to build project WebDriverAgent with scheme WebDriverAgentRunner.

Although build the project with WebDriverAgentRunner, WebDriverAgentLib, still getting this exception

Sometimes, getting below
e[35m[Xcode]e[39m WriteAuxiliaryFile /Users/UserName/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphoneos/WebDriverAgentLib.build/WebDriverAgentLib-all-non-framework-target-headers.hmap (in target ‘WebDriverAgentLib’ from project ‘WebDriverAgent’)

Let me know if any other details are required.

  1. what commands appium uninstalled and installed?
  2. Build the WDA with xCode. How? e.g. i use build target ‘WebDriverRunner’ for ‘Generic iOS device’
  3. try latest appium 1.18.beta
  4. try delete xCode derivedData folder data before build “WDA” -> /Users/UserName/Library/Developer/Xcode/DerivedData/
  5. try clean build folder with xCode menu before build “WDA”
  1. npm uninstall -g appium and npm install -g appium@beta
  2. Build WDA with Xcode. build target ‘WebDriverRunner’ for ‘Generic iOS device’
  3. Removed installed appium and Installed beta 1.18.0-beta, created Resources/WebDriverAgent.Bundle, ran bootstrap.sh command. Dependencies installed.
  4. Deleted the derivedData folder
  5. Opened Xcode and configured WDA
  6. Cleaned build folder. Build WDA
  7. Build WDA with Generic iOS device

No luck. Same issue!!!
e[35m[Xcode]e[39m xcodebuild: error: Failed to build project WebDriverAgent with scheme WebDriverAgentRunner.
e[35m[Xcode]e[39m Reason: Cannot test target “WebDriverAgentRunner” on “Mobility”: Logic Testing Unavailable Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator.
e[35m[Xcode]e[39m
e[35m[WebDriverAgent]e[39m xcodebuild exited with code ‘70’ and signal ‘null’

after you build WDA in xCode in “Users/UserName/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Build/Products/Debug-iphoneos” you see “WebDriverAgentRunner-Runner.app” is it?

The Runner.app is not present

This means you did not build it.

Once again in xCode open wda. Set target webdriverrunner for general ios device and push build button.

Done that but .app is not generating

Ran
xcodebuild build test -project /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=‘UDID’ -configuration Debug

BUILD SUCCEEDED but
xcodebuild: error: Failed to build project WebDriverAgent with scheme WebDriverAgentRunner.

run manually in xCode!


result should be:
image

Built manually. Did not work !!!

What did not work? No app file = you did not build successfully.

build successful, but no app

you build wrong target.

wrong target as in? I am building correct WDA

paste screenshot of xCode you building