Archive failed error exit status 65

** ARCHIVE FAILED ** — Exit Status 65 — Here we go again So recently, I was working on a project that involved Codemagic. While working on my project, I ran into the error that I’ve not only seen before, but that I’ve wrote an article on how to resolve it. So I’ve followed […]

Содержание

  1. ** ARCHIVE FAILED ** — Exit Status 65 — Here we go again
  2. Problem Stament
  3. Details
  4. Solution
  5. Archive failed, error: exit status 65 #127
  6. Comments
  7. ** ARCHIVE FAILED ** The following build commands failed: CodeSign /Users/ — Exit Status 65
  8. Problem Statement
  9. Solution Roadmap
  10. General
  11. Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…
  12. Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…
  13. Running Locally
  14. Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…
  15. Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…
  16. Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…
  17. Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…
  18. Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…
  19. Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…
  20. Runtime error archiving · Issue #1849 · fastlane/fastlane
  21. You can’t perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
  22. How did I fix my issue?
  23. Resources & References

** ARCHIVE FAILED ** — Exit Status 65 — Here we go again

So recently, I was working on a project that involved Codemagic.

While working on my project, I ran into the error that I’ve not only seen before, but that I’ve wrote an article on how to resolve it. So I’ve followed my own article and was very surprised to discover that none of the solutions worked for me.

Eventually, I was able to find a solution, hence I’m writing this article and hope that if previous article didn’t help you, this one might.

First thing first, in my previous article I didn’t mention one very small and simple solution that I think is worth mentioning.

If you are running your build on a CI build machine and you are using pods in your project, don’t forget to run pod install.

As it turns out, you can see the archived failed error if you are using pods in your project, but forget to install them. So something simple like the following might save you tons of time:

The problem I had, was a little bit more complex than that though.

Problem Stament

My problem statement was actually quite similar to the one I had before. The only difference was that now I was using Codemagic to run my jobs and that the error message was a bit different.

There were an error message raised during the match step, but it didn’t cause a failure in that step:

Instead, the pipeline failed while running gym, with the following error message:

Please note, that the following solution will work for you if you’re:

  • Using Codemagic for your iOS apps
  • Using Fastlane, specifically running the match command

Now, the solution might be helpful to you if you’re not using the above, but I can’t guarantee that since this solution is very specific to the platform.

Details

I’m going to share some details on my project setup and why the problem occurred here, so feel free to skip this part if you want to go straight to the solution.

As I already mentioned, the problem statement was very similar to the one in previous article. However, in this project I had:

  • An iOS project that is hosted at Gitlab
  • Used Fastlane to automate testing, building, code signing and deployments
  • Used Codemagic as a PaaS provider for iOS builds

When I ran into the issue, I already had tested and working Fastlane actions, and already had some experience writing Codemagic workflows (like for running unit and UI tests). However, I hadn’t done any code signing yet.

And the reason I’m mentioning this is because Codemagic has documentation on how to code sign your iOS apps, but none of them seem to involve Fastlane match (which I used):

The thing is, I already had a tested solution to code sign my app using match. Following Codemagic documentation meant that I would have to change a lot of my current configuration as well as storing information I don’t want to in my Codemagic workflow. So I started looking for a solution that would let me keep using match while also fixing the error.

Now, there are several things we should know in order to fix this error.

First, If we look at match documentation, there is a keychain_name option available to specify the keychain in which the certificates should be imported.

Fun fact, is that this option has a default value of login.keychain . Which worked perfectly for us before.

So the reason we are getting this error is that we are trying to import the certificates to the default keychain ( login.keychain ), but we are unable to due to the absence of the keychain password.

Now, where do we get the password? Spoiler alert, for the default keychain ( login.keychain ) — we can’t! At least I couldn’t find the way to do so.

And here is when, another important piece comes into play…

Codemagic is using their own keychain utility. This keychain utility is used to manage macOS keychains and certificates. Since it’s consistently used in Codemagic’s code signing examples, this became my first clue:

keychain initialize — Set up the keychain to be used for code signing. Create the keychain at specified path with specified password with given timeout. Make it default and unlock it for upcoming use.

Essentially, in order to fix this error, we need to provide our own keychain and password to it in our match lane. Where keychain utility is used to create the new keychain and password to it.

Solution

So essentially what we need to do is to add keychain initialize to our workflow before running Fastlane, so that our workflow looks like this:

It will generate a new keychain, set it to default and unlock it. If you don’t provide the password, it get’s set to “” by default:

Now, you might be wondering whether we can provide the path and password as options to the keychain initialize command.

According to the command documentation, we can, but in reality when I tried passing my own parameters the command kept on failing.

I think that there is some kind of error in the command itself because I tested on both the pipeline and on the VM itself (by testing on the VM, I mean that I connected to the VM via ssh to run the command and debug the failure), and essentially I could not get a successful result while passing the parameters. The reason why I wanted to pass my own parameters to the keychain initialize command is to be able to specify the keychain path and easily pass it to the match lane.

The weird thing is that command would fail resulting in error, while the keychain would still get created. This is how it looked like:

Now we need to get the keychain path that we will later use in our match command. In order to do that, we need to do this:

keychain get-default > keychain_name.txt && temp=`grep ‘/private’ keychain_name.txt` && echo $temp

and then combine it with the Fastlane command, which results in the following:

— keychain get-default > keychain_name.txt && temp=`grep ‘/private’ keychain_name.txt` && echo $temp && bundle exec fastlane ios build configuration:»Enterprise» api:»prod» upload_to:»firebase» keychain_name:$temp

Essentially what we do here is:

  • keychain get-default — would show us the system default keychain info, which includes the keychain path
  • keychain get-default > keychain_name.txt — would store that information in a txt file
  • temp=`grep ‘/private’ keychain_name.txt` — here we are getting the path of the keychain from the txt file
  • echo $temp — display what we got
  • keychain_name:$temp — pass it to the lane

Now let’s update the Fastlane files so that we could pass the keychain path to the match:

My make_build is located in a file called build_support, and it had a call to run_code_signing lane which was updated to this:

run_code_signing is located in a separate file called match_support:

Essentially, the majority of changes in the Fastlane files were simply to pass an additional parameter that would be used in match. The only additional thing I did was adding keychain_password: «» to the match.

Источник

Archive failed, error: exit status 65 #127

I presume this has been answered a couple of times but I seem to have this error repeatedly although my certificate and provisioning profile are valid (green marks on both), and my workflow step uses «always latest». It builds it successfully with production profile, but won’t with development. I’ve checked multiple times for the validity of my certificates and profiles, even made new ones.

The text was updated successfully, but these errors were encountered:

Sorry to hear about the inconveniences! Could you send us a log file or build URL for looking into please?

hey @bitce I’ve managed to debug it, looking into the log I saw it used my old provisioning profile even thought the new one was set on workflow. I figured it probably has to propagate through few systems and tried it the next day and it worked like a charm 🙂

That’s great, nice one @darko55555 glad to hear it!

Based on the log it seems that you have specified a ‘Distribution’ export type but your profile is signed for Development. Is that correct?

To provide assistance, please send us a log file or a URL to the build as well, preferably on our on site chat 🙂

thanks for the help! Everything is working

@trancelife That’s awesome! Good job 😉

I am having this issue as well. I can archive and export successfully on my local machine, but the archive fails in both codesigndoc and in the XCode build and archive step.

Error: failed to run xcodebuild command, error: exit status 65

Could you please send us the url of this build? So I can check out the logs, and the raw logs fully as well? 🙃

I found out it was because we are using the Legacy Build System in our project workspace settings. Switching over to the new build system will allow xcodebuild archive to run successfully. This appears to be an issue with Apple’s Xcode CLI, but that doesn’t help those of us who still run on the legacy build system.

Hello i have issue: Archive failed, error: exit status 65
please see log

Hi @torodavit! I just realized we didn’t make this clear earlier, an exit status message isn’t telling as much, your issue seems to be completely unrelated to any of the likes of those mentioned above.

I see you have a linker error, which is unfortunately also can be caused by a number of things. Initially please check this: https://devcenter.bitrise.io/troubleshooting/frequent-ios-issues/#works-in-local-but-not-on-bitriseio

And possibly delete your DerivedData locally and try to rebuild on your computer, the issue could surface there just the same.

I do have a same issue. I’ve attached the log.
Can you look at this and tell me what I’m missing.
a55dc2b0bd2bd4a9.log

Hello there, I’m a bot. On behalf of the community I thank you for opening this issue.

To help our human contributors focus on the most relevant reports, I check up on old issues to see if they’re still relevant.
This issue has had no activity for 90 days, so I marked it as stale.

The community would appreciate if you could check if the issue still persists. If it isn’t, please close it.
If the issue persists, and you’d like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as «still important to me».

If no comment left within 21 days, this issue will be closed.

Источник

** ARCHIVE FAILED ** The following build commands failed: CodeSign /Users/ — Exit Status 65

Recently, I got stuck with an error that drove me crazy. After a quick search, I realized that a lot of people are dealing with the same or a similar issue.

I found multiple solutions that helped some people, but were completely useless to others. Simply because the solution depended on your tech stack.

In that variety of possible solutions, I ended up finding the solution that worked for me. But I payed the price of losing over a week of time, losing sleep and almost losing my mind over it.

So why am I writing this now? What do I want to accomplish writing this?

I want to provide a clear approach, or some kind of a roadmap of what you can do, if you have encountered the same issue.

Problem Statement

Let’s make it clear, what was I using and what I was trying to accomplish.

What do I have and what tools am I using?

Now, let’s get a bit deeper into the components of my CI/CD:

  • Hosted on Gitlab
  • Configured custom Gitlab executor to run the job on the VM
  • fastlane to automate testing, building and deployments

What is my goal?

My goal was to build, test and upload an iOS build using a custom GitLab runner on my local machine. Now, it worth mentioning that testing job ( scan) executed successfully. I encountered the error during the upload part of the pipeline, which essentially runs match -> gym -> upload to testflight.

The error message appears by the very end of gym execution:

Solution Roadmap

I’m going to share some solutions I found on the web. Now, it is very important for you to understand your own case. It will simply save you a lot of time.

General

First let’s cover some general case, that can happen to anyone.

Make sure that you don’t have any expired certificates.

Go to the Keychain Access ->Certificates

Make sure that you don’t see any red crosses on the certificates that you are using for your project, it would look something like this:

This approach has helped a lot of people to fix this issue. Unfortunately, I wasn’t one of them. But still, it’s worth trying.

To unlock the keychain you need to add unlock_keychain fastlane action:

Please note, you need to add this action in your upload lane (the lane where you are executing gym). And you need to add it, before gym.

Also, your path might differ from mine. I noticed that most people simply used “ login.keychain” for their path. Try it out, if you provided the wrong path, most likely you will get an error that your path is not correct.

Or you can check on your terminal, what keychains do you have, by running the following:

You should see something similar to this:

Now, let’s look at the unlock_keychain action usage example:

You might be having problems with match instead, in this case you can put unlock_keychain, right before match.

Putting the unlock_keychain action helped to get rid of the following error message, however, it did not fix the CodeSign issue.

I had the following error message during gym execution:

Once, I added the action with the correct(!) path & password this issue was fixed.

Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…

Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…

Running Locally

If you got this error running locally, there are several things that you can do.

  • Check whether you are using/have installed correct Provisioning Profiles & certs

Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…

Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…

Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…

Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…

  • Unlock Keychain with extended time interval

Fastlane failing at step gym, getting Exit Status: 65, CodeSign build commands failing · Issue…

Hey all, Sorry if this is a dumb question but this is my first go with fastlane. I’ve matched up with my coworker but…

  • Deleting Xcode Derived Data Directory

Runtime error archiving · Issue #1849 · fastlane/fastlane

You can’t perform that action at this time. You signed in with another tab or window. You signed out in another tab or…

There are more examples & solutions under the Resources & References section.

How did I fix my issue?

Simply by executing the following command on the VM and triggering the pipeline again:

What does this command mean?

According to the manual:

security — A simple command line interface which lets you administer keychains, manipulate keys and certificates, and do just about anything the Security framework is capable of from the command line.

Is one of the rich variety of commands that security provides.

According to the manual:

set-key-partition-list — Set the partition list of a key

I am not joking now. It seems like no one really knows that that does. I found literally one sentence in the manual(!) that pretty much rephrases the command name.

I don’t give up so easy. So I digged a bit deeper.

And here is what I found:
Ex #1:

Github Travis-CI has some docs for the common build issues, where they also use set-key-partition-list:

After looking on all of those examples, for me it seems like it is common solution to a CodeSign/certs issues. However, I think you would agree with me that it looks like no one knows/truly understands what the hell this command is doing.

Until, I finally found this:

The above makes more sense now. Even though I have not imported certificates myself (match has taken care of this for me), they are still imported.

As far as I understand, the above means that we give permissions to the partitions to sign the specified keychain.

And then I found the following:

Sets the «partition list» for a key.
The «partition list» is an extra parameter in the ACL which limits access to the key based on an application’s code signature.

You must present the keychain’s password to change a partition list.

If you’d like to run /usr/bin/code- sign with the key, «apple:» must be an element of the partition list.

Is the comma-separated partition list, which is in our case are apple-tool: and apple:

Is an option that matches the keys that can sign

Is the password for the keychain

The usage of the command looks like this:

To sum up, we use set-key-partition-list to enable the specified partition to sign the application code for the keychain we provided. That’s how I understood it. If you have something to share, if you disagree with me, please let me know! I would love to understand more of this. I am not a pro at this topic, all of the above is written based on what I learned during a bit over a week of working on this issue.

Resources & References

On the last note, here is some links that might be useful to you if you are in the same/similar situation. These links include some common solutions that helped some people:

  • I wish I would found this earlier, instead I found this article when I started writing this section:

Источник

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

I am able to build archive using xcode successfully.
When i run $ fastane do_everything_dev

i get below error for last 5 days. The same code was working before without any code change.
ARCHIVE FAILED **
[19:55:48]: Exit status: 65

+—————+————————-+
| Build environment |
+—————+————————-+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.205.1 |
| export_method | ad-hoc |
| sdk | iPhoneOS15.2.sdk |
+—————+————————-+

[19:55:48]: ▸ cd /Users/mdmozammil/core/productapp/ios-mobiquity-consumer-core-app
[19:55:48]: ▸ /usr/bin/touch -c /Users/mdmozammil/Library/Developer/Xcode/DerivedData/MobiquityConsumer-gwhebhwduquhohgsnwhfrgwhxoku/Build/Intermediates.noindex/ArchiveIntermediates/DEV/InstallationBuildProductsLocation/Applications/mobiquity Pay DEV.app
[19:55:48]: ▸ /Users/mdmozammil/core/productapp/ios-mobiquity-consumer-core-app/Pods/Pods.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target ‘SwiftEventBus’ from project ‘Pods’)
[19:55:48]: ▸ /Users/mdmozammil/core/productapp/ios-mobiquity-consumer-core-app/Pods/Pods.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target ‘FSCalendar’ from project ‘Pods’)
[19:55:48]:
[19:55:48]: ⬆️ Check out the few lines of raw xcodebuild output above for potential hints on how to solve this error
[19:55:48]: 📋 For the complete and more detailed error log, check the full log at:
[19:55:48]: 📋 /Users/mdmozammil/Library/Logs/gym/mobiquity Pay-DEV.log
[19:55:48]:
[19:55:48]: Looks like fastlane ran into a build/archive error with your project
[19:55:48]: It’s hard to tell what’s causing the error, so we wrote some guides on how
[19:55:48]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[19:55:48]: Before submitting an issue on GitHub, please follow the guide above and make
[19:55:48]: sure your project is set up correctly.
[19:55:48]: fastlane uses xcodebuild commands to generate your binary, you can see the
[19:55:48]: the full commands printed out in yellow in the above log.
[19:55:48]: Make sure to inspect the output above, as usually you’ll find more error information there
[19:55:48]:
+——————+————————+
| Lane Context |
+——————+————————+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios do_everything_dev |
| BUILD_NUMBER | 20 |
+——————+————————+
[19:55:48]: Error building the application — see the log above

+——+————————+————-+
| fastlane summary |
+——+————————+————-+
| Step | Action | Time (in s) |
+——+————————+————-+
| 1 | default_platform | 0 |
| 2 | Switch to ios clean | 0 |
| | lane | |
| 3 | clear_derived_data | 0 |
| 4 | Switch to ios | 0 |
| | build_beta_dev lane | |
| 5 | automatic_code_signin | 0 |
| | g | |
| 6 | increment_build_numbe | 2 |
| | r | |
| 💥 | gym | 650 |
+——+————————+————-+

[19:55:48]: fastlane finished with errors

[!] Error building the application — see the log above

MCKL-7364:ios-mobiquity-consumer-core-app mdmozammil$ fastlane env
[✔] 🚀
[20:12:47]: fastlane detected a Gemfile in the current directory
[20:12:47]: However, it seems like you didn’t use bundle exec
[20:12:47]: To launch fastlane faster, please use
[20:12:47]:
[20:12:47]: $ bundle exec fastlane env
[20:12:47]:
[20:12:47]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[20:12:49]: Generating fastlane environment output, this might take a few seconds…
swift-driver version: 1.26.21

🚫 fastlane environment 🚫

Stack

Key Value
OS 12.2.1
Ruby 2.6.8
Bundler? false
Git git version 2.32.0 (Apple Git-132)
Installation Source /usr/local/bin/fastlane
Host macOS 12.2.1 (21D62)
Ruby Lib Dir /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
OpenSSL Version LibreSSL 2.8.3
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 13.2.1
Swift Version 5.5.2

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

`./fastlane/Fastfile`

default_platform(:ios)

platform :ios do

desc "clean"
lane :clean do
  clear_derived_data(derived_data_path: "./fastlane/builds/")
end

  desc "Create dev ipa"
  lane :build_beta_dev do
    enable_automatic_code_signing
    increment_build_number
    gym(scheme: "DEV")
  end

  desc "Upload dev to Firebase"
  lane :upload_firebase_dev do
  firebase_app_distribution(
    ipa_path: "./fastlane/builds/mobiquity Pay.ipa",
    app: "<Firebase app id>",
    groups: "<groupname>",
    release_notes: "Mobiquity Subscriber DEV"
  )
end


desc "Create uat ipa"
  lane :build_beta_uat do
    enable_automatic_code_signing
    increment_build_number
    gym(scheme: "UAT")
  end

  desc "Upload uat to Firebase"
  lane :upload_firebase_uat do
  firebase_app_distribution(
    ipa_path: "./fastlane/builds/mobiquity Pay.ipa",
    app: "<Firebase app id>",
    groups: "<groupname>",
    release_notes: "Mobiquity Subscriber UAT",
  )
end

desc "Create aws ipa"
  lane :build_beta_aws do
    enable_automatic_code_signing
    increment_build_number
    gym(scheme: "PVG")
  end

  desc "Upload dev to Firebase"
  lane :upload_firebase_aws do
  firebase_app_distribution(
    ipa_path: "./fastlane/builds/mobiquity Pay PVG.ipa",
    app: "<Firebase app id>",
    groups: "<groupname>",
    release_notes: "Mobiquity Consumer AWS"
  )
end

desc "build and upload dev to firebase"
  lane :do_everything_dev do
      clean
      build_beta_dev
      upload_firebase_dev
  end

desc "build and upload uat to firebase"
  lane :do_everything_uat do
      clean
      build_beta_uat
      upload_firebase_uat
  end

desc "build and upload aws to firebase"
  lane :do_everything_aws do
      clean
      build_beta_aws
      upload_firebase_aws
  end

end

`./fastlane/Appfile`

  app_identifier(ENV['BUNDLE_IDENTIFIER']) # The bundle identifier of your app
  apple_id("<email.com>") # Your Apple email address
  team_name ("<Name>")


# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

Gem Version Update-Status
fastlane 2.205.1 ✅ Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-firebase_app_distribution 0.3.3 ✅ Up-To-Date

Loaded gems

Gem Version
did_you_mean 1.3.0
atomos 0.1.3
claide 1.1.0
colored2 3.1.2
nanaimo 0.3.0
rexml 3.2.5
xcodeproj 1.21.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.8.0
terminal-table 1.8.0
plist 3.6.0
public_suffix 4.0.6
addressable 2.8.0
multipart-post 2.0.0
word_wrap 1.0.0
optparse 0.1.1
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-httpclient 1.0.1
faraday-multipart 1.0.3
faraday-net_http 1.0.1
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
faraday-retry 1.0.3
ruby2_keywords 0.0.5
faraday 1.10.0
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.4
faraday-cookie_jar 0.0.7
faraday_middleware 1.2.0
fastimage 2.2.6
gh_inspector 1.1.3
mini_magick 4.11.0
naturally 2.2.1
rubyzip 2.3.2
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
bundler 1.17.2
simctl 1.6.8
jwt 2.3.0
uber 0.1.0
declarative 0.0.20
trailblazer-option 0.1.2
representable 3.1.1
retriable 3.1.2
mini_mime 1.1.2
memoist 0.16.2
multi_json 1.15.0
os 1.1.4
signet 0.16.1
googleauth 1.1.2
httpclient 2.8.3
google-apis-core 0.4.2
google-apis-playcustomapp_v1 0.7.0
google-apis-androidpublisher_v3 0.16.0
google-cloud-env 1.5.0
google-cloud-errors 1.2.0
google-cloud-core 1.6.0
google-apis-iamcredentials_v1 0.10.0
google-apis-storage_v1 0.11.0
digest-crc 0.6.4
google-cloud-storage 1.36.1
emoji_regex 3.2.3
aws-eventstream 1.2.0
aws-sigv4 1.4.0
aws-sdk-kms 1.55.0
aws-sdk-s3 1.113.0
CFPropertyList 3.0.5
excon 0.92.0
unf_ext 0.0.8.1
json 2.6.1
webrick 1.7.0
rake 13.0.6
aws-partitions 1.568.0
jmespath 1.6.1
aws-sdk-core 3.130.0
forwardable 1.2.0
logger 1.3.0
date 2.0.0
stringio 0.0.2
ipaddr 1.2.2
openssl 2.1.2
zlib 1.0.0
mutex_m 0.1.0
ostruct 0.1.0
strscan 1.0.0
io-console 0.4.7
fileutils 1.1.0
etc 1.0.1
libxml-ruby 3.2.1
psych 3.1.0
fastlane-plugin-firebase_app_distribution 0.3.3

