A few days ago, all my Jenkins pipelines started failing for iOS (Android is working fine). The specific issue is as follows:
set -o pipefail && xcodebuild -scheme project_name -project ./project_name.xcodeproj -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/galalhassan/Library/Developer/Xcode/Archives/2020-05-11/AdHoc\ 2020-05-11\ 16.42.08.xcarchive BUNDLE_IDENTIFIER=.**.* PROVISIONING_PROFILE_SPECIFIER=match\ AdHoc\ .***.* DEVELOPMENT_TEAM=*** archive | tee /Users/galalhassan/Library/Logs/gym/project_name.log | xcpretty
Driving the fastlane lane in terminal works 100% as expected.
Note: This was working 100% last week. After updating fastlane this issue started to happen.
✅ fastlane environment ✅
| Key | Value |
| --------------------------- | ------------------------------------------------------------------------------------- |
| OS | 10.15.4 |
| Ruby | 2.6.3 |
| Bundler? | true |
| Git | git version 2.24.2 (Apple Git-127) |
| Installation Source | ~/.jenkins/workspace/project_name-ios/_Final_/iOS/vendor/bundle/ruby/2.6.0/bin/fastlane |
| Host | Mac OS X 10.15.4 (19E287) |
| 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 | 11.4.1 |
| Variable | Value | |
| -------- | ----------- | - |
| LANG | en_US.UTF-8 | ✅ |
| LC_ALL | | |
| LANGUAGE | | |
./fastlane/Fastfile
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
lane :adhoc do |options|
begin
BUNDLE_ID = options[:bundle_id]
BUILD_NUMBER = options[:build_number]
WORKSPACE_PATH = options[:workspace_path]
PROVISION_PROFILE = "match AdHoc " + BUNDLE_ID
match(type: "adhoc", app_identifier: BUNDLE_ID)
ENV_STRING = "sigh_"+BUNDLE_ID+"_adhoc_profile-path"
PROFILE_PATH = ENV[ENV_STRING]
update_project_provisioning(
xcodeproj: "PROJECTNAME.xcodeproj",
target_filter: "TARGETNAME", # matches name or type of a target
build_configuration: "Release",
profile: PROFILE_PATH,
code_signing_identity: "Apple Distribution" # optionally specify the codesigning identity
)
settings_to_override = {
:BUNDLE_IDENTIFIER => BUNDLE_ID,
:PROVISIONING_PROFILE_SPECIFIER => PROVISION_PROFILE,
:DEVELOPMENT_TEAM => "****************"
}
increment_build_number(build_number: BUILD_NUMBER)
gym(
export_method:"ad-hoc",
xcargs: settings_to_override,
configuration: "Release",
export_options: {
provisioningProfiles: {
BUNDLE_ID => PROVISION_PROFILE
}
},
output_directory: "ipa/",
output_name: "AdHoc"
)
rescue => exception
on_error(exception, GAME_NAME)
end
end
def on_error(exception, game_name)
UI.user_error!("ERROR!!!"+exception.to_s)
end
./fastlane/Appfile
#app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
apple_id("[email protected]") # Your Apple email address
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
| Gem | Version | Update-Status |
| -------- | ------- | ------------- |
| fastlane | 2.146.1 | ✅ Up-To-Date |
| Plugin | Version | Update-Status |
| ----------------------------------------------------- | ------- | ------------- |
| fastlane-plugin-update_provisioning_profile_specifier | 1.3.1 | ✅ Up-To-Date |
| fastlane-plugin-aws_s3 | 1.8.0 | ✅ Up-To-Date |
Loaded gems
| Gem | Version |
| ----------------------------------------------------- | ------------ |
| did_you_mean | 1.3.0 |
| bundler | 1.17.2 |
| etc | 1.0.1 |
| forwardable | 1.2.0 |
| CFPropertyList | 3.0.2 |
| public_suffix | 2.0.5 |
| addressable | 2.7.0 |
| rubyzip | 1.3.0 |
| apktools | 0.7.3 |
| atomos | 0.1.3 |
| aws-eventstream | 1.1.0 |
| aws-partitions | 1.313.0 |
| aws-sigv4 | 1.1.3 |
| jmespath | 1.4.0 |
| aws-sdk-core | 3.95.0 |
| aws-sdk-kms | 1.31.0 |
| aws-sdk-s3 | 1.64.0 |
| babosa | 1.0.3 |
| claide | 1.0.3 |
| colored | 1.2 |
| colored2 | 3.1.2 |
| highline | 1.7.10 |
| commander-fastlane | 4.4.6 |
| declarative | 0.0.10 |
| declarative-option | 0.1.0 |
| digest-crc | 0.5.1 |
| unf_ext | 0.0.7.7 |
| unf | 0.1.4 |
| domain_name | 0.5.20190701 |
| dotenv | 2.7.5 |
| emoji_regex | 1.0.1 |
| excon | 0.73.0 |
| multipart-post | 2.0.0 |
| faraday | 0.17.3 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| faraday_middleware | 0.13.1 |
| fastimage | 2.1.7 |
| gh_inspector | 1.1.3 |
| jwt | 2.1.0 |
| memoist | 0.16.2 |
| multi_json | 1.14.1 |
| os | 1.1.0 |
| signet | 0.14.0 |
| googleauth | 0.12.0 |
| httpclient | 2.8.3 |
| mini_mime | 1.0.2 |
| uber | 0.1.0 |
| representable | 3.0.4 |
| retriable | 3.1.2 |
| google-api-client | 0.36.4 |
| google-cloud-env | 1.3.1 |
| google-cloud-errors | 1.0.0 |
| google-cloud-core | 1.5.0 |
| google-cloud-storage | 1.26.1 |
| json | 2.3.0 |
| mini_magick | 4.10.1 |
| multi_xml | 0.6.0 |
| plist | 3.5.0 |
| security | 0.1.3 |
| naturally | 2.2.0 |
| simctl | 1.6.8 |
| slack-notifier | 2.3.2 |
| terminal-notifier | 2.0.0 |
| unicode-display_width | 1.7.0 |
| terminal-table | 1.8.0 |
| tty-screen | 0.7.1 |
| tty-cursor | 0.7.1 |
| tty-spinner | 0.9.3 |
| word_wrap | 1.0.0 |
| nanaimo | 0.2.6 |
| xcodeproj | 1.16.0 |
| rouge | 2.0.7 |
| xcpretty | 0.3.0 |
| xcpretty-travis-formatter | 1.0.0 |
| mime-types-data | 3.2020.0425 |
| mime-types | 3.3.1 |
| fastlane-plugin-aws_s3 | 1.8.0 |
| fastlane-plugin-update_provisioning_profile_specifier | 1.3.1 |
generated on: 2020-05-11
Update:
Adding these environment variables to the Jenkins Environment fixed the issue:
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
Most helpful comment
Update:
Adding these environment variables to the Jenkins Environment fixed the issue: