fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps

Home Page:https://fastlane.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pilot throw "Error uploading ipa file" when it's running on Github Action pipeline

thomassalcedo opened this issue · comments

New Issue Checklist

Issue Description

I'm using Fastlane to upload an alpha version app to TestFlight. When I ran this on github action, pilot throw "Error uploading ipa file" when it's working with the command line.
I've check my env variables (PATH, JAVA_HOME), ruby version and fastlane and everything fits.
It seems to be xcrun iTMSTransporter that fails but I can't figure out if it runs or fails before. I have tried "-errorLogs" option for iTMSTransporter but nothing appear

Part of the log

 INFO [2022-05-25 12:06:13.32]: ------------------------------------------
  INFO [2022-05-25 12:06:13.32]: --- Step: Switch to deploy_on_ios lane ---
  INFO [2022-05-25 12:06:13.32]: ------------------------------------------
  INFO [2022-05-25 12:06:13.32]: Cruising over to lane 'deploy_on_ios' 🚖
  INFO [2022-05-25 12:06:13.32]: ---------------------------------------
  INFO [2022-05-25 12:06:13.32]: --- Step: app_store_connect_api_key ---
  INFO [2022-05-25 12:06:13.32]: ---------------------------------------
  INFO [2022-05-25 12:06:13.32]: ----------------------------------------------
  INFO [2022-05-25 12:06:13.32]: --- Step: Switch to testflight_deploy lane ---
  INFO [2022-05-25 12:06:13.32]: ----------------------------------------------
  INFO [2022-05-25 12:06:13.32]: Cruising over to lane 'testflight_deploy' 🚖
  INFO [2022-05-25 12:06:13.32]: ------------------------
  INFO [2022-05-25 12:06:13.32]: --- Step: get_app_id ---
  INFO [2022-05-25 12:06:13.32]: ------------------------
  INFO [2022-05-25 12:06:13.32]: Reading app id at ./config.xml
  INFO [2022-05-25 12:06:13.33]: Found the app : app_name
  INFO [2022-05-25 12:06:13.33]: ----------------------------
  INFO [2022-05-25 12:06:13.33]: --- Step: read_changelog ---
  INFO [2022-05-25 12:06:13.33]: ----------------------------
  INFO [2022-05-25 12:06:13.33]: Found CHANGELOG.md at ./CHANGELOG.md
  INFO [2022-05-25 12:06:13.33]: Starting to read [Unreleased] section in fr-FR from './CHANGELOG.md' 
  INFO [2022-05-25 12:06:13.33]: Finished reading [Unreleased] section from './CHANGELOG.md'
  INFO [2022-05-25 12:06:13.33]: ----------------------------
  INFO [2022-05-25 12:06:13.33]: --- Step: read_changelog ---
  INFO [2022-05-25 12:06:13.33]: ----------------------------
  INFO [2022-05-25 12:06:13.33]: Found CHANGELOG.md at ./CHANGELOG.md
  INFO [2022-05-25 12:06:13.33]: Starting to read [Unreleased] section in en-US from './CHANGELOG.md' 
  INFO [2022-05-25 12:06:13.34]: Finished reading [Unreleased] section from './CHANGELOG.md'
  INFO [2022-05-25 12:06:13.36]: -------------------
  INFO [2022-05-25 12:06:13.36]: --- Step: pilot ---
  INFO [2022-05-25 12:06:13.36]: -------------------
  INFO [2022-05-25 12:06:13.36]: Creating authorization token for App Store Connect API
  DEBUG [2022-05-25 12:06:13.36]: App identifier (app_name)
  INFO [2022-05-25 12:06:15.94]: Ready to upload new build to TestFlight (App: 1470362419)...
  DEBUG [2022-05-25 12:06:16.00]: App Platform (ios)
  INFO [2022-05-25 12:06:16.77]: Wrote XML data to '/var/folders/ln/2574q6vj64952jb_1dsv8vchfm8mwk/T/d20220525-17843-wdvtqk/1470362419-4e186c56-b171-44cf-9c38-7f5667995154.itmsp'
  INFO [2022-05-25 12:06:16.98]: Going to upload updated app to App Store Connect
  INFO [2022-05-25 12:06:16.98]: This might take a few minutes. Please don't interrupt the script.
  DEBUG [2022-05-25 12:06:16.98]: xcrun iTMSTransporter -m upload -jwt YourJWT -assetFile /var/folders/ln/2574q6vj64952jb_1dsv8vchfm8mwk/T/4f6c9fd9-6ae1-419c-831d-1b6357914c02.ipa -k 100000 2>&1
  WARN [2022-05-25 12:06:18.03]: Lane Context:
  INFO [2022-05-25 12:06:18.03]: {:PLATFORM_NAME=>nil, :LANE_NAME=>"deploy", :GET_VERSION_CUSTOM_VALUE=>"2.7.6", :GET_VERSION_CUSTOM_CODE=>"207060", :GET_APP_ID=>"app_name", :READ_CHANGELOG_CHANGELOG_PATH=>"./CHANGELOG.md", :READ_CHANGELOG_SECTION_CONTENT=>"- Support of expense delegation in multi-company scenarios\n- Support delegation of expense reports creation"}
  ERROR [2022-05-25 12:06:18.03]: Error uploading ipa file: 
   
✅ fastlane environment ✅

Stack

Key Value
OS 12.3.1
Ruby 2.7.2
Bundler? true
Git git version 2.32.0 (Apple Git-132)
Installation Source ~/.rbenv/versions/2.7.2/bin/fastlane
Host macOS 12.3.1 (21E258)
Ruby Lib Dir ~/.rbenv/versions/2.7.2/lib
OpenSSL Version OpenSSL 1.1.1k 25 Mar 2021
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 13.2.1
Swift Version 5.5.2

System Locale

Variable Value
LANG en_US.UTF-8 ✅
LC_ALL
LANGUAGE

fastlane gems

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

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-appcenter 2.0.0 ✅ Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.4.0
bundler 2.1.4
uri 0.10.0
rake 13.0.6
rexml 3.2.5
CFPropertyList 3.0.5
public_suffix 4.0.7
addressable 2.8.0
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.2.0
aws-partitions 1.590.0
aws-sigv4 1.5.0
jmespath 1.6.1
aws-sdk-core 3.131.1
aws-sdk-kms 1.57.0
aws-sdk-s3 1.114.0
babosa 1.0.4
claide 1.1.0
colored 1.2
colored2 3.1.2
highline 2.0.3
commander 4.6.0
declarative 0.0.20
digest-crc 0.6.4
unf_ext 0.0.8.1
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
emoji_regex 3.2.3
excon 0.92.3
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.3
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.0
http-cookie 1.0.4
faraday-cookie_jar 0.0.7
faraday_middleware 1.2.0
fastimage 2.2.6
gh_inspector 1.1.3
jwt 2.3.0
memoist 0.16.2
multi_json 1.15.0
os 1.1.4
signet 0.16.1
googleauth 1.1.3
httpclient 2.8.3
mini_mime 1.1.2
trailblazer-option 0.1.2
uber 0.1.0
representable 3.2.0
retriable 3.1.2
webrick 1.7.0
google-apis-core 0.5.0
google-apis-androidpublisher_v3 0.21.0
google-apis-playcustomapp_v1 0.7.0
google-apis-iamcredentials_v1 0.10.0
google-apis-storage_v1 0.14.0
google-cloud-env 1.6.0
google-cloud-errors 1.2.0
google-cloud-core 1.6.0
google-cloud-storage 1.36.2
json 2.6.2
mini_magick 4.11.0
naturally 2.2.1
optparse 0.1.1
plist 3.6.0
rubyzip 2.3.2
security 0.1.3
simctl 1.6.8
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
nanaimo 0.3.0
xcodeproj 1.21.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
fastlane-plugin-appcenter 2.0.0

The relevant information about the error should be displayed just after the message: Error uploading ipa file:

unless result
transporter_errors = transporter.displayable_errors
UI.user_error!("Error uploading ipa file: \n #{transporter_errors}")
end

What else is in the logs?

Hi, thanks for your answer
I know that the error is incomplete but I have nothing more in the logs ...
Here is the continuation

INFO [2022-05-27 09:24:03.77]: Going to upload updated app to App Store Connect
INFO [2022-05-27 09:24:03.77]: This might take a few minutes. Please don't interrupt the script.
DEBUG [2022-05-27 09:24:03.78]: xcrun iTMSTransporter -m upload -jwt YourJWT -assetFile /var/folders/ln/2574q6vj64952jb_1dsv8vchfm8mwk/T/e7c3d001-75ab-48cc-9099-b8dcc1385ebc.ipa -k 100000 2>&1
WARN [2022-05-27 09:24:05.29]: Lane Context:
INFO [2022-05-27 09:24:05.29]: {:PLATFORM_NAME=>nil, :LANE_NAME=>"deploy", :GET_VERSION_CUSTOM_VALUE=>"2.7.7", :GET_VERSION_CUSTOM_CODE=>"207070", :GET_APP_ID=>"app_name", :READ_CHANGELOG_CHANGELOG_PATH=>"./CHANGELOG.md", :READ_CHANGELOG_SECTION_CONTENT=>"- Support of expense delegation in multi-company scenarios\n- Support delegation of expense reports creation"}
ERROR [2022-05-27 09:24:05.29]: Error uploading ipa file: 
 
INFO [2022-05-27 09:24:05.29]: Successfully generated documentation at path '/Users/rd/actions-runner-private/_work/MobileApp/MobileApp/Deployment/Deploy_DevApp/DevApp/DevApp/fastlane/README.md'

And this is the stack

bundler: failed to load command: fastlane (/Users/rd/.rbenv/versions/2.7.2/bin/fastlane)
FastlaneCore::Interface::FastlaneError: [!] Error uploading ipa file: 
 
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/pilot/lib/pilot/build_manager.rb:55:in `upload'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/actions/upload_to_testflight.rb:34:in `run'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Fastfile:310:in `block in parsing_binding'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Fastfile:101:in `block in parsing_binding'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Fastfile:31:in `block in parsing_binding'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
  /Users/rd/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/fastlane-2.206.1/bin/fastlane:23:in `<top (required)>'
  /Users/rd/.rbenv/versions/2.7.2/bin/fastlane:23:in `load'
  /Users/rd/.rbenv/versions/2.7.2/bin/fastlane:23:in `<top (required)>'
Error: Process completed with exit code 1.
```

Ok I found where the error came from, the github action runs a bash with the -e option and in my script I was exporting SHELLOPTS.
The problem is that in the iTMSTransporter command (which is a bash script), there is a command that has a non-zero return value (used to initialize the JAVA_VERSION_MAJOR) and so the bash ends on an error without even running iTMSTransporter.
Be careful if you export SHELLOPTS and inside there is the errexit option
SHELLOPTS: braceexpand:errexit:hashall:interactive-comments:pipefail

ezoic increase your site revenue