fastlane: Fastlane release gym error

New Issue Checklist

Issue Description

When I run fastlane release

Complete output when running fastlane, including the stack trace and command used

You can use: --capture_output as the last commandline argument to get that collected for you

I didn’t want to paste the full output since it was so long

the following build commands failed: PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/dereklo/Library/Developer/Xcode/DerivedData/Py-dmreilycdhazgrahbgcgrxwrzegf/Build/Intermediates/ArchiveIntermediates/Py\ AppStore/IntermediateBuildFilesPath/Py.build/AppStore-iphoneos/Py.build/Script-93CE2F805B5DB9FAAACFA886.sh (1 failure) [17:24:17]: Exit status: 65

Environment

Please run fastlane env and copy the output below. This will help us help you 👍 If you used --capture_output option please remove this block - as it is already included there.

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
slack-notifier 1.5.1
i18n 0.7.0
json 1.8.1
thread_safe 0.3.5
tzinfo 1.2.2
minitest 5.4.3
activesupport 4.2.7.1
CFPropertyList 2.3.3
claide 1.0.1
colored 1.2
nanaimo 0.2.2
xcodeproj 1.4.1
rouge 1.11.1
xcpretty 0.2.4
terminal-notifier 1.7.1
terminal-table 1.4.5
plist 3.2.0
public_suffix 2.0.4
addressable 2.5.0
multipart-post 2.0.0
word_wrap 1.0.0
babosa 1.0.2
highline 1.7.8
commander 4.4.0
excon 0.54.0
faraday 0.10.0
unf_ext 0.0.7.2
unf 0.1.4
domain_name 0.5.20161021
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 1.6.8
gh_inspector 1.0.2
uber 0.0.15
representable 2.3.0
retriable 2.1.0
mime-types-data 3.2016.0521
mime-types 3.1
hurley 0.2
little-plugger 1.1.4
multi_json 1.12.1
logging 2.1.0
jwt 1.5.6
memoist 0.15.0
os 0.9.6
signet 0.7.3
googleauth 0.5.1
httpclient 2.8.2.4
google-api-client 0.9.20
mini_magick 4.5.1
multi_xml 0.5.5
rubyzip 1.1.7
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.1.1
bundler 1.13.6
faraday_middleware 0.10.1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 25 (3 by maintainers)

Most upvoted comments

Hey guys,

Hitting the same error here too. Just updated to Sierra and upgraded to the latest Fastlane, Gym, XCode etc so everything up to date.

On my local machine all works as expected:

    cd /Users/lukemcdaid/Example-ios-property-config
    /bin/sh -c /Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/Script-A732BBB2C5E061610E4BB936.sh
mkdir -p /Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/BuildProductsPath/Release-iphoneos/Example.app/Frameworks
Symlinked...
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AirlineConfiguration.framework" "/Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks"
building file list ... done
AirlineConfiguration.framework/
AirlineConfiguration.framework/AirlineConfiguration
AirlineConfiguration.framework/Info.plist
AirlineConfiguration.framework/Images.bundle/
AirlineConfiguration.framework/Images.bundle/Assets.car
AirlineConfiguration.framework/Images.bundle/Info.plist

sent 8046600 bytes  received 120 bytes  16093440.00 bytes/sec
total size is 8045183  speedup is 1.00
Code Signing /Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks/AirlineConfiguration.framework with Identity iPhone Distribution: Example Company LTD
/usr/bin/codesign --force --sign 0137D553748D488F831B0481FE19E6D8EBE36F20  --preserve-metadata=identifier,entitlements '/Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks/AirlineConfiguration.framework'
Symlinked...
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Aspects.framework" "/Users/lukemcdaid/Example-ios-property-config/DerivedData/Example/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks"
building file list ... done
Aspects.framework/
Aspects.framework/Aspects
Aspects.framework/Info.plist`

However on my build machine fails with the same error as above:

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Debug-iphoneos/Example.build/Script-A732BBB2C5E061610E4BB936.sh
    cd /Users/jenkins/build/workspace/Example-ios-snapshot-automation-updates
    /bin/sh -c /Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Debug-iphoneos/Example.build/Script-A732BBB2C5E061610E4BB936.sh
mkdir -p /Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/BuildProductsPath/Debug-iphoneos/Example.app/Frameworks
Symlinked...
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AirlineConfiguration.framework" "/Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks"
building file list ... done
AirlineConfiguration.framework/
AirlineConfiguration.framework/AirlineConfiguration
AirlineConfiguration.framework/Info.plist
AirlineConfiguration.framework/Images.bundle/
AirlineConfiguration.framework/Images.bundle/Assets.car
AirlineConfiguration.framework/Images.bundle/Info.plist

sent 8046689 bytes  received 120 bytes  16093618.00 bytes/sec
total size is 8045271  speedup is 1.00
Code Signing /Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks/AirlineConfiguration.framework with Identity iPhone Distribution: Example Company LTD
/usr/bin/codesign --force --sign 0137D553748D488F831B0481FE19E6D8EBE36F20  --preserve-metadata=identifier,entitlements '/Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks/AirlineConfiguration.framework'
SecKey API returned: -25308, (null)/Users/jenkins/Library/Developer/Xcode/DerivedData/Example-cxwoeyupjxxzbnfayiatypvioaqr/Build/Intermediates/ArchiveIntermediates/Example/InstallationBuildProductsLocation/Applications/Example.app/Frameworks/Example.framework: unknown error -1=ffffffffffffffff
Command /bin/sh failed with exit code 1

My gym call is the following:

# Compiles and produces the Archive and signs it to produce a valid .ipa
gym(
    scheme: "Example",
    xcargs: "PROVISIONING_PROFILE_SPECIFIER='#{profile_name}' CODE_SIGN_IDENTITY='iPhone Distribution: Example Company LTD'"
)

Similar to the above comment, I am creating a temporary keychain and installing the certificate. Looking at the build machine I can see that this is correctly created and the cert successfully inserted. No popup is visible when attempting to code sign that seems to cause errors for other users.

Also tried installing in the system keychain temporarily and unlocking it and get the same error.

Any ideas would be great, can’t seem to find a way to fix this one.

Thanks, Liam.

Running Archive in Xcode manually once prompted me to allow access to an keychain key which I didn’t allowed manually previously (while debugging the error). The Xcode archive succeeded.

After that I tried running the lane mentioned above and it finished successfully too. So it seems that somehow match installed the keychain items but codesign had no access to them which resulted in the error mentioned in my previous comment.

@derektlo Maybe try the same thing once via Xcode and test again with your lane.

Getting this error too.

  • Using Xcode 8.2.1
  • Fastlane 2.18.3
  • On one machine everything seems fine
  • On our CI machine the following error occurs. – ran fastlane match appstore --readonly first and opening the project in Xcode on it looks fine too
  • Removing export_method did not fix it for me.
  • Automatic code sign is turned off and using distribution profile for my Production configuration (listed under eligible)
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/developer/Library/Developer/Xcode/DerivedData/XXXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/IntermediateBuildFilesPath/XXXXXXX.build/Production-iphoneos/XXXXXXX.build/Script-428D3768096288AF0AE66293.sh
    cd /Users/developer/Developer/XXXXXXXX
    /bin/sh -c /Users/developer/Library/Developer/Xcode/DerivedData/XXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/IntermediateBuildFilesPath/XXXXXXX.build/Production-iphoneos/XXXXXXX.build/Script-428D3768096288AF0AE66293.sh
mkdir -p /Users/developer/Library/Developer/Xcode/DerivedData/XXXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/BuildProductsPath/Production-iphoneos/XXXXXXXX.app/Frameworks
Symlinked...
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/developer/Library/Developer/Xcode/DerivedData/XXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" "/Users/developerl/Library/Developer/Xcode/DerivedData/XXXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/InstallationBuildProductsLocation/Applications/XXXXXXX.app/Frameworks"
building file list ... done
Alamofire.framework/
Alamofire.framework/Alamofire
Alamofire.framework/Info.plist

sent 8807203 bytes  received 70 bytes  17614546.00 bytes/sec
total size is 8805889  speedup is 1.00


Code Signing /Users/developer/Library/Developer/Xcode/DerivedData/XXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/InstallationBuildProductsLocation/Applications/XXXXXXX.app/Frameworks/Alamofire.framework with Identity iPhone Distribution: XXXXXXX (XXXXXXX)
/usr/bin/codesign --force --sign XXXXXXXXXXXX  --preserve-metadata=identifier,entitlements '/Users/developer/Library/Developer/Xcode/DerivedData/XXXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/InstallationBuildProductsLocation/Applications/XXXXXXX.app/Frameworks/Alamofire.framework'
SecKey API returned: -25308, (null)/Users/developer/Library/Developer/Xcode/DerivedData/XXXXXXX-afjqsldntvpczjcefhrsrxeenkkp/Build/Intermediates/ArchiveIntermediates/production/InstallationBuildProductsLocation/Applications/XXXXXXX.app/Frameworks/Alamofire.framework: unknown error -1=ffffffffffffffff

lane:

lane :submit_testflight do |options|
    version_number = get_version_number(target: "XXXXXXX")
    build_number = get_build_number

    clear_derived_data
    clean_build_artifacts

    cocoapods(repo_update: true, clean: true)
    match(
      type:"appstore",
      readonly: true
    )
    gym(
      scheme: "production",
      clean: true,
      output_name: "XXXXXX-#{version_number}-#{build_number}.ipa",
      output_directory: "output/",
      include_bitcode: true,
      include_symbols: true,
      configuration: "Production",
    )
    testflight(
      distribute_external: false,
      beta_app_feedback_email: "XXXXXXX",
      team_id: "XXXXXXXX"
    )
  end