generated on: 2022-03-28

[20:12:52]: Take notice that this output may contain sensitive information, or simply information that you don’t want to make public.
[20:12:52]:

🙄

Wow, that’s a lot of markdown text… should fastlane put it
into your clipboard, so you can easily paste it on GitHub? (y/n)
y
[20:12:56]: Successfully copied markdown into your clipboard

🎨

[20:12:56]: Open https://github.com/fastlane/fastlane/issues/new to submit a new issue

Hi,

I am having a problem with CI builds when building Unity3d projects. The pipeline first builds the project using Unity which results in a Xcode project. Our pipeline then uses `xcodebuild` in two phases. In first phase it builds the project with archive action. Second phase exports the archive into an application package using `-exportArchive`. The problem I have is with archive action after updating Unity from 5.3.x to 5.4.0. The reason I ask here instead Unity3d forums is that we do native builds also. If this starts to happen with them, I need to be able to fix whatever is causing this issue. CI machine in question has OSX 10.11.4 and Xcode 7.3.1. Here is an excerpt from `xcodebuild` output.

$ xcodebuild archive -project Unity-iPhone.xcodeproj -configuration Release -scheme Unity-iPhone -archivePath /JenkinsHDD/workspace/<redacted>/path/to/project/<redacted>.xcarchive DEPLOYMENT_POSTPROCESSING=YES CODE_SIGN_IDENTITY=<redacted> ENABLE_BITCODE=NO PROVISIONING_PROFILE=<redacted> SHARED_PRECOMPS_DIR=/JenkinsHDD/workspace/<redacted>/client/build/unity/ios/release

/* snip */

Strip /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app/<redacted>
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app/<redacted>


SetOwnerAndGroup <redacted>:staff /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/sbin/chown -RH <redacted>:staff /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app


SetMode u+w,go-w,a+rX /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /bin/chmod -RH u+w,go-w,a+rX /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app


ProcessProductPackaging /Users/<redacted>/Library/MobileDevice/Provisioning Profiles/<redacted>.mobileprovision /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app/embedded.mobileprovision
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-productPackagingUtility /Users/<redacted>/Library/MobileDevice/Provisioning Profiles/<redacted>.mobileprovision -o /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app/embedded.mobileprovision


Touch /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/touch -c /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app


ProcessProductPackaging /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/Entitlements.plist /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/<redacted>.app.xcent
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-productPackagingUtility /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/Entitlements.plist -entitlements -format xml -o /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/<redacted>.app.xcent


CodeSign /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"


Signing Identity:     "<redacted>"
Provisioning Profile: "<redacted>"
                      (<redacted>)


    /usr/bin/codesign --force --sign <redacted> --entitlements /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/<redacted>.app.xcent --timestamp=none /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app


Validate /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export PRODUCT_TYPE=com.apple.product-type.application
    builtin-validationUtility /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/<redacted>.app


Touch /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/<redacted>.app.dSYM
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/touch -c /Users/<redacted>/Library/Developer/Xcode/DerivedData/Unity-iPhone-fynvgzmjcsmtykcpkjmoxnkzzhqd/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/<redacted>.app.dSYM


** ARCHIVE FAILED **

$ echo $?
65

This only seems to be reproduceable on our CI machines. I have tried checking out the usual suspects, such as invalid or expired certificates or provisioning profiles. All certificates are valid, keychains are properly unlocked during the build and I see no issues with the provisioning profiles. Also, whenever there is a codesigning issue, `xcodebuild` usually fails immediately after call to /usr/bin/codesign or even much earlier if no codesign identities are found. Information I found by googling does not help much. Closest I found was this stackoverflow question https://stackoverflow.com/questions/28794243/xcode-build-fails-with-error-code-65-without-indicative-message. However, I am skeptical why CopyPNG step would suddently start failing the build, since while we do have CopyPNG fails in the log, those have been around for quite some time. Also, turning on -verbose flag did not reveal any more information.

Can anybody point me in the right direction how to figure out this issue?

Outline

Hello!
I am attempting to automate adhoc build by using fastlane with match and gym.
I can archive at local environment.
But I couldn’t archive at Circle CI.
Looks like xcodebuild command was failed.
I login job by ssh, and this command is failed at Circle CI .

$ xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Release -destination ‘generic/platform=iOS’ -archivePath MyApp.xcarchive clean archive | tee /Users/distiller/Library/Logs/gym/MyApp-MyApp.log

Please tell me solution.

What I did

https://circleci.com/docs/2.0/ios-codesigning/

I have set up project setting by referring this page.

My code sign settig is here.

https://circleci-discourse.s3.amazonaws.com/original/2X/6/6e3c5cf2ed04b16a3d782d99c99107d5889a29f8.png

fastlane is here.

version: 2
jobs:
 setup:
   macos:
     xcode: "9.2.0"
   shell: /bin/bash --login -eo pipefail
   steps:
     - checkout
     - run:
         name: Set Ruby Version
         command:  echo "ruby-2.4" > ~/.ruby-version
     - restore_cache:
         keys:
           - gems-{{ checksum "Gemfile.lock" }}
     - run:
         name: Running bundle install
         command: bundle check || bundle install --path vendor/bundle
         environment:
             - BUNDLE_JOBS: 4
             - BUNDLE_RETRY: 3
     - save_cache:
         key: gems-{{ checksum "Gemfile.lock" }}
         paths:
           - vendor/bundle
     - restore_cache:
         keys:
           - pods--{{ checksum "Podfile.lock" }}
     - run:
         name: Running pod install
         command: |
           curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
           bundle exec pod install
     - save_cache:
         key: pods-{{ checksum "Podfile.lock" }}
         paths:
           - Pods
           - MyApp.xcworkspace
 beta-deployment:
   macos:
     xcode: "9.2.0"
   shell: /bin/bash --login -eo pipefail
   steps:
     - checkout
     - restore_cache:
         keys:
           - gems-{{ checksum "Gemfile.lock" }}
     - restore_cache:
         keys:
           - pods-{{ checksum "Podfile.lock" }}
     - run: echo "ruby-2.4" > ~/.ruby-version
     - run: bundle install
     - run: bundle exec fastlane build_adhoc
     - store_artifacts:
         path: MyApp.app.dSYM.zip
     - store_artifacts:
         path: MyApp.ipa
workflows:
  version: 2
  build_test_deployment:
    jobs:
      - setup
      - beta-deployment:
          requires:
            - setup

config.yml is here.

fastlane_version "2.35.1"

default_platform :ios

platform :ios do
  lane :build_adhoc do
    setup_circle_ci
    match(type: "appstore", app_identifier: "jp.hogehoge.MyApp", readonly: true)
    match(type: "adhoc", app_identifier: "jp.hogehoge.MyApp", readonly: true)
    gym(
      scheme: "MyApp",
      workspace: "MyApp.xcworkspace",
      configuration: "Release",
      export_method: "ad-hoc",
      export_options: {
        provisioningProfiles: {
        "jp.hogehoge.MyApp" => "match AdHoc jp.hogehoge.MyApp"
        }
      },
      clean: true
    )
  end
end

failed log is here.

...
...
▸ Running script '[CP] Embed Pods Frameworks'
▸ Running script '[CP] Copy Pods Resources'
▸ Touching MyApp.app
▸ Signing /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-dsgauupkymppmmgymocmzptqnqrr/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
▸ Touching MyApp.app.dSYM
** ARCHIVE FAILED **
[01:51:08]: Exit status: 65
[01:51:08]: 
[01:51:08]: Maybe the error shown is caused by using the wrong version of Xcode
[01:51:08]: Found multiple versions of Xcode in '/Applications/'
[01:51:08]: Make sure you selected the right version for your project
[01:51:08]: This build process was executed using '/Applications/Xcode-9.2.app'
[01:51:08]: If you want to update your Xcode path, either
[01:51:08]: 
[01:51:08]: - Specify the Xcode version in your Fastfile
[01:51:08]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[01:51:08]: 
[01:51:08]: - Specify an absolute path to your Xcode installation in your Fastfile
[01:51:08]: ▸ xcode_select "/Applications/Xcode8.app"
[01:51:08]: 
[01:51:08]: - Manually update the path using
[01:51:08]: ▸ sudo xcode-select -s /Applications/Xcode.app
[01:51:08]: 

+---------------+-----------------------------+
|              Build environment              |
+---------------+-----------------------------+
| xcode_path    | /Applications/Xcode-9.2.app |
| gym_version   | 2.79.0                      |
| export_method | ad-hoc                      |
| sdk           | iPhoneOS11.2.sdk            |
+---------------+-----------------------------+

[01:51:08]: ▸ Touch /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-dsgauupkymppmmgymocmzptqnqrr/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
[01:51:08]: ▸     cd /Users/distiller/project
[01:51:08]: ▸     export PATH="/Applications/Xcode-9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-9.2.app/Contents/Developer/usr/bin:/Users/distiller/.gem/ruby/2.4.2/bin:/Users/distiller/.rubies/ruby-2.4.2/lib/ruby/gems/2.4.0/bin:/Users/distiller/.rubies/ruby-2.4.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
[01:51:08]: ▸     /usr/bin/touch -c /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-dsgauupkymppmmgymocmzptqnqrr/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
[01:51:08]: 
[01:51:08]: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
[01:51:08]: ????  For the complete and more detailed error log, check the full log at:
[01:51:08]: ????  /Users/distiller/Library/Logs/gym/MyApp-MyApp.log
[01:51:08]: 
[01:51:08]: Looks like fastlane ran into a build/archive error with your project
[01:51:08]: It's hard to tell what's causing the error, so we wrote some guides on how
[01:51:08]: to troubleshoot build and signing issues: docs.fastlane.tools/codesigning/getting-started/
[01:51:08]: Before submitting an issue on GitHub, please follow the guide above and make
[01:51:08]: sure your project is set up correctly.
[01:51:08]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[01:51:08]: the full commands printed out in yellow in the above log.
[01:51:08]: Make sure to inspect the output above, as usually you'll find more error information there
[01:51:08]: 
+------------------------------------+--------------------------------------------------------------------------------+
|                                                    Lane Context                                                     |
+------------------------------------+--------------------------------------------------------------------------------+
| DEFAULT_PLATFORM                   | ios                                                                            |
| PLATFORM_NAME                      | ios                                                                            |
| LANE_NAME                          | ios build_adhoc                                                                |
| ORIGINAL_DEFAULT_KEYCHAIN          | "/Users/distiller/Library/Keychains/login.keychain-db"                         |
| SIGH_PROFILE_TYPE                  | ad-hoc                                                                         |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"jp.hogehoge.MyApp"=>"match AdHoc jp.hogehoge.MyApp"} |
+------------------------------------+--------------------------------------------------------------------------------+
[01:51:08]: Error building the application - see the log above

+------+---------------------------------+-------------+
|                   fastlane summary                   |
+------+---------------------------------+-------------+
| Step | Action                          | Time (in s) |
+------+---------------------------------+-------------+
| 1    | Verifying fastlane version      | 0           |
| 2    | default_platform                | 0           |
| 3    | setup_circle_ci                 | 0           |
| 4    | Switch to ios certificates lane | 0           |
| 5    | match                           | 2           |
| 6    | match                           | 2           |
| 7    | match                           | 1           |
| ????   | gym                             | 207         |
+------+---------------------------------+-------------+

[01:51:08]: fastlane finished with errors

[!] Error building the application - see the log above

...

[23:25:14]: WARNING: fastlane requires your locale to be set to UTF-8. To learn more go ://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables
Exited with code 1

Понравилась статья? Поделить с друзьями:
  • Archeage как изменить разрешение экрана
  • Archeage как изменить имя персонажа
  • Archeage как изменить внешний вид оружия
  • Archeage error loading dll cryrenderd3d9 dll error code 126
  • Archeage error failed to load game data как решить