hi I am not able to build for flutter ios using cicd GitLab on the local server
I am using shell executed
I have installed cocoa pod using bundler and gem file and trying to upload test build on firebase using Fastlane the complete step is working on local machine.
below command gets fired when I push to the main branch of the git repo
stages: # List of stages for jobs, and their order of execution
- deploy
flutter_build_ios:
stage: deploy
variables:
LC_ALL: "en_US.UTF-8"
before_script:
- >
if [ $CI_COMMIT_BRANCH == "main" ]; then
cd ios
gem install bundler
bundle update
else
echo "push not in main branch"
fi
# - gem install bundler
# - cd ios
# - bundle update
script:
- >
if [ $CI_COMMIT_BRANCH == "main" ]; then
bundle exec fastlane ios deploy_firebase release_env:live work_place:office flavor:hex target:hex build_name:2.0.10 build_number:45 testers_list:tester
else
echo "push not in main branch"
fi
but the same step on cicd gives error pasted below
Running with gitlab-runner 15.0.0 (febb2a09)
on flutter-amit rkE5ySa2
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on Darshans-Mac-mini.local...
Getting source from Git repository
00:04
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring/.git/
Checking out bba41c73 as main...
Removing .dart_tool/
Removing .flutter-plugins
Removing .flutter-plugins-dependencies
Removing .packages
Removing android/.gradle/
Removing android/app/src/main/java/
Removing android/fastlane/report.xml
Removing android/gradle/wrapper/gradle-wrapper.jar
Removing android/gradlew
Removing android/gradlew.bat
Removing android/local.properties
Removing build/
Removing ios/Flutter/Generated.xcconfig
Removing ios/Flutter/flutter_export_environment.sh
Removing ios/Runner/GeneratedPluginRegistrant.h
Removing ios/Runner/GeneratedPluginRegistrant.m
Removing pubspec.lock
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:45
$ if [ $CI_COMMIT_BRANCH == "main" ]; then # collapsed multi-line command
Successfully installed bundler-2.3.15
Parsing documentation for bundler-2.3.15
Done installing documentation for bundler after 0 seconds
1 gem installed
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies..........................................................
Using rake 13.0.6
Using concurrent-ruby 1.1.10
Using rexml 3.2.5
Using minitest 5.15.0
Using zeitwerk 2.5.4
Using httpclient 2.8.3
Using public_suffix 4.0.7
Using atomos 0.1.3
Using json 2.6.2
Using artifactory 3.0.15
Using aws-eventstream 1.2.0
Using jmespath 1.6.1
Using aws-partitions 1.598.0
Using bundler 2.3.15
Using babosa 1.0.4
Using nap 1.1.0
Using claide 1.1.0
Using fuzzy_match 2.0.4
Using netrc 0.11.0
Using cocoapods-downloader 1.6.3
Using ffi 1.15.5
Using colored2 3.1.2
Using cocoapods-deintegrate 1.0.5
Using cocoapods-search 1.0.1
Using cocoapods-try 1.2.0
Using escape 0.0.4
Using fourflusher 2.3.1
Using gh_inspector 1.1.3
Using molinillo 0.8.0
Using ruby-macho 2.5.1
Using colored 1.2
Using digest-crc 0.6.4
Using nanaimo 0.3.0
Using highline 2.0.3
Using declarative 0.0.20
Using emoji_regex 3.2.3
Using unf_ext 0.0.8.2
Using dotenv 2.7.6
Using excon 0.92.3
Using faraday-em_http 1.0.0
Using faraday-excon 1.1.0
Using multipart-post 2.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-net_http_persistent 1.2.0
Using faraday-httpclient 1.0.1
Using faraday-rack 1.0.0
Using faraday-retry 1.0.3
Using faraday-net_http 1.0.1
Using faraday-patron 1.0.0
Using jwt 2.4.1
Using memoist 0.16.2
Using multi_json 1.15.0
Using os 1.1.4
Using mini_mime 1.1.2
Using trailblazer-option 0.1.2
Using uber 0.1.0
Using retriable 3.1.2
Using webrick 1.7.0
Using ruby2_keywords 0.0.5
Using fastimage 2.2.6
Using google-cloud-errors 1.2.0
Using mini_magick 4.11.0
Using optparse 0.1.1
Using naturally 2.2.1
Using security 0.1.3
Using plist 3.6.0
Using rubyzip 2.3.2
Using terminal-notifier 2.0.0
Using unicode-display_width 1.8.0
Using tty-cursor 0.7.1
Using tty-screen 0.8.1
Using fastlane-plugin-firebase_app_distribution 0.3.4
Using word_wrap 1.0.0
Using rouge 2.0.7
Using i18n 1.10.0
Using CFPropertyList 3.0.5
Using tzinfo 2.0.4
Using addressable 2.8.0
Using aws-sigv4 1.5.0
Using algoliasearch 1.27.5
Using cocoapods-plugins 1.0.0
Using unf 0.1.4
Using faraday-multipart 1.0.4
Using cocoapods-trunk 1.6.0
Using ethon 0.15.0
Using terminal-table 1.8.0
Using commander 4.6.0
Using representable 3.2.0
Using xcodeproj 1.21.0
Using tty-spinner 0.9.3
Using simctl 1.6.8
Using xcpretty 0.3.0
Using activesupport 6.1.6
Using aws-sdk-core 3.131.1
Using typhoeus 1.4.0
Using domain_name 0.5.20190701
Using faraday 1.10.0
Using cocoapods-core 1.11.3
Using xcpretty-travis-formatter 1.0.1
Using http-cookie 1.0.5
Using aws-sdk-kms 1.57.0
Using cocoapods 1.11.3
Using faraday_middleware 1.2.0
Using signet 0.16.1
Using google-cloud-env 1.6.0
Using aws-sdk-s3 1.114.0
Using faraday-cookie_jar 0.0.7
Using google-cloud-core 1.6.0
Using googleauth 1.1.3
Using google-apis-core 0.5.0
Using google-apis-androidpublisher_v3 0.22.0
Using google-apis-storage_v1 0.15.0
Using google-apis-playcustomapp_v1 0.8.0
Using google-apis-iamcredentials_v1 0.11.0
Using google-cloud-storage 1.36.2
Using fastlane 2.206.2
Bundle updated!
$ if [ $CI_COMMIT_BRANCH == "main" ]; then # collapsed multi-line command
+-------------------------------------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Used plugins |
+-------------------------------------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Plugin | Version | Action |
+-------------------------------------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| fastlane-plugin-firebase_app_distribution | 0.3.4 | firebase_app_distribution_login, firebase_app_distribution_add_testers, firebase_app_distribution_get_udids, firebase_app_distribution, firebase_app_distribution_get_latest_release, firebase_app_distribution_remove_testers |
+-------------------------------------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[16:05:49]: ---------------------------
[16:05:49]: --- Step: opt_out_usage ---
[16:05:49]: ---------------------------
[16:05:49]: Disabled upload of used actions
[16:05:49]: ------------------------------
[16:05:49]: --- Step: default_platform ---
[16:05:49]: ------------------------------
[16:05:49]: Driving the lane 'ios deploy_firebase'
[16:05:49]: ----------------------------------------------
[16:05:49]: --- Step: Switch to ios build_flutter lane ---
[16:05:49]: ----------------------------------------------
[16:05:49]: Cruising over to lane 'ios build_flutter'
[16:05:49]: -------------------------------------------
[16:05:49]: --- Step: Switch to ios sh_on_root lane ---
[16:05:49]: -------------------------------------------
[16:05:49]: Cruising over to lane 'ios sh_on_root'
[16:05:49]: --------------------------------------------------------------------
[16:05:49]: Step: cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter clean
[16:05:49]: --------------------------------------------------------------------
[16:05:49]: $ cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter clean
[16:05:58]: ▸ Cleaning Xcode workspace... 6.1s
[16:05:58]: Cruising back to lane 'ios build_flutter'
[16:05:58]: -------------------------------------------
[16:05:58]: --- Step: Switch to ios sh_on_root lane ---
[16:05:58]: -------------------------------------------
[16:05:58]: Cruising over to lane 'ios sh_on_root'
[16:05:58]: --------------------------------------------------------------------
[16:05:58]: Step: cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter packages get
[16:05:58]: --------------------------------------------------------------------
[16:05:58]: $ cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter packages get
[16:06:06]: ▸ Running "flutter pub get" in order-process-monitoring... 5.7s
[16:06:07]: Cruising back to lane 'ios build_flutter'
[16:06:07]: -------------------------------------------
[16:06:07]: --- Step: Switch to ios sh_on_root lane ---
[16:06:07]: -------------------------------------------
[16:06:07]: Cruising over to lane 'ios sh_on_root'
[16:06:07]: --------------------------------------------------------------------
[16:06:07]: Step: cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter build ipa --release --build-name "2.0.10" --build-number 45 --export-options-plist=ios/fastlane/ExportOptions_ad-hoc.plist
[16:06:07]: --------------------------------------------------------------------
[16:06:07]: $ cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter build ipa --release --build-name "2.0.10" --build-number 45 --export-options-plist=ios/fastlane/ExportOptions_ad-hoc.plist
[16:06:17]: ▸ Archiving com.hhc.app.opm...
[16:06:17]: ▸ Automatically signing iOS for device deployment using specified development team in Xcode project: SSSSSSHSS
[16:06:19]: ▸ Warning: CocoaPods is installed but broken. Skipping pod install.
[16:06:19]: ▸ You appear to have CocoaPods installed but it is not working.
[16:06:19]: ▸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
[16:06:19]: ▸ This can usually be fixed by re-installing CocoaPods.
[16:06:19]: ▸ To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[16:06:19]: ▸ CocoaPods not installed or not in valid state.
+------------------+---------------------+
| Lane Context |
+------------------+---------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios deploy_firebase |
+------------------+---------------------+
[16:06:19]: Exit status of command 'cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter build ipa --release --build-name "2.0.10" --build-number 45 --export-options-plist=ios/fastlane/ExportOptions_ad-hoc.plist' was 1 instead of 0.
Archiving com.hhc.app.opm...
Automatically signing iOS for device deployment using specified development team in Xcode project: 33333333
Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
CocoaPods not installed or not in valid state.
+------+---------------------------------------------------------------+-------------+
| fastlane summary |
+------+---------------------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------------------------------------------+-------------+
| 1 | opt_out_usage | 0 |
| 2 | default_platform | 0 |
| 3 | Switch to ios build_flutter lane | 0 |
| 4 | Switch to ios sh_on_root lane | 0 |
| 5 | cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-pro | 8 |
| 6 | Switch to ios sh_on_root lane | 0 |
| 7 | cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-pro | 8 |
| 8 | Switch to ios sh_on_root lane | 0 |
| | cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-pro | 12 |
+------+---------------------------------------------------------------+-------------+
[16:06:19]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane...
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': [!] Exit status of command 'cd /Users/chetanshukla/builds/rkE5ySa2/0/mobileapps/order-process-monitoring && fvm flutter build ipa --release --build-name "2.0.10" --build-number 45 --export-options-plist=ios/fastlane/ExportOptions_ad-hoc.plist' was 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Archiving com.hhc.app.opm...
Automatically signing iOS for device deployment using specified development team in Xcode project: 3TSGHD34Z8
Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
CocoaPods not installed or not in valid state.
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/helper/sh_helper.rb:16:in `sh_no_action'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/fast_file.rb:223:in `block in sh'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/fast_file.rb:222:in `sh'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/fast_file.rb:216:in `sh'
from ../../scripts/Fastfile:11:in `block in parsing_binding'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/lane.rb:33:in `call'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:427:in `block (2 levels) in parsing_binding'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/lane.rb:33:in `call'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:662:in `block (2 levels) in parsing_binding'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/lane.rb:33:in `call'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:45:in `chdir'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:45:in `execute'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.2/bin/fastlane:23:in `<top (required)>'
from /usr/local/bin/fastlane:23:in `load'
from /usr/local/bin/fastlane:23:in `<top (required)>'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:in `run'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in `exec'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/exe/bundle:48:in `block in <top (required)>'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.15/exe/bundle:36:in `<top (required)>'
from /usr/local/bin/bundle:23:in `load'
from /usr/local/bin/bundle:23:in `<main>'
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
thanks in advance