You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🔗 You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/Users/buildserver/.rbenv/versions/3.1.2/bin/fastlane)
/Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:456:in map': \e[31m[!] undefined method id' for nil:NilClass (NoMethodError)
certificates.map(&:id),
^^^^\e[0m
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:456:in `block in update!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/client.rb:688:in `with_retry'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:450:in `update!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:418:in `repair!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/repair.rb:28:in `block in repair_all'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/repair.rb:26:in `each'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/repair.rb:26:in `repair_all'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/commands_generator.rb:97:in `block (2 levels) in run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/commands_generator.rb:140:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/commands_generator.rb:17:in `start'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/bin/fastlane:23:in `<top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/bin/fastlane:25:in `load'
from /Users/buildserver/.rbenv/versions/3.1.2/bin/fastlane:25:in `<top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli/exec.rb:58:in `load'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli/exec.rb:23:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli.rb:486:in `exec'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli.rb:31:in `dispatch'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli.rb:25:in `start'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/exe/bundle:48:in `block in <top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/exe/bundle:36:in `<top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/bin/bundle:25:in `load'
from /Users/buildserver/.rbenv/versions/3.1.2/bin/bundle:25:in `<main>'
/Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:456:in map': undefined method id' for nil:NilClass (NoMethodError)
certificates.map(&:id),
^^^^
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:456:in `block in update!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/client.rb:688:in `with_retry'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:450:in `update!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/spaceship/lib/spaceship/portal/provisioning_profile.rb:418:in `repair!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/repair.rb:28:in `block in repair_all'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/repair.rb:26:in `each'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/repair.rb:26:in `repair_all'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/commands_generator.rb:97:in `block (2 levels) in run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/commands_generator.rb:140:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/sigh/lib/sigh/commands_generator.rb:17:in `start'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.212.2/bin/fastlane:23:in `<top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/bin/fastlane:25:in `load'
from /Users/buildserver/.rbenv/versions/3.1.2/bin/fastlane:25:in `<top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli/exec.rb:58:in `load'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli/exec.rb:23:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli.rb:486:in `exec'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli.rb:31:in `dispatch'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/cli.rb:25:in `start'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/exe/bundle:48:in `block in <top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /Users/buildserver/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.24/exe/bundle:36:in `<top (required)>'
from /Users/buildserver/.rbenv/versions/3.1.2/bin/bundle:25:in `load'
Environment
✅ fastlane environment ✅
Stack
Key
Value
OS
13.3.1
Ruby
3.1.2
Bundler?
true
Git
git version 2.39.0
Installation Source
~/.rbenv/versions/3.1.2/bin/fastlane
Host
macOS 13.3.1 ((a))
Ruby Lib Dir
~/.rbenv/versions/3.1.2/lib
OpenSSL Version
OpenSSL 3.0.7 1 Nov 2022
Is contained
false
Is homebrew
false
Is installed via Fabric.app
false
Xcode Path
/Applications/Xcode.app/Contents/Developer/
Xcode Version
14.2
Swift Version
5.7.2
System Locale
Variable
Value
LANG
de_DE.UTF-8
✅
LC_ALL
LANGUAGE
fastlane files:
`./fastlane/Fastfile`
# Customise this file, documentation can be found here:# https://github.com/fastlane/fastlane/tree/master/fastlane/docs# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md# can also be listed using the `fastlane actions` command# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md# fastlane reports which actions are used# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer# 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 versionfastlane_require'yaml'fastlane_require'./helpers/config.rb'fastlane_require'spaceship'default_platform:ios# Webhooks configured by rpittinger# Define global Xcode path to easy test new versions (Xcode.app vs. Xcode-beta.app). xversion alone did not work.ENV['XCODE_PATH']='/Applications/Xcode.app'before_alldo |lane,options|
# Set Xcode to usexcode_select(ENV['XCODE_PATH'])lanes_without_load_config=[:test,:test_nightly,:test_exaframeworks,:test_nightly_multiple_devices,:danger,:prepare_release]# Load config, except for test lanes and dangerload_config(brand: options[:brand],flavor: options[:flavor])unlesslanes_without_load_config.include?(lane)end######################### GENERAL LANES #########################errordo |lane,_exception|
platform=lane_context[SharedValues::PLATFORM_NAME]config=lane_context[SharedValues::WAIPU_CONFIG]iflane == 'build'# Switch back to automatic code signing# This is useful for when adjust build process to start with the "debug" build settings (that means automatic code signing)xcodeproj_path=get_xcodeproj_path(platform.to_s,config)update_code_signing_settings(path: xcodeproj_path,use_automatic_signing: true)slack(# message with short human friendly messagemessage: exception.to_s,success: false,# Output containing extended log outputpayload: {"Output"=>exception.error_info.to_s})endenddesc'Makes preparations before running unit tests'private_lane:prepare_testdoclear_derived_datacreate_devices(devices: [test_devices('ios'),test_devices('tvos')])enddeflatest_os_version_for_testing(platform)caseplatformwhen"ios"'16.2'when"tvos"'16.1'elseraise"Invalid platform: #{platform}"endenddefprimary_test_device(platform)device=nilcaseplatformwhen"ios"device="iPhone 13"when"tvos"device='Apple TV'elseraise"Invalid platform: #{platform}"endlatest_os_version=latest_os_version_for_testing(platform)return"#{device} (#{latest_os_version})"enddeftest_destination(platform)caseplatformwhen"ios"return"platform=iOS Simulator,name=#{primary_test_device(platform)},OS=#{latest_os_version_for_testing(platform)}"when"tvos"return"platform=tvOS Simulator,name=#{primary_test_device(platform)},OS=#{latest_os_version_for_testing(platform)}"elseraise"Invalid platform: #{platform}"endenddeftest_devices(platform)latest_os_version=latest_os_version_for_testing(platform)caseplatformwhen"ios"[primary_test_device(platform),"iPad Pro (10.5-inch) (#{latest_os_version})",]when"tvos"[primary_test_device(platform)]elseraise"Invalid platform: #{platform}"endenddesc'Runs all the tests'lane:testdo |options|
prepare_testunlessoptions[:skip_prepare]# tvOS# 2022-02-09 rpitting# We don't use the device paramter of scan (anymore) because xcodebuild had problems# to find the matching simulator, complaining about "multiple destinations",# although specified with a clear, unique simulator name. In addition, the command# was rereun by fastline multiple times until the actual scan process started.tvos_test_schemes=%w(ExaBaseTVTestso2-tvosTestswaipu-tvosTests)tvos_test_schemes.eachdo |scheme|
scan(scheme: scheme,destination: test_destination('tvos'),clean: false,skip_slack: true)end# iOSios_test_schemes=%w(ExaBaseMobileTestso2-iosTestswaipu-iosTests)ios_test_schemes.eachdo |scheme|
scan(scheme: scheme,destination: test_destination('ios'),clean: false,skip_slack: true)endtest_exaframeworks(destination: test_destination('ios'),)endlane:test_exaframeworksdo |options|
destination=options[:destination]configuration=options[:configuration]frameworks=%w(NoGCDWebServerTestsExaCoreTestsExaComTestsExaServiceTests)# Set "clean" to true, otherwise you might get compile errors for undefined symbolsframeworks.eachdo |framework|
scan(destination: destination,scheme: framework,configuration: configuration,clean: true,skip_slack: true)endenddesc'Runs all the nightly tests'lane:test_nightlydo |options|
prepare_testunlessoptions[:skip_prepare]scan(destination: test_destination('ios'),scheme: 'waipu-iosNightlyTests',configuration: options[:build_scheme_config],clean: false,slack_only_on_failure: true)scan(destination: test_destination('ios'),scheme: 'o2-iosNightlyTests',configuration: options[:build_scheme_config],clean: false,slack_only_on_failure: true)scan(destination: test_destination('tvos'),scheme: 'waipu-tvosNightlyTests',configuration: options[:build_scheme_config],clean: false,slack_only_on_failure: true)scan(destination: test_destination('tvos'),scheme: 'o2-tvosNightlyTests',configuration: options[:build_scheme_config],clean: false,slack_only_on_failure: true)enddesc'Runs all the tests on multiple iOS/tvOS devices'lane:test_nightly_multiple_devicesdo |options|
prepare_testunlessoptions[:skip_prepare]configuration=options[:build_scheme_config]derived_data_path='build'# Build once for all test devices (build_for_testing)...scan(build_for_testing: true,derived_data_path: derived_data_path,scheme: 'ExaBaseTVTests',configuration: configuration,slack_only_on_failure: true)# Now, use compiled test and run for mulitple devicesscan(test_without_building: true,clean: false,derived_data_path: derived_data_path,destination: test_destination('tvos'),scheme: 'ExaBaseTVTests',slack_only_on_failure: true)scan(build_for_testing: true,destination: test_destination('ios'),derived_data_path: derived_data_path,scheme: 'ExaBaseMobileTests',configuration: configuration,slack_only_on_failure: true)latest_os_version=latest_os_version_for_testing('ios')ipad_destination="iPad Pro (10.5-inch) (#{latest_os_version})"# Test on iPad# Not using devices option as xcodebuild cannot handle installed simulators correctlyscan(test_without_building: true,clean: false,derived_data_path: derived_data_path,destination: "platform=iOS Simulator,name=#{ipad_destination},OS=#{latest_os_version}",scheme: 'ExaBaseMobileTests',configuration: configuration,slack_only_on_failure: true)end######################### PRIVATE LANES GENERAL #########################desc'Builds the project, increments the build number and updates the app identifier according settings'private_lane:builddo |options|
config=lane_context[SharedValues::WAIPU_CONFIG]platform=options[:platform]scheme=options[:scheme]target=get_target_name(platform,config)# Request token to query App Store Connect APIapi_key=load_app_store_connect_api_keyUI.message"Building branch #{git_branch}"# Codesigning Informationteam_id=options[:team_id]codesigning_identity=options[:codesigning_identity]app_bundle_identifier=options[:app][:identifier]app_provisioning_profile_name=options[:app][:provisioning_profile_specifier]# Required valuesUI.user_error!'Must specifiy a development team id'unlessteam_idUI.user_error!'Must specify a codesigning identity'unlesscodesigning_identityUI.user_error!'Must specifiy an app_identifier'unlessapp_bundle_identifierUI.user_error!'Must specifiy a provisioning profile specifier'unlessapp_provisioning_profile_nameUI.user_error!'Must specifiy an export_method'unlessoptions[:export_method]UI.user_error!'Must specifiy a target platform (ios, tvos)'unlessplatformUI.user_error!'Must specifiy a build scheme (waipu-ios, waipu-tvos)'unlessschemeplist_path=get_info_plist_path(platform: platform,target: target,use_absolute_path: false)UI.user_error!'Invalid plist path'unlessplist_pathclear_derived_data# check if selected branch is a feature branch and use it if sobranch_name="develop"ifis_feature_branch_buildbranch_name=jira_ticket()endchange_app_icon(config,platform,branch_name)skip_git_tag_check=options[:skip_build_from_git_tag_check]UI.message"Skip build from git tag check: #{skip_git_tag_check}"# Check if release is build from a git taggit_tag_restriction_group=config.get('git_tag_restriction',optional: true)ifgit_tag_restriction_group != nil && skip_git_tag_check == falsecheck_if_build_from_git_tag(git_tag_restriction_group,platform,config)endset_plist_variables(platform: platform,target: target)# Optional valuessilent=options[:silent].nil? || falseconfiguration=options[:configuration] || 'Release'version=get_version(platform,config)app_identifier=config.get("app_identifier_#{platform}").to_slatest_testflight_build_number=latest_testflight_build_number(version: version,app_identifier: app_identifier,initial_build_number: 0,# because we always add one, use 0 for initial buildplatform: platform)build_number=latest_testflight_build_number + 1UI.message"Build number: #{build_number}"# needs full path hereifis_feature_branch_buildset_info_plist_value(path: "app-#{platform}/#{plist_path}",key: "BuildInfo",value: "#{branch_name} - (#{build_number})")endxcodeproj_path=get_xcodeproj_path(platform,config)increment_build_number(build_number: build_number,xcodeproj: xcodeproj_path)# Disables code signing for *all* targets;# maybe use "targets" parameter and specify build target (and all included frameworks?)update_code_signing_settings(path: xcodeproj_path,use_automatic_signing: false)# Note that your Target must not use $(SRCROOT) in Xcode for the Info.plist path!update_app_identifier(xcodeproj: xcodeproj_path,plist_path: plist_path,app_identifier: app_bundle_identifier)# Do not use option force: true# This created _thousands_ of provisioning profiles because the ones configured# expire once a year due to the yearly-expiring distribution signing identityget_provisioning_profile(app_identifier: app_bundle_identifier,api_key: api_key,platform: platform,provisioning_name: app_provisioning_profile_name,ignore_profiles_with_different_name: true,readonly: true)update_project_provisioning(xcodeproj: xcodeproj_path,target_filter: target,build_configuration: configuration,code_signing_identity: codesigning_identity)extensions=options[:extensions]extensions.eachdo |extension|
extension_target=extension['target']extension_bundle_identifier=extension['extension_identifier']extension_plist_path=extension['info_plist_path']extension_provisioning_profile=extension['provisioning_profile']UI.user_error!'Must specify a target for this extension'unlessextension_targetUI.user_error!"Must specify an identifier for extension with target: #{extension_target}"unlessextension_bundle_identifierUI.user_error!"Must specify a provisioning profile for extension with target: #{extension_target}"unlessextension_provisioning_profileUI.user_error!"Must specify a plist path for extension with target: #{extension_target}"unlessextension_plist_path# Absolute path to Info.plist needed hereset_info_plist_value(path: "app-#{platform}/#{extension_plist_path}",key: 'CFBundleShortVersionString',value: version)# Note that your Target must not use $(SRCROOT) in Xcode for the Info.plist path!update_app_identifier(xcodeproj: xcodeproj_path,plist_path: extension_plist_path,# Relative path to .xcodeprojapp_identifier: extension_bundle_identifier)# Do not use option force: true# This created _thousands_ of provisioning profiles because the ones configured# expire once a year due to the yearly-expiring distribution signing identityget_provisioning_profile(app_identifier: extension_bundle_identifier,api_key: api_key,platform: platform,provisioning_name: extension_provisioning_profile,ignore_profiles_with_different_name: true,readonly: true)update_project_provisioning(xcodeproj: xcodeproj_path,target_filter: extension_target,build_configuration: configuration,code_signing_identity: codesigning_identity)UI.message'Build extentions with target: ' + extension_targetendipa_name=config.get("ipa_name_prefix_#{platform}") + versiongym(workspace: config.get('workspace'),configuration: configuration,scheme: scheme,silent: silent,clean: true,output_name: ipa_name,output_directory: config.get('output_path'),export_options: {method: options[:export_method],teamID: team_id},include_symbols: true,codesigning_identity: codesigning_identity,xcargs: "CODE_SIGN_STYLE=Manual"# needed since Xcode 14, see https://forums.swift.org/t/xcode-14-beta-code-signing-issues-when-spm-targets-include-resources/59685/7)update_code_signing_settings(path: xcodeproj_path,use_automatic_signing: true)endplatform:tvosdoimport'Fastfile-tvOS'endplatform:iosdoimport'Fastfile-iOS'endlane:deploy_releasedo | options |
config=lane_context[SharedValues::WAIPU_CONFIG]build_artifacts=get_build_artifacts_pathsflavor=options[:flavor]platform=options[:platform]version_number=get_version(platform,config)plist_path=get_info_plist_path(platform: platform,target: config.get("target_#{platform}"),use_absolute_path: true)build_number=get_info_plist_value(path: plist_path,key: 'CFBundleVersion')changelog=""beginifis_feature_branch_buildchangelog=changelog_entry_for(platform,config)elsechangelog=changelog_from_yml(platform,config)endrescueStandardError=>exUI.user_error!(ex)endapp_platform=platformslack_platform_playload=':ios: iOS'caseplatformwhen'tvos'app_platform='appletvos'# yes, it really is 'appletvos' and not 'tvos'slack_platform_playload=':tvOS: tvOS'endapi_key=load_app_store_connect_api_keypilot(api_key: api_key,app_platform: app_platform,ipa: build_artifacts[:ipa_path],changelog: changelog,app_identifier: config.get("app_identifier_#{platform}"))ifconfig.get('notify_about_app_upload')slack(message: "New Version for #{config.get('name')} uploaded to TestFlight",slack_url: ENV['SLACK_URL_APP_RELEASE'],payload: {'Platform'=>slack_platform_playload,'Release Type'=>"#{flavor}",'Version'=>"#{version_number} (#{build_number})",'Release Notes'=>changelog},attachment_properties: {thumb_url: 'https://developer.apple.com/assets/elements/icons/testflight/testflight-64x64.png'},default_payloads: [],fail_on_error: false)endenddesc'Creates all neccessary test devices'lane:create_devicesdo |options|
UI.message'Will automatically create devices needed for testing'devices=options[:devices].flatten# Sample input:# iPad Pro (9.7-inch) (12.4)devices.eachdo |device|
system("xcrun simctl list devices | grep \"#{device}\"")# Quickfixplatform_string=device.include?('Apple TV') ? 'tvOS' : 'iOS'nextunless $CHILD_STATUS.exitstatus != 0# Searches sep or pattern (regexp) in the string and returns the part before it, the match, and the part after it.# If it is not found, returns two empty strings and str.device_version_parts=device.rpartition(' ')device_type=device_version_parts.firstos_runtime_version=device_version_parts.last.gsub(/[\(\)]/,'').stripbeginruntime=sh("xcrun simctl list runtimes | grep \"#{platform_string}#{os_runtime_version}\" | head -n1").split(/-/,3).last.stripdevicetype=sh("xcrun simctl list devicetypes | grep \"#{device_type} (com.apple.CoreSimulator.SimDeviceType\" | head -n1").split.last.gsub(/[\(\)]/,'')sh("xcrun simctl create \"#{device}\"\"#{devicetype}\"\"#{runtime}\"")UI.message"Creating #{device}"rescueUI.user_error!"Could not create test device: #{platform_string}#{os_runtime_version}"endendend######################### HELPER #########################desc"Returns if we are building for tvos"defis_platform_tvosplatform=lane_context[SharedValues::PLATFORM_NAME]returnplatform == "tvos"enddesc"Load the App Store Connect API token to use in other fastlane tools and actions"defload_app_store_connect_api_key# http://docs.fastlane.tools/actions/app_store_connect_api_key/#app_store_connect_api_keyapi_key=app_store_connect_api_key(key_id: "...",issuer_id: "...",key_filepath: "./fastlane/app-store-connect-api-key.p8")returnapi_keyenddesc"Returns the jira ticket part of the selected branch if it is a feature branch"defjira_ticketticket=ENV['JIRA_TICKET']ifticketreturnticketendresult=git_branch[/.*\/(TVFUS-[^_]*)/,1]ENV['JIRA_TICKET']=resultUI.message"🐌 Jira Ticket: #{result}"returnresultenddesc"Returns true if current build is from a feature branch"defis_feature_branch_buildreturn(not (jira_ticket.nil? || jira_ticket.strip.empty?))end# Reads changelog from ../CHANGELOG.yml for current project version.# Raises an exception if file could not be found or changelog for project# version is not available.# TODO: Should be an actiondefchangelog_from_yml(platform,config)key=platform == 'ios' ? 'changelog_path_ios' : 'changelog_path_tvos'path=config.get(key)changes=YAML.load_file(path)version=get_version(platform,config)change=changes.find{ |entry| entry['version'] == version}UI.user_error!"No release notes available for version: #{version}"unlesschange# changelog entries are reversed so the latest additions are on top in TestFlight build descriptionrelease_notes=change['notes'].reverse().reduce(''){ |notes,note| "#{notes}\n- #{note}"}unlesschanges.nil?enddesc"Returns the associated changelog message if build is from a feature branch"defchangelog_entry_for(platform,config)ticket=jira_ticket.to_sreturn""unlessticket.length > 5key=platform == 'ios' ? 'changelog_path_ios' : 'changelog_path_tvos'path=config.get(key)changes=YAML.load_file(path)version=get_version(platform,config)change=changes.find{ |entry| entry['version'] == version}# return the first message line containing the jira ticket number or else just the ticket numberresult=change['notes'].detect{ |line| line.include?ticket}return"#{ticket}: #{result.to_s}"enddefget_target_name(platform,config)# TODO: Actually check active target, using LANE_CONTEXT or fastlane shell parametersplatform == 'ios' ? config.get('target_ios') : config.get('target_tvos')end# Gets version number for iOS or tvOS lanesdefget_version(platform,config)xcodeproj=get_xcodeproj_path(platform,config)get_version_number(xcodeproj: xcodeproj,target: get_target_name(platform,config))end# does all the heavy lifting of changing the app icon appropriatelydefchange_app_icon(config,platform,branch_name)# Check if the AppIcon needs changesbadge_overlay_path=config.get('badge_overlay_path',optional: true)override_app_icon=(not (badge_overlay_path.nil? || badge_overlay_path.empty?))ifoverride_app_icon# app icon dict keyapp_icon_glob_key="app_icon_glob_#{platform}"# overlay image is found at badge_overlay_pathapp_icon_key="app_icon_#{platform}"app_icon_path=config.get(app_icon_key)# replace AppIconifapp_icon_pathtarget_key="app_icon_target_#{platform}"app_icon_dst=config.get(target_key)source_key="app_icon_#{platform}"app_icon_src=config.get(source_key)UI.message"Using alternativ Icon"# clear original resourcesremove_icon_files="rm -rf '..#{app_icon_dst}/*'"sh(remove_icon_files)# copy all resources for alternative Iconcopy_icon_files="cp -r './..#{app_icon_src}' './..#{app_icon_dst}/..'"sh(copy_icon_files)else# add custom DEV/PREVIEW badge image overlay for regular dev or preview buildsadd_badge(custom: badge_overlay_path,glob: config.get(app_icon_glob_key))end# add Jira ticket badgeifis_feature_branch_buildadd_badge(no_badge: "true",glob: config.get(app_icon_glob_key),shield: "#{branch_name}-red",shield_gravity: "South",shield_scale: "0.75",shield_parameters: "style=flat&labelColor=FF8300&color=FF8300")endendend# Retrieves version information from the tag that currently points to HEAD# Params:# +grouping+:: The group aka. folder the tag belongs todefget_version_from_tag(grouping,platform)tag=sh("git tag -l '#{grouping}/#{platform}/*' --points-at HEAD")version=tag.split(%r{/}).lastraise"Tag: #{tag} is not of scheme [#{grouping}/#{platform}/1.2.3]"ifversion.nil?version.chompenddefget_build_artifacts_pathsipa_path=nildsym_path=nilDir.chdir('..')doipa_path=Dir['./build_fastlane/*.ipa'].firstdsym_path=Dir['./build_fastlane/*.zip'].firstendUI.message'Could not find ipa file for upload'ifipa_path.nil?UI.message'Could not find dsym file for upload'ifdsym_path.nil?# Return a dictionary with the build artifact paths{ipa_path: ipa_path,dsym_path: dsym_path}end# Checks if the neccessary plist values are not emtpy and sets them.# Raises an error if one value is missing: AmazonLogin# Should prevent further constants refactoring issues, which actually promises to make everything better and saver.private_lane:set_plist_variablesdo |options|
config=lane_context[SharedValues::WAIPU_CONFIG]platform=options[:platform]target=options[:target]plist_path=get_info_plist_path(platform: platform,target: target,use_absolute_path: true)UI.user_error!'Invalid Info.plist path'unlessplist_pathenvironment_variables_for_plist=config.get('environment_variables_for_plist')environment_variables_for_plist.eachdo |hash|
key=hash['key']value=hash['value']set_info_plist_value(path: plist_path,key: key,value: value)UI.user_error!"Missing plist value for '#{key}' ��"unlessvalue && !value.strip.empty?endUI.success('Required environment variables are set 🙄')end# Checks if current project is build from tag and that tag version# matches version in Info.plist# Params:# +grouping+:: The name of the group that the tag belongs to e.g. appstoredefcheck_if_build_from_git_tag(grouping,platform,config)tag_version=get_version_from_tag(grouping,platform)project_version=get_version(platform,config)UI.user_error!"Tag version and project version differ [#{tag_version} vs. #{project_version}]"unlessproject_version.eql?tag_versionend# TODO: Convert to action?defget_xcodeproj_path(platform,config)platform == 'ios' ? config.get('project_ios') : config.get('project_tvos')endprivate_lane:get_info_plist_pathdo |options|
platform=options[:platform]target=options[:target]# Not used yetuse_absolute_path=options[:use_absolute_path]UI.user_error!'Must specify platform'ifplatform.nil?UI.user_error!'Must specify target'iftarget.nil?UI.user_error!'Must specify use_absolute_path'ifuse_absolute_path.nil?path="#{target}/Info.plist"path.prepend("app-#{platform}/")ifuse_absolute_pathpathend
`./fastlane/Appfile`
# Needed for latest_testflight_build_number to update the App Store Connect sessionitc_team_id"2250322"
fastlane gems
Gem
Version
Update-Status
fastlane
2.212.2
✅ Up-To-Date
Loaded fastlane plugins:
Plugin
Version
Update-Status
fastlane-plugin-badge
1.5.0
✅ Up-To-Date
Loaded gems
Gem
Version
error_highlight
0.3.0
did_you_mean
1.6.1
bundler
2.3.24
pathname
0.2.0
rake
13.0.6
rexml
3.2.5
CFPropertyList
3.0.6
public_suffix
5.0.1
addressable
2.8.4
artifactory
3.0.15
atomos
0.1.3
aws-eventstream
1.2.0
aws-partitions
1.765.0
aws-sigv4
1.5.2
jmespath
1.6.2
aws-sdk-core
3.172.0
aws-sdk-kms
1.64.0
aws-sdk-s3
1.122.0
babosa
1.0.4
fastimage
2.2.6
colored
1.2
highline
2.0.3
commander
4.6.0
dotenv
2.8.1
emoji_regex
3.2.3
excon
0.99.0
faraday-em_http
1.0.0
faraday-em_synchrony
1.0.0
faraday-excon
1.1.0
faraday-httpclient
1.0.1
multipart-post
2.0.0
faraday-multipart
1.0.4
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.3
unf_ext
0.0.8.2
unf
0.1.4
domain_name
0.5.20190701
http-cookie
1.0.5
faraday-cookie_jar
0.0.7
faraday_middleware
1.2.0
gh_inspector
1.1.3
jwt
2.7.0
memoist
0.16.2
multi_json
1.15.0
os
1.1.4
signet
0.17.0
googleauth
1.5.2
httpclient
2.8.3
mini_mime
1.1.2
declarative
0.0.20
trailblazer-option
0.1.2
uber
0.1.0
representable
3.2.0
retriable
3.1.2
webrick
1.8.1
google-apis-core
0.11.0
google-apis-androidpublisher_v3
0.42.0
google-apis-playcustomapp_v1
0.13.0
digest-crc
0.6.4
google-apis-iamcredentials_v1
0.17.0
google-apis-storage_v1
0.19.0
google-cloud-env
1.6.0
google-cloud-errors
1.3.1
google-cloud-core
1.6.0
google-cloud-storage
1.44.0
json
2.6.3
mini_magick
4.12.0
naturally
2.2.1
optparse
0.1.1
plist
3.7.0
rubyzip
2.3.2
security
0.1.3
simctl
1.6.10
terminal-notifier
2.0.0
unicode-display_width
1.8.0
terminal-table
1.8.0
tty-screen
0.8.1
tty-cursor
0.7.1
tty-spinner
0.9.3
word_wrap
1.0.0
claide
1.1.0
colored2
3.1.2
nanaimo
0.3.0
xcodeproj
1.22.0
rouge
2.0.7
xcpretty
0.3.0
xcpretty-travis-formatter
1.0.1
badge
0.13.0
cork
0.3.0
nap
1.1.0
open4
1.3.4
claide-plugins
0.9.2
faraday-http-cache
2.5.0
rchardet
1.8.0
git
1.13.2
kramdown
2.4.0
kramdown-parser-gfm
1.1.0
no_proxy_fix
0.1.2
sawyer
0.9.2
octokit
5.6.1
danger
9.3.0
multi_xml
0.6.0
httparty
0.21.0
gitlab
4.19.0
danger-gitlab
8.0.0
danger-plugin-api
1.0.0
git_diff_parser
2.3.0
danger-ios_logs
0.1.2
thor
0.20.3
danger-swiftlint
0.33.0
danger-todoist
2.0.1
xcresult
0.2.1
danger-xcode_summary
1.2.0
fastlane-plugin-badge
1.5.0
generated on:2023-05-22
The text was updated successfully, but these errors were encountered:
It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍
In the Apple Developer Portal, the suggested certificate type is "Apple Distribution" ("Sign development versions of your iOS, macOS, tvOS, and watchOS apps. For use in Xcode 11 or later.").
However, sigh repair only worked when I created a certificate with the type "iOS Distribution" ("App Store and Ad Hoc").
Therefore, fastlane does not seem to handle the new type "Apple Distribution".
rpitting
changed the title
sigh repair fails with "undefined method `id' for nil:NilClass (NoMethodError) certificates.map(&:id),
sigh repair fails with "undefined method `id' for nil:NilClass (NoMethodError) certificates.map(&:id)" with Apple Distribution certificate type
May 24, 2023
New Issue Checklist
Issue Description
sigh repair fails to repair provisioning profiles with a ruby error
Command executed
Complete output when running fastlane, including the stack trace and command used
Environment
✅ fastlane environment ✅
Stack
System Locale
fastlane files:
`./fastlane/Fastfile`
`./fastlane/Appfile`
fastlane gems
Loaded fastlane plugins:
Loaded gems
generated on: 2023-05-22
The text was updated successfully, but these errors were encountered: