fastlane: Upload to Testflight hanging on build processing and changelog not set

New Issue Checklist

Issue Description

I am attempting to upload builds to Testflight. The build does succeed and appears on Testflight, and works as expected, however when running the command on GitHub Actions, the terminal hangs when waiting for the build to process, it never recovers and I have to cancel the run manually. I have waited over an hour at times. All the while, the build has appeared on Testflight. I have seen previously fixed issues around this base on the version number. I have tried 1.0 and 1.0.0 and no luck with either.

The other issue is that the build that successfully uploads to Testflight never takes the changelog I am setting.

All of the above is only happening on CI (GitHub Actions). I never had this issue on my last project with Bitrise, and it works as expected locally. So I’m very confused.

My lane:

    # increment build number
    increment_build_number(build_number: params[:build_number])

    # match
    if is_ci
      setup_ci
    end
    match(type: "appstore", app_identifier: "com.abc.new-horizons-internal", readonly: false, api_key: auth)

    # test
    run_tests(workspace: "abc.xcworkspace", device: "iPhone 13 Pro", scheme: "Abc", testplan: "Internal-UAT")

    # build
    build_app(workspace: "Abc.xcworkspace", configuration: "Internal", scheme: "Abc")

    # deploy
    changelog = [
      "Latest UAT build from Develop branch",
      " ",
      "Latest commit message: #{params[:commit_message]}",
      " ",
      "Feedback is welcomed! Enjoy."
    ].join("\n") + "\n"

    upload_to_testflight(
      api_key: auth,
      changelog: changelog,
      distribute_external: true,
      groups: "UAT"
    )

My CI yaml:

name: Internal
on:
  workflow_dispatch:
  push:
    branches: [develop]
  pull_request:
    types: [opened, synchronize, reopened]
  schedule:
    - cron: '30 8 * * 4'

jobs:
  build_test_deploy:
    name: Building, testing and deploying
    runs-on: macOS-latest
    defaults:
      run:
        shell: bash
        working-directory: Abc
    
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Activate SSH key
        uses: webfactory/ssh-agent@v0.5.4
        with:
            ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

      - run: gem install bundler
      - run: cd ${{ github.workspace }}
      - run: bundle install
      - run: bundle exec pod keys set "SentryDSN" "${{ secrets.SENTRY_DSN }}"
      - run: bundle exec pod keys set "SegmentStagingAPIKey" "${{ secrets.SEGMENT_API_KEY_STAGING }}"
      - run: bundle exec pod keys set "ApiKeyStaging" "${{ secrets.API_KEY_STAGING }}"
      - run: bundle exec pod keys set "ApiKeyProduction" "${{ secrets.API_KEY_PRODUCTION }}"
      - run: pod install
      - if: ${{ github.event_name == 'pull_request' }}
        run: bundle exec fastlane internal_pr
      - if: ${{ github.event_name == 'push' }}
        run: bundle exec fastlane internal_develop build_number:${{ github.run_number }} commit_message:'${{ github.event.commits[0].message }}'
      - if: ${{ github.event_name == 'schedule' }}
        run: bundle exec fastlane internal_uat build_number:${{ github.run_number }} commit_message:'${{ github.event.commits[0].message }}'

Fastlane env:

And the Fastlane env for more context

<details><summary>✅ fastlane environment ✅</summary>

### Stack

| Key                         | Value                                       |
| --------------------------- | ------------------------------------------- |
| OS                          | 12.2.1                                      |
| Ruby                        | 2.7.5                                       |
| Bundler?                    | true                                        |
| Git                         | git version 2.32.0 (Apple Git-132)          |
| Installation Source         | ~/.gem/bin/fastlane                         |
| Host                        | macOS 12.2.1 (21D62)                        |
| Ruby Lib Dir                | /usr/local/Cellar/ruby@2.7/2.7.5/lib        |
| OpenSSL Version             | OpenSSL 1.1.1l  24 Aug 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_GB.UTF-8 | ✅ |
| LC_ALL   |             |   |
| LANGUAGE |             |   |


### fastlane files:

<details><summary>`./fastlane/Fastfile`</summary>

```ruby
default_platform(:ios)

# Certificate management

desc "Retrieve all the certificates and profiles to enable your machine to compile against devices"
lane :setup do
  match(type: "appstore", app_identifier: "com.my-company.new-horizons", readonly: true)
  match(type: "development", app_identifier: "com.my-company.new-horizons", readonly: true)

  match(type: "appstore", app_identifier: "com.my-company.new-horizons-internal", readonly: true)
  match(type: "development", app_identifier: "com.my-company.new-horizons-internal", readonly: true)
end

desc "Retrieve and force update all the certificates and profiles to allow your machine to compile against devices, including new ones. 
NOTE: This should only be run if new devices are required in the profiles and certificates. Other developers should call setup after this."
lane :setupForce do
  match(type: "appstore", app_identifier: "com.my-company.new-horizons", readonly: false, force_for_new_devices: true)
  match(type: "development", app_identifier: "com.my-company.new-horizons", readonly: false, force_for_new_devices: true)

  match(type: "appstore", app_identifier: "com.my-company.new-horizons-internal", readonly: false, force_for_new_devices: true)
  match(type: "development", app_identifier: "com.my-company.new-horizons-internal", readonly: false, force_for_new_devices: true)
end

# Add device

desc "Adds a device to the portal"
lane :addDevice do |parameters|
  if !parameters[:name]
  raise "No name specified"
  elsif !parameters[:udid]
  raise "No UDID specified"
  end

  auth

  register_devices(
    devices: {
    parameters[:name] => parameters[:udid]
   }
  )

  setupForce
end

platform :ios do
  # Deployments

  desc "Test pull request branches"
  lane :internal_pr do |params|
    # test
    run_tests(workspace: "my-company.xcworkspace", device: "iPhone 13 Pro", scheme: "my-company", testplan: "Internal-PR")
  end

  desc "Build, test and deploy an internal build to Testflight. Triggered by a push to Develop branc.h"
  lane :internal_develop do |params|
    auth

    # increment build number
    increment_build_number(build_number: params[:build_number])

    # match
    if is_ci
      setup_ci
    end
    match(type: "appstore", app_identifier: "com.my-company.new-horizons-internal", readonly: false, api_key: auth)

    # test
    run_tests(workspace: "my-company.xcworkspace", device: "iPhone 13 Pro", scheme: "my-company", testplan: "Internal-UAT")

    # build
    build_app(workspace: "my-company.xcworkspace", configuration: "Internal", scheme: "my-company")

    # deploy
    changelog = [
      "Latest build from Develop branch",
      " ",
      "Latest commit message: #{params[:commit_message]}",
    ].join("\n") + "\n"

    upload_to_testflight(
      api_key: auth,
      changelog: changelog,
    )
  end

  desc "Build, test and deploy an internal build to Testflight for UAT purposes. Triggered by a schedule in our YAML."
  lane :internal_uat do |params|
    auth

    # increment build number
    increment_build_number(build_number: params[:build_number])

    # match
    if is_ci
      setup_ci
    end
    match(type: "appstore", app_identifier: "com.my-company.new-horizons-internal", readonly: false, api_key: auth)

    # test
    run_tests(workspace: "my-company.xcworkspace", device: "iPhone 13 Pro", scheme: "my-company", testplan: "Internal-UAT")

    # build
    build_app(workspace: "my-company.xcworkspace", configuration: "Internal", scheme: "my-company")

    # deploy
    changelog = [
      "Latest UAT build from Develop branch",
      " ",
      "Latest commit message: #{params[:commit_message]}",
      " ",
      "Feedback is welcomed! Enjoy."
    ].join("\n") + "\n"

    upload_to_testflight(
      api_key: auth,
      changelog: changelog,
      distribute_external: true,
      groups: "UAT"
    )
  end

  # Helpers

  def auth
    api_key = app_store_connect_api_key(
      key_id: ENV["ASC_KEY_ID"],
      issuer_id: ENV["ASC_ISSUER_ID"],
      key_content: ENV["ASC_KEY_CONTENT"]
    )
    return api_key
  end
end

`./fastlane/Appfile`
app_identifier(ENV["APP_IDENTIFIER"]) # Bundle ID
apple_id(ENV["FASTLANE_APPLE_ID"]) # Vendor billing email address?
itc_team_id(ENV["ASC_TEAM_ID"])
team_id(ENV["DEVELOPER_PORTAL_TEAM_ID"])

fastlane gems

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

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-badge 1.5.0 ✅ Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.6.1
bundler 2.3.6
uri 0.11.0
rake 13.0.6
rexml 3.2.5
CFPropertyList 3.0.5
ZenTest 4.12.1
RubyInline 3.12.5
concurrent-ruby 1.1.9
i18n 1.9.1
minitest 5.15.0
tzinfo 2.0.4
zeitwerk 2.5.4
activesupport 6.1.4.4
public_suffix 4.0.6
addressable 2.8.0
httpclient 2.8.3
json 2.6.1
algoliasearch 1.27.5
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.2.0
aws-partitions 1.554.0
aws-sigv4 1.4.0
jmespath 1.5.0
aws-sdk-core 3.126.0
aws-sdk-kms 1.54.0
aws-sdk-s3 1.112.0
babosa 1.0.4
fastimage 2.2.6
colored 1.2
highline 2.0.3
commander 4.6.0
dotenv 2.7.6
emoji_regex 3.2.3
excon 0.91.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.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.9.3
unf_ext 0.0.8
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.4
faraday-cookie_jar 0.0.7
faraday_middleware 1.2.0
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.0
googleauth 1.1.1
mini_mime 1.1.2
declarative 0.0.20
trailblazer-option 0.1.2
uber 0.1.0
representable 3.1.1
retriable 3.1.2
webrick 1.7.0
google-apis-core 0.4.2
google-apis-androidpublisher_v3 0.16.0
google-apis-playcustomapp_v1 0.7.0
digest-crc 0.6.4
google-apis-iamcredentials_v1 0.10.0
google-apis-storage_v1 0.11.0
google-cloud-env 1.5.0
google-cloud-errors 1.2.0
google-cloud-core 1.6.0
google-cloud-storage 1.36.1
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
claide 1.1.0
colored2 3.1.2
nanaimo 0.3.0
xcodeproj 1.21.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
badge 0.13.0
fuzzy_match 2.0.4
nap 1.1.0
netrc 0.11.0
ffi 1.15.5
ethon 0.15.0
typhoeus 1.4.0
cocoapods-core 1.11.2
cocoapods-deintegrate 1.0.5
cocoapods-downloader 1.5.1
cocoapods-plugins 1.0.0
cocoapods-search 1.0.1
cocoapods-trunk 1.6.0
cocoapods-try 1.2.0
escape 0.0.4
fourflusher 2.3.1
molinillo 0.8.0
ruby-macho 2.5.1
cocoapods 1.11.2
osx_keychain 1.0.2
cocoapods-keys 2.2.1
fastlane-plugin-badge 1.5.0

generated on: 2022-02-24

```

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16

Most upvoted comments

Any updates on this? I mean, it’s 2025 and it’s still happening.