Nimrod Gutman
Nimrod Gutman

Reputation: 1087

xcode build fails with error code 65 without indicative message

I'm experiencing weird behaviour with my iPhone CI job (running in TeamCity). Every once in a while our build fails without any indicative error in the build log. The build reaches the last stage of codesign validation and I get ** BUILD FAILED ** message immediately after.

These are the last lines of the log of a good and bad builds -

Bad Build
[15:00:56] :             [CodeSign]     /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Library/TeamCity/buildAgent/work/dc055fa257f562be/DerivedData/MyProject/Build/Products/AdHoc-iphoneos/MyProject.app
[15:00:58]W:     [Step 3/6] ** BUILD FAILED **

Good Build
[14:09:13] :             [CodeSign]     /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Library/TeamCity/buildAgent/work/dc055fa257f562be/DerivedData/MyProject/Build/Products/AdHoc-iphoneos/MyProject.app
[14:09:13] :     [Step 3/6] ** BUILD SUCCEEDED **

Because it's running in a CI I looked for user interaction problems (opening the keychain...etc') but usually xcodebuild spews the relevant errors.

Is there any other log I can dig into to find the cause of the build failures?

EDIT: Seems I had the same problem like build failed jenkins iOS no error.

Upvotes: 29

Views: 58475

Answers (6)

jbnunn
jbnunn

Reputation: 6355

My issue came up after updating to the latest version of Xcode. To resolve, I performed the following steps.

  1. Completely quit Xcode and the Simulator. I had a zombie Simulator process running that I found and closed through Activity Monitor. Be sure no processes for Xcode or Simulator are running.

  2. In Xcode, open the project found in the ios folder of your react-native project.

  3. Xcode may suggest some recommended updates to modules. I accepted their recommendations.

  4. Close Xcode, relaunch your react-native app

Upvotes: 0

Akash p
Akash p

Reputation: 67

For Xcode version 13

The following is what worked for me, this is aimed at Xcode version 13, hoping to be helpful

My React native project was cloned, i was able to run the app in android, but while running on iOS it showed error code 65.

After trying most of the solutions and failing, i got it fixed finally. This is what worked for me, and could be useful for some people hopefully.

Clone the project again(not necessary, just telling you what was done)

npm install

pod install (in iOS directory)

If Xcode shows error code 65, if there is legacy deprecation issue --> go to Xcode -->file --> workspace settings --> Check the box at the end of the window saying "do not show diagnostic issue about build system deprecation

run the project again

This is what fixed it for me.

Upvotes: 1

Mahesh Narwade
Mahesh Narwade

Reputation: 669

You need to remove platform ios - cordova platform rm ios, and then add platform - cordova platform add ios. now build ios - cordova build ios

Upvotes: 3

Rajusa
Rajusa

Reputation: 111

I hit this when updating to Xcode 8, in my case it was because I had set the PROVISIONING_PROFILE_SPECIFIER setting incorrectly

Upvotes: 2

Morris
Morris

Reputation: 613

I also had a similar problem, in my case it was caused by the fact I'm using both Xcode 7.2 and Xcode 6.4 side by side. When the simulator of Xcode 6.4 is open (iOS Simulator 8.4) and I try to start a test from the commandline using Xcode 7.2 I get this 65 error.

Eg. when iOS Simulator 8.4 is open:

# sudo xcode-select -s "/Applications/Xcode 7.2.app/Contents/Developer"
# xcodebuild test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -workspace "/path/to/MyWorkspace.xcworkspace" -scheme "MyProject" -destination "platform=iOS Simulator,name=iPhone 6,OS=9.2"
(cut)
** TEST FAILED **
# echo $?
65

Solution is to kill the simulator before starting the test:

# killall "iOS Simulator"
# killall "Simulator"

The process is called "iOS Simulator" for XCode 6.4 and earlier and called "Simulator" for later XCode versions.

Upvotes: 9

Nimrod Gutman
Nimrod Gutman

Reputation: 1087

Had the same problem as build failed jenkins iOS no error

tl;dr - CopyPNG failed because of two images with the same name.

Upvotes: 5

Related Questions