Xcodebuild failed with code 65 (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 32.63 seconds

Can you please run Appium Doctor and let me know what it says regarding your Carthage installation? I think we’re on to something here…

Appium Doctor shows:

info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage

I also tried manually moving the Carthage folder to the WebDriverAgent folder. When I am in /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/, the ls output shows:

.npmignore
.travis.yml
CONTRIBUTING.md
Cartfile
Cartfile.resolved
Inspector/
LICENSE
PATENTS
PrivateHeaders/
README.md
Resources/
Scripts/
WebDriverAgent.xcodeproj/
WebDriverAgentLib/
WebDriverAgentRunner/
WebDriverAgentTests/
WebDriverAgentUSBClient/
carthage/
myconfig.xcconfig

My .xcconfig file looks identical to @chiwhitesox56’s, substituting our DEVELOPMENT_TEAM’s value.

I still see the error:

[Xcode] 	Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
	Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'

When I open the log file from the output, I see the following:

12:42:02.770 xcodebuild[17827:6437112] Beginning test session WebDriverAgentRunner-93092938-1E1E-428D-85A5-D43C2ACCBEE2 at 2017-01-11 12:42:02.768 with Xcode 8C38 on target <DVTiOSDevice: 0x7f8cbdaaf930> {
		deviceSerialNumber:         CCQJL6X4F4K4
		identifier:                 <UDID>
		deviceClass:                iPod
		deviceName:                 Appname ipod
		deviceIdentifier:           <UDID>
		productVersion:             9.3.2
		buildVersion:               13F69
		deviceSoftwareVersion:      9.3.2 (13F69)
		deviceArchitecture:         armv7f
		deviceTotalCapacity:        29255876608
		deviceAvailableCapacity:    22654820352
		deviceIsTransient:          NO
		ignored:                    NO
		deviceIsBusy:               NO
		deviceIsActivated:          YES
		deviceActivationState:      Activated
		deviceType:                 <DVTDeviceType:0x7f8cbd4ee790 Xcode.DeviceType.iPhone>
		supportedDeviceFamilies:    (
    1
)
		applications:              (null)
		provisioningProfiles:      (null)
		activityProgress:          -2
		activityTitle:             
		hasInternalSupport:        NO
		isSupportedOS:             YES
		developerDiskMountError:   (null)
(null)
	} (9.3.2 (13F69))
12:42:02.771 xcodebuild[17827:6437112] 	/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
build
test
-project
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
-scheme
WebDriverAgentRunner
-destination
id=<UDID>
-configuration
Debug
12:42:02.771 xcodebuild[17827:6437112] Launching with Xcode.IDEFoundation.Launcher.PosixSpawn
12:42:02.772 xcodebuild[17827:6437112] Initializing test infrastructure.
12:42:03.011 xcodebuild[17827:6437112] Test operation failure: Test operation was canceled.
12:42:03.011 xcodebuild[17827:6437112] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled." UserInfo={NSLocalizedDescription=Test operation was canceled.} didCancel: 1

I do not understand why it says that the provisioning profile is null? I confirmed with a dev that the device is signed with a provisioning prfile, and also manually copied the list of Provisioning Profiles to ~/Library/MobileDevice/Provisioning Profiles

Thanks, @TheChell

I do think you’ll want Carthage to be in the WebDriverAgent folder, but it looks like we need to figure out how to tell Appium to look there for Carthage rather than in /usr/local/bin/. I currently do not know how to instruct Appium to look in the WebDriverAgent folder for Carthage rather than in /usr/local/bin/.

I’ll look further into this. Maybe I’m wrong, but it does make sense considering that you, @crujzo and I are all getting code 65 errors and none of us
A) have Carthage installed in the WebDriverAgent folder
and/or
B) have Appium configured to look for Carthage in the WebDriverAgent folder

If this is not the cause of our problems, I’ll truly be at a loss. I’ve been stuck on this for almost a month now and nothing else I’ve tried is getting rid of this error.

I’ll also note that when I run which carthage, the output is /usr/local/bin/carthage

I’m seeing this too. WebDriverAgent gets installed on the simulator, opens, and then fails with code 65 without opening my app. My app does get installed though…

Were you able to resolve this issue?

Edit: Never mind - I resolved the issue: Xcodebuild failed with code 65 (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 32.63 seconds

@TheChell @crujzo

I can finally get the app to run on the simulator! (I’ll get to real devices next) I was able to do it with Carthage installed at /usr/local/bin/carthage - I did not have to move it to the WebDriverAgent folder.

First I reinstalled appium-xcuitest-driver:
npm install appium-xcuitest-driver

I noticed that the app was trying to open was wasn’t quite getting there. Turns out there was a miscommunication over the bundle ID. I updated that and now I can run the app on the simulator. So definitely double check bundle id, and make sure you’re pointing to .app / .ipa as appropriate. (Just adding this because it’s a common mistake for me.)

@chiwhitesox56, glad to hear you’ve made some progress and thank you for sharing your steps. I don’t believe my error is quite the same, however I did try uninstalling and reinstalling everything appium related ha.

At this point, I am only trying to successfully build the WebDriverAgent project in Xcode. I have gotten the errors down to two:

I still cannot figure out how to get rid of that signing error for WebDriverAgentRunner. I have the ProjectSettings.xcconfig file set just under the WebDriverAgent itself. And that xcconfig file is targeting both WebDriverAgentLib and WebDriverAgentRunner.

1 Like
  1. Make sure you are signed in with developer account in Xcode.
  2. Navidate to the folder </path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/
  3. Open the WebDriverAgent.xcodeproj project in Xcode.
  4. Change the bunlder identifier for WebDriverAgentLib, WebDriverAgentRunner from com.facebook.Webdriver** to your choice so you can sign it with your provisioning profile.
  5. Build the project for WebDriverAgentLib, WebDriverAgentRunner and IntegrationApp targets.
  6. On the terminal, navigate to </path/to/appium>/node_modules/appium-xcuitest-driver/WebDriverAgent/ and run xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=’ test
  7. Last line in the logs should read Listening on USB.
  8. Now run your appium scripts.

Refer to http://stackoverflow.com/a/41628500/4066289

Reinstall appium
npm install -g [email protected]
move to usr/local/lib/node_modules/appium/node_modules/
run sudo npm install [email protected]
Replace [email protected] which will present inside node-modules with the folder present inside the appium.
open appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj and run the commands
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh -d

In xcode sign all the three module

  1. WebDrivetAgentLib
    2.WebDriverAgentRunner
    3.IntegrationApp

After above steps run appium on terminal and start your script

ayudaaaaa mi correo es : [email protected]

I’m sorry @vanessa, but I don’t understand your question. I’ll be happy to help if I can. Can you please clarify?

Hi ,

I did the settings as mentioned above but while running the test case, I am getting below error:

Xcode]
Testing failed:
No signing certificate “iOS Development” found: No “iOS Development” signing certificate matching team ID “XXXX” with a private key was found.

[Xcode] ** TEST FAILED **

The following build commands failed:
Check dependencies
(1 failure)

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[XCUITest] Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:332:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:194:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:332:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:194:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down Logger process (pid 21868)
[XCUITest] System log exited with code ‘0’
[debug] [XCUITest] Running ios real device reset flow
[debug] [XCUITest] Resetting simulator
[debug] [iOSLog] Stopping iOS log capture
(node:15883) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 31): Error: Can’t stop process; it’s not currently running
[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:332:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:194:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

You can find your Team ID using your developer account. Sign in to Sign In - Apple, and click Membership in the sidebar. Your Team ID appears in the Membership Information section under the team name.

Hi,
I still get the error (After setting all provisioning profiles), but not consistently.
Ican run 20 scenarios without any problem, and then unexpectedly i getting the error.
Only after restarting device and the mac i works.
Does anyone experienced same issue?
Does anyone has a solution?

Environment:
Appium 1.6.5
Real IOS devices IPhone 6.
Java Client 5BETA8
Thanks!

1 Like

Hi colleagues,
I have met the same issue. After a number of tests, Appium fails to start testing with code 65. My testing setup includes restarting of the Appium every time the test scenario is started. Also, I have tried a number of devices - iPhone 5s and two different iPhone 6 Plus. The issue reproduces for all of them. By the way, for iPhone 5s it is much easier is to reproduce the issue.

Edited:
Does anyone know if that issue has the related GitHub item?

1 Like

@iharT
Did you find any workaround?
Thanks!

Yes ,I am also facing same issue, after restarting device it is working fine.

@JAYESH_BHOR - Thanks you for your response.
I tried to restart the devices and it doesn’t work for me.
I even try manually and using idevicediagnostics restart and it doesn’t work.
Any other options?

Thanks a lot,
Eitan.

Error code 65 is the signing issue.you need to sign it properly with the same developer account (Certificate and profile) which is used to build the app.

Yes, My solution is work around sometime it will work but as jitu1888 mentioned try signing with deveoper account.