fastlane gym failed with "** ARCHIVE FAILED **" error message (exit status 65)

It is difficult to find out the issue from the above error message alone, as the exit code 65 is used as a general xcodebuild error code. Hence there could be many reasons why the build failed at the archive step. 

You can try the following steps to troubleshoot this problem.  

  1. Check your Code Signing setting
  2. Check your environment variables. (For example: Build Number) If the build succeeds on your local machine but fails in the CI environment, there could be environment variables defined on the local machine, but not made available to builds on CircleCI, causing the build to fail.
  3. Check fastlane's log for more information about why the fastlane command failed. The log may contain details about the root cause of the error, for instance missing provisioning profiles. The log path is printed in the output of the fastlane command, for example: /Users/distiller/driver-application/buildlogs/gym/DriverApplication-DriverApplication.log You could either SSH into a rebuild to access the log or upload the file as an artifact.
  4. Check if Xcode SDK version should be defined in the gym configuration in the Fastfile
      sdk: "iphoneos11.4"

(Setting the sdk option results in the -sdk argument being specified in the xcodebuild command that fastlane uses)



Was this article helpful?
6 out of 29 found this helpful



Article is closed for comments.