fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.47k stars 5.69k forks source link

Exit status: 70, [!] Error packaging up the application #10483

Closed AdrianBinDC closed 6 years ago

AdrianBinDC commented 6 years ago

Issue Description

I'm getting Error Code 70 when I run fastlane build from Terminal. I've looked around at various solutions on the site, but I haven't had any luck resolving the issue. Below is the console output and the environment information.

[07:01:26]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile

07:01:29: --- Step: Verifying required fastlane version ---

07:01:29: Your fastlane version 2.60.0 matches the minimum requirement of 2.60.0 ✅

07:01:29: --- Step: default_platform ---

07:01:29: Driving the lane 'ios build' 🚀

07:01:29: --- Step: cocoapods ---

07:01:29: $ pod install 07:01:30: ▸ Analyzing dependencies 07:01:30: ▸ Downloading dependencies 07:01:30: ▸ Using Crashlytics (3.8.4) 07:01:30: ▸ Using DZNEmptyDataSet (1.8.1) 07:01:30: ▸ Using Fabric (1.6.11) 07:01:30: ▸ Generating Pods project 07:01:30: ▸ Integrating client project 07:01:30: ▸ Sending stats 07:01:30: ▸ Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.

07:01:30: --- Step: increment_build_number ---

Current version of project MyApp is: 15

/Users/adrian/Documents/developerNew/ios/MyApp [07:01:31]: $ cd /Users/adrian/Documents/developerNew/ios/MyApp && agvtool next-version -all && cd - [07:01:31]: ▸ Setting version of project MyApp to: [07:01:31]: ▸ 16. [07:01:31]: ▸ Also setting CFBundleVersion key (assuming it exists) [07:01:31]: ▸ Updating CFBundleVersion in Info.plist(s)... [07:01:31]: ▸ Cannot find "MyApp.xcodeproj/../MyAppTests/Info.plist" [07:01:31]: ▸ Updated CFBundleVersion in "MyApp.xcodeproj/../MyApp/Info.plist" to 16 [07:01:31]: ▸ Updated CFBundleVersion in "MyApp.xcodeproj/../MyAppUITests/Info.plist" to 16 [07:01:31]: ▸ /Users/adrian/Documents/developerNew/ios/MyApp

07:01:32: --- Step: gym ---

07:01:32: $ xcodebuild -list -workspace ./MyApp.xcworkspace Select Scheme:

  1. MyApp
  2. DZNEmptyDataSet
  3. Pods-MyApp
  4. Pods-MyAppTests
  5. Pods-MyAppUITests
  6. MyAppUITests ? 1 [07:01:39]: $ xcodebuild -showBuildSettings -workspace ./MyApp.xcworkspace -scheme MyApp

+------------------+---------------------------------------------------------+ | Summary for gym 2.60.0 | +------------------+---------------------------------------------------------+ | workspace | ./MyApp.xcworkspace | | scheme | MyApp | | destination | generic/platform=iOS | | output_name | MyApp | | build_path | /Users/adrian/Library/Developer/Xcode/Archives | | | /2017-10-03 | | clean | false | | output_directory | . | | silent | false | | skip_package_ipa | false | | buildlog_path | ~/Library/Logs/gym | | xcode_path | /Applications/Xcode.app | +------------------+---------------------------------------------------------+

[07:01:41]: $ set -o pipefail && xcodebuild -workspace ./MyApp.xcworkspace -scheme MyApp -destination 'generic/platform=iOS' -archivePath /Users/adrian/Library/Developer/Xcode/Archives/2017-10-03/MyApp\ 2017-10-03\ 07.01.41.xcarchive archive | tee /Users/adrian/Library/Logs/gym/MyApp-MyApp.log | xcpretty [07:01:41]: ▸ Building Pods/DZNEmptyDataSet [Release] [07:01:41]: ▸ Check Dependencies [07:01:42]: ▸ Processing Info.plist [07:01:42]: ▸ Compiling UIScrollView+EmptyDataSet.m [07:01:42]: ▸ Compiling DZNEmptyDataSet-dummy.m [07:01:42]: ▸ Compiling DZNEmptyDataSet_vers.c [07:01:42]: ▸ Compiling DZNEmptyDataSet-dummy.m [07:01:42]: ▸ Compiling UIScrollView+EmptyDataSet.m [07:01:42]: ▸ Compiling DZNEmptyDataSet_vers.c [07:01:42]: ▸ Linking DZNEmptyDataSet [07:01:42]: ▸ Linking DZNEmptyDataSet [07:01:42]: ▸ Generating 'DZNEmptyDataSet.framework.dSYM' [07:01:42]: ▸ Copying DZNEmptyDataSet-umbrella.h [07:01:42]: ▸ Copying UIScrollView+EmptyDataSet.h [07:01:42]: ▸ Touching DZNEmptyDataSet.framework [07:01:42]: ▸ Building Pods/Pods-MyApp [Release] [07:01:42]: ▸ Check Dependencies [07:01:42]: ▸ Processing Info.plist [07:01:42]: ▸ Compiling Pods-MyApp-dummy.m [07:01:42]: ▸ Compiling Pods_MyApp_vers.c [07:01:42]: ▸ Compiling Pods-MyApp-dummy.m [07:01:42]: ▸ Compiling Pods_MyApp_vers.c [07:01:42]: ▸ Copying Pods-MyApp-umbrella.h [07:01:42]: ▸ Touching Pods_MyApp.framework [07:01:42]: ▸ Building MyApp/MyApp [Release] [07:01:42]: ▸ Check Dependencies [07:01:42]: ▸ Running script '[CP] Check Pods Manifest.lock' [07:01:49]: ▸ ⚠️ /Users/adrian/Documents/developerNew/ios/MyApp/MyApp/Model/WordUtility.swift:211:16: 'substring(with:)' is deprecated: Please use String slicing subscript. [07:01:49]: ▸ text.substring(with: Range($0.range, in: text)!) [07:01:49]: ▸ ^ [07:01:49]: ▸ ⚠️ /Users/adrian/Documents/developerNew/ios/MyApp/MyApp/Model/WordUtility.swift:211:16: 'substring(with:)' is deprecated: Please use String slicing subscript. [07:01:49]: ▸ text.substring(with: Range($0.range, in: text)!) [07:01:49]: ▸ ^ [07:01:51]: ▸ ⚠️ /Users/adrian/Documents/developerNew/ios/MyApp/MyApp/Model/WordUtility.swift:211:16: 'substring(with:)' is deprecated: Please use String slicing subscript. [07:01:51]: ▸ text.substring(with: Range($0.range, in: text)!) [07:01:51]: ▸ ^ [07:01:51]: ▸ ⚠️ /Users/adrian/Documents/developerNew/ios/MyApp/MyApp/Model/WordUtility.swift:211:16: 'substring(with:)' is deprecated: Please use String slicing subscript. [07:01:51]: ▸ text.substring(with: Range($0.range, in: text)!) [07:01:51]: ▸ ^ [07:01:51]: ▸ Compiling MyApp_vers.c [07:01:51]: ▸ Compiling MyApp_vers.c [07:01:51]: ▸ Linking MyApp [07:01:52]: ▸ Linking MyApp [07:01:52]: ▸ Copying MyApp/Supporting\ Files/enableList8count.txt [07:01:52]: ▸ Copying MyApp/Supporting\ Files/enableList.txt [07:01:52]: ▸ Compiling StatusView.xib [07:01:53]: ▸ Compiling Main.storyboard [07:01:55]: ▸ Compiling LaunchScreen.storyboard [07:01:55]: ▸ Processing Info.plist [07:01:55]: ▸ Generating 'MyApp.app.dSYM' [07:01:55]: ▸ Running script '[CP] Embed Pods Frameworks' [07:01:55]: ▸ Running script '[CP] Copy Pods Resources' [07:01:55]: ▸ Running script 'Run Script' [07:01:56]: ▸ Touching MyApp.app [07:01:59]: ▸ Signing /Users/adrian/Library/Developer/Xcode/DerivedData/MyApp-aaigqqonndlqytemuxqdpavrtnbz/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app [07:01:59]: ▸ Touching MyApp.app.dSYM 07:02:00: ▸ Archive Succeeded 07:02:00: Generated plist file with the following values: 07:02:00: ▸ ----------------------------------------- 07:02:00: ▸ {

07:02:00: ▸ } 07:02:00: ▸ ----------------------------------------- 07:02:00: $ /usr/bin/xcrun /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.60.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/d0/zncpdgsn2l141snb7hr0m_xh0000gn/T/gym_config20171003-72632-fkkgo2.plist' -archivePath /Users/adrian/Library/Developer/Xcode/Archives/2017-10-03/MyApp\ 2017-10-03\ 07.01.41.xcarchive -exportPath '/var/folders/d0/zncpdgsn2l141snb7hr0m_xh0000gn/T/gym_output20171003-72632-1vemwxs' RVM detected, forcing to use system ruby Now using system ruby.

Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'com.adrian.MyApp' were found" UserInfo={NSLocalizedDescription=No profiles for 'com.adrian.MyApp' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.adrian.MyApp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}

EXPORT FAILED 07:02:03: Exit status: 70

+---------------+-------------------------+ | Build environment | +---------------+-------------------------+ | xcode_path | /Applications/Xcode.app | | gym_version | 2.60.0 | | export_method | app-store | | sdk | iPhoneOS11.0.sdk | +---------------+-------------------------+

07:02:03: ▸ cd /Users/adrian/Documents/developerNew/ios/MyApp 07:02:03: ▸ export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/Users/adrian/anaconda/bin:/Users/adrian/.fastlane/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/adrian/.rvm/bin" 07:02:03: ▸ /usr/bin/touch -c /Users/adrian/Library/Developer/Xcode/DerivedData/MyApp-aaigqqonndlqytemuxqdpavrtnbz/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM 07:02:03: ▸ ARCHIVE SUCCEEDED 07:02:03: 07:02:03: ⬆️ Check out the few lines of raw xcodebuild output above for potential hints on how to solve this error 07:02:03: 📋 For the complete and more detailed error log, check the full log at: 07:02:03: 📋 /Users/adrian/Library/Logs/gym/MyApp-MyApp.log 07:02:03: 07:02:03: Looks like fastlane ran into a build/archive error with your project 07:02:03: It's hard to tell what's causing the error, so we wrote some guides on how 07:02:03: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/ 07:02:03: Before submitting an issue on GitHub, please follow the guide above and make 07:02:03: sure your project is set up correctly. 07:02:03: fastlane uses xcodebuild commands to generate your binary, you can see the 07:02:03: the full commands printed out in yellow in the above log. 07:02:03: Make sure to inspect the output above, as usually you'll find more error information there 07:02:03: 07:02:03: Looks like no provisioning profile mapping was provided 07:02:03: Please check the complete output, in particular the very top 07:02:03: and see if you can find more information. You can also run fastlane 07:02:03: with the --verbose flag. 07:02:03: Alternatively you can provide the provisioning profile mapping manually

+------------------+-----------+ | Lane Context | +------------------+-----------+ | DEFAULT_PLATFORM | ios | | PLATFORM_NAME | ios | | LANE_NAME | ios build | | BUILD_NUMBER | 16 | +------------------+-----------+ 07:02:03: Error packaging up the application

+------+------------------------------+-------------+ | fastlane summary | +------+------------------------------+-------------+ | Step | Action | Time (in s) | +------+------------------------------+-------------+ | 1 | Verifying required fastlane | 0 | | | version | | | 2 | default_platform | 0 | | 3 | cocoapods | 1 | | 4 | increment_build_number | 2 | | 💥 | gym | 31 | +------+------------------------------+-------------+

07:02:03: fastlane finished with errors

Environment

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

✅ fastlane environment ✅ ### Stack | Key | Value | | --------------------------- | ------------------------------------------- | | OS | 10.12.6 | | Ruby | 2.4.1 | | Bundler? | false | | Git | git version 2.13.5 (Apple Git-94) | | Installation Source | /usr/local/bin/fastlane | | Host | Mac OS X 10.12.6 (16G29) | | Ruby Lib Dir | /usr/local/Cellar/ruby/2.4.1_1/lib | | OpenSSL Version | OpenSSL 1.0.2k 26 Jan 2017 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode.app/Contents/Developer/ | | Xcode Version | 9.0 | ### System Locale | Variable | Value | | | -------- | ----------- | - | | LANG | en_US.UTF-8 | ✅ | | LC_ALL | | | | LANGUAGE | | | ### fastlane files:
`./fastlane/Fastfile` ```ruby # Customise this file, documentation can be found here: # https://github.com/fastlane/fastlane/tree/master/fastlane/docs # All available actions: https://docs.fastlane.tools/actions # can also be listed using the `fastlane actions` command # Change the syntax highlighting to Ruby # All lines starting with a # are ignored when running `fastlane` # If you want to automatically update fastlane if a new version is available: # update_fastlane # This is the minimum version number required. # Update this, if you use features of a newer version fastlane_version "2.60.0" default_platform :ios platform :ios do before_all do # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." cocoapods end desc "Runs all the tests" lane :test do scan end # desc "Submit a new Beta Build to Apple TestFlight" # desc "This will also make sure the profile is up to date" # lane :beta do # # match(type: "appstore") # more information: https://codesigning.guide # gym(scheme: "MyApp") # Build your app - more options available # pilot # # sh "your_script.sh" # # You can also use other beta testing services here (run `fastlane actions`) # end lane :screenshots do snapshot deliver end desc "Create ipa" lane :build do increment_build_number gym end # lane :release do # gym(scheme: "MyApp", # workspace: "MyApp.xcworkspace", # include_bitcode: true) # end desc "Deploy a new version to the App Store" lane :release do # match(type: "appstore") # snapshot gym(scheme: "MyApp", workspace: "MyApp.xcworkspace", include_bitcode: false, export_xcargs: "-allowProvisioningUpdates") deliver(force: true) # frameit end # You can define as many lanes as you want after_all do |lane| # This block is called, only if the executed lane was successful # slack( # message: "Successfully deployed new App Update." # ) end error do |lane, exception| # slack( # message: exception.message, # success: false # ) end end # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md # All available actions: https://docs.fastlane.tools/actions # fastlane reports which actions are used. No personal data is recorded. # Learn more at https://github.com/fastlane/fastlane#metrics ```
`./fastlane/Appfile` ```ruby app_identifier "com.adrian.MyApp" # The bundle identifier of your app apple_id "adrian.@me.com" # Your Apple email address team_id "A983637AY3" # Developer Portal Team ID # you can even provide different app identifiers, Apple IDs and team names per lane: # More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md ```
### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------- | | fastlane | 2.60.0 | ✅ Up-To-Date | ### Loaded fastlane plugins: **No plugins Loaded**
Loaded gems | Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.1.0 | | slack-notifier | 1.5.1 | | CFPropertyList | 2.3.5 | | claide | 1.0.2 | | colored2 | 3.1.2 | | nanaimo | 0.2.3 | | xcodeproj | 1.5.1 | | rouge | 2.0.7 | | xcpretty | 0.2.8 | | terminal-notifier | 1.8.0 | | unicode-display_width | 1.3.0 | | terminal-table | 1.8.0 | | plist | 3.3.0 | | public_suffix | 2.0.5 | | addressable | 2.5.2 |‰ | multipart-post | 2.0.0 | | word_wrap | 1.0.0 | | tty-screen | 0.5.0 | | babosa | 1.0.2 | | colored | 1.2 | | highline | 1.7.8 | | commander-fastlane | 4.4.5 | | excon | 0.59.0 | | faraday | 0.13.1 | | unf_ext | 0.0.7.4 | | unf | 0.1.4 | | domain_name | 0.5.20170404 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | fastimage | 2.1.0 | | gh_inspector | 1.0.3 | | json | 2.0.2 | | mini_magick | 4.5.1 | | multi_json | 1.12.2 | | multi_xml | 0.6.0 | | rubyzip | 1.2.1 | | security | 0.1.3 | | xcpretty-travis-formatter | 0.0.4 | | dotenv | 2.2.1 | | bundler | 1.15.4 | | faraday_middleware | 0.12.2 | | uber | 0.1.0 | | declarative | 0.0.10 | | declarative-option | 0.1.0 | | representable | 3.0.4 | | retriable | 3.1.1 | | mime-types-data | 3.2016.0521 | | mime-types | 3.1 | | little-plugger | 1.1.4 | | logging | 2.2.2 | | jwt | 1.5.6 | | memoist | 0.16.0 | | os | 0.9.6 | | signet | 0.7.3 | | googleauth | 0.5.3 | | httpclient | 2.8.3 | | google-api-client | 0.13.6 | | io-console | 0.4.6 | | openssl | 2.0.3 | ‰
fastlane-bot commented 6 years ago

It seems like this issue might be related to code signing :no_entry_sign:

Have you seen our new Code Signing Troubleshooting Guide? It will help you resolve the most common code signing issues :+1:

AnisovAleksey commented 6 years ago

have the same issue and I'm discovered that generated _gym_config....plist is not correct. If you specified provisioningProfiles then you should specify signingStyle as manual, correct me if I'm wrong. I tried add signingStyle to generated gym_config....plist_ and it works fine.

So @AdrianBinDC, can you share your gym_config....plist file after build? I mean this file from your log: /var/folders/d0/zncpdgsn2l141snb7hr0m_xh0000gn/T/gym_config20171003-72632-fkkgo2.plist

AdrianBinDC commented 6 years ago

I got it working just now. Turns out I had an expired certificate. Xcode didn't note it, but the fastlane script pointed me in the right direction. Going to developer.apple.com/account/ and downloading a new certificate resolved resolved the issue.