azure-pipelines-tasks: [BUG]: /usr/bin/xcodebuild failed with return code: 65

New issue checklist

Task name

Xcode

Task version

5.231.5

Issue Description

/usr/bin/xcodebuild failed with return code: 65 before build.

But locally build is successful. But locally build is successful. But locally build is successful.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Mac mini Apple M2 14.1.2 (23B92)

Relevant log output

2023-12-26T07:52:14.2445200Z (2 failures)
2023-12-26T07:52:14.6374690Z ##[error]Error: The process '/usr/bin/xcodebuild' failed with exit code 65
2023-12-26T07:52:14.6988300Z ##[section]Finishing: Xcode archive

Full task logs with system.debug enabled

No response

Repro steps

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (2 by maintainers)

Most upvoted comments

thanks for the reply @Valentin-Pommee-Macaw. I believe a co-worker has just identified our issue too - and it is with the escaping of spaces in the signing Identity name… so a little embarrassing here too!

Anyone having also this problem. We had a script that modified the capacitor project project for multiple tenants, but we forgot to replace the applicationIdentifier in the project.pbxproj file. Since the applicationIdentifier was wrong we got this error only in our build pipeline. However building on our local machine worked perfectly fine, hence threw quite some time into researching this issue since it was not really that self descriptive what is wrong. Hope this helps anyone

Hey @FauxObsolete, this is a bit embarassing, but i actually did make a mistake with my certificate and provisioning profile… resolved it by correctly re-generating new ones using the developer account i used to publish my app with from xcode.

I am also seeing this: The error occurs at the very start of compilation, however it possibly is a signing issue because if we turn signing off the compile continues. Pipeline builds that worked a few weeks ago now fail if we re-run them.

@eoinnorris This sounds strange; didn’t signing happen in the very last stage?

yes is is strange.

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:DA40344C-ACB5-4AE2-B404-1182E52988A0, OS:17.0.1, name:iPad (10th generation) }
{ platform:iOS Simulator, id:726CC9EA-5F92-4F24-8DFA-4F2A339C3B14, OS:17.2, name:iPad (10th generation) }
{ platform:iOS Simulator, id:9E396783-8F2B-485F-8EB0-43DB3E07AAD3, OS:17.0.1, name:iPad Air (5th generation) }
{ platform:iOS Simulator, id:EA3E14E6-16FC-4DF3-B6D8-1F35F09E1B81, OS:17.2, name:iPad Air (5th generation) }
{ platform:iOS Simulator, id:38B402A4-7518-4D0B-8BC1-B0F7C8037FAC, OS:17.0.1, name:iPad Pro (11-inch) (4th generation) }
{ platform:iOS Simulator, id:9E6D4867-E816-43EA-9CD3-56492E02D1EA, OS:17.2, name:iPad Pro (11-inch) (4th generation) }
{ platform:iOS Simulator, id:51CD280D-E0EB-4583-B21B-24FA6608C729, OS:17.0.1, name:iPad Pro (12.9-inch) (6th generation) }
{ platform:iOS Simulator, id:5DC953A8-0AA4-4153-9BAE-4C8995BCEDDB, OS:17.2, name:iPad Pro (12.9-inch) (6th generation) }
{ platform:iOS Simulator, id:D5AFB2DE-B3D2-401F-982A-A046CE56464C, OS:17.0.1, name:iPad mini (6th generation) }
{ platform:iOS Simulator, id:E33ADD5B-1FC4-44FA-A4FF-A8CB5D7F7AF0, OS:17.2, name:iPad mini (6th generation) }
{ platform:iOS Simulator, id:3CD78D7C-901A-41E4-9275-754B81B15105, OS:17.0.1, name:iPhone 14 }
{ platform:iOS Simulator, id:59B12573-9054-4816-BB58-9377F9400F1C, OS:17.2, name:iPhone 14 }
{ platform:iOS Simulator, id:2E807556-B6A2-44D7-B6E7-FDD4C481BA16, OS:17.0.1, name:iPhone 14 Plus }
{ platform:iOS Simulator, id:912FE505-2509-4A37-A16C-A26FBB40B3C0, OS:17.2, name:iPhone 14 Plus }
{ platform:iOS Simulator, id:43CFCB94-698F-4D2B-ABDC-E3B8BA97A8F5, OS:17.0.1, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:3AADBC2A-153E-4B0A-9A78-9943D08688BF, OS:17.2, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:01391579-D9A3-4C9C-8483-82DA9D2E4758, OS:17.0.1, name:iPhone 14 Pro Max }
{ platform:iOS Simulator, id:6AA76502-DA74-40ED-9C54-5F9B1E270FE6, OS:17.2, name:iPhone 14 Pro Max }
{ platform:iOS Simulator, id:D52D06F0-70A3-44E8-BDA9-7C895BE96799, OS:17.0.1, name:iPhone 15 }
{ platform:iOS Simulator, id:C558DB64-6D1B-439C-A302-8B07E81570F2, OS:17.2, name:iPhone 15 }
{ platform:iOS Simulator, id:E8535C9F-4708-4C56-84C2-70678668DC5E, OS:17.0.1, name:iPhone 15 Plus }
{ platform:iOS Simulator, id:0D39692E-D81E-4B5C-95C3-A80D11065A3E, OS:17.2, name:iPhone 15 Plus }
{ platform:iOS Simulator, id:AD62461A-EF69-44A3-A518-A11E088DBC4E, OS:17.0.1, name:iPhone 15 Pro }
{ platform:iOS Simulator, id:637EDCC8-73B3-420D-836A-A60DDDA9C02B, OS:17.2, name:iPhone 15 Pro }
{ platform:iOS Simulator, id:9D384CAE-E0EB-454D-BA44-BFF2034A17B2, OS:17.0.1, name:iPhone 15 Pro Max }
{ platform:iOS Simulator, id:E14D5F90-2BCE-4197-A43D-7CC6AF84BE66, OS:17.2, name:iPhone 15 Pro Max }
{ platform:iOS Simulator, id:CB1E153B-77E4-4D0D-998B-0AF4A5D06F81, OS:17.0.1, name:iPhone SE (3rd generation) }
{ platform:iOS Simulator, id:33E68A9F-2C2B-4E76-A5C3-040D4C7CE107, OS:17.2, name:iPhone SE (3rd generation) }
** BUILD FAILED **

##[error]Error: /usr/bin/xcodebuild failed with return code: 65

I am still having the same issue… I am not very familiar with apple/xcode development, my project uses Ionic/capacitor… please help! (certificates are all valid, I checked that)

This is my release pipeline: image

Fixed. We did have some SwiftUI previews in one of our kit and that can apparently cause issues if Swift 5.9 is not installed on the build machines.

I am also seeing this: The error occurs at the very start of compilation, however it possibly is a signing issue because if we turn signing off the compile continues. Pipeline builds that worked a few weeks ago now fail if we re-run them.

We’re also seeing the same issue, adding to @eoinnorris that not only the commit it’s exactly the same (including the app and yaml pipeline code), but also the agent OS and image versions are exactly the same

Operating System
macOS
13.6.3
22G436
Runner Image
Image: macos-13
Version: 20240114.1

Till the 12th of January worked and now starting from the 19th of January is throwing ##[error]Error: /usr/bin/xcodebuild failed with return code: 65 Also if it can help, yes the error appears at the “start of compilation”, but still after 4/5 minutes the task started to run P.s. we double checked that certificate and provision profiles are still valid already

Apologies for the confusion, after extensive debugging, we figure the issue out, devs pointed some swift packages to main branch instead of using a release version, all works good now, thanks!

In your case, there does seem to be an error, but it’s only displaying ‘/usr/bin/xcodebuild’ failed with exit code 65 without providing specific error information. Is there a way we can enhance the details of this error? @kirill-ivlev

I am also seeing this:

The error occurs at the very start of compilation, however it possibly is a signing issue because if we turn signing off the compile continues. Pipeline builds that worked a few weeks ago now fail if we re-run them.

We’re also seeing the same issue, adding to @eoinnorris that not only the commit it’s exactly the same (including the app and yaml pipeline code), but also the agent OS and image versions are exactly the same

Operating System
macOS
13.6.3
22G436
Runner Image
Image: macos-13
Version: 20240114.1

Till the 12th of January worked and now starting from the 19th of January is throwing ##[error]Error: /usr/bin/xcodebuild failed with return code: 65

Also if it can help, yes the error appears at the “start of compilation”, but still after 4/5 minutes the task started to run

P.s. we double checked that certificate and provision profiles are still valid already