fastlane: Changelogs are no longer showing up in TestFlight

New Issue Checklist

Issue Description

With no changes on our end, our TestFlight builds no longer have changelogs included. We have a custom action to generate the changelog that sets SharedValues::FL_CHANGELOG (#16000 has something to say about this but it appears to be supported behavior) and it clearly works, since the rest of the lane wouldn’t run if it wasn’t set.

Command executed
  desc "Submit a new beta build to TestFlight"
  lane :internal_beta do
    ensure_git_status_clean(show_uncommitted_changes: true)
    custom_changelog
    if lane_context[SharedValues::FL_CHANGELOG].match(/\A\s*(- Bump build number [^\n+])?\s*\z/)
      print("No changes since last tag, bailing")
    else
      match(type: "appstore")
      increment_build_number
      git_commit(path: ".", message: "Bump build number")
      add_git_tag(tag: "ios-#{lane_context[SharedValues::BUILD_NUMBER]}")
      build_ios_app(scheme: "(Scheme name)", configuration: "Beta", include_bitcode: true)
      upload_to_testflight(distribute_external: false, notify_external_testers: false)
      upload_dsyms
    end
  end
Complete output when running fastlane, including the stack trace and command used
 
[18:00:20]: Successfully finished processing the build 1.2 - 181 for IOS
[18:00:21]: Successfully set the changelog for build
[18:00:21]: Distributing new build to testers: 1.2 - 181
[18:00:21]: Successfully distributed build to Internal testers 🚀
 

But then, in TestFlight: Screen Shot 2020-03-05 at 6 14 01 PM

Environment

🚫 fastlane environment 🚫

Stack

Key Value
OS 10.15.3
Ruby 2.6.3
Bundler? true
Git git version 2.25.0
Installation Source ~/Development/quill/xcode/vendor/bundle/ruby/2.6.0/bin/fastlane
Host Mac OS X 10.15.3 (19D76)
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.3.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile` (contains sensitive information)
`./fastlane/Appfile` (contains sensitive information)

fastlane gems

Gem Version Update-Status
fastlane 2.142.0 🚫 Update available

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-sentry 1.6.0 ✅ Up-To-Date
fastlane-plugin-semaphore 0.2.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
atomos 0.1.3
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.4.1
unf_ext 0.0.7.6
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.5
emoji_regex 1.0.1
excon 0.72.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.0.1
signet 0.12.0
googleauth 0.10.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.0
google-cloud-errors 1.0.0
google-cloud-core 1.5.0
google-cloud-storage 1.25.1
json 2.3.0
mini_magick 4.10.1
multi_xml 0.6.0
plist 3.5.0
rubyzip 1.3.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.6.1
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.15.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.0
fastlane-plugin-semaphore 0.2.0
fastlane-plugin-sentry 1.6.0

generated on: 2020-03-05

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 57 (6 by maintainers)

Most upvoted comments

Still an issue.

@patissier-boulanger It’s a testflight’s bug…

To fix it:

In case anyone else is using the TestFlight website:
- Under External Groups, add a new group and then scroll down to click “Add Build” and fill in all the information.
- Afterwards, I removed the build and deleted the group.
This time when I ran my Fastfile, the changelog was successfully updated on the latest build.

+1 also facing this problem.

What worked for me was sending a first build to external testers (which requires review) and then cancel said review.

I did this by passing groups along with changelog.

Afterwards, I cancelled the review and went back to just passing changelog. I can now see in the logs:

[...] Successfully set the changelog for build

@tomires is your app perhaps a somewhat new one which was never sent for review? Mine was, and sending it for external test review once seemed to fix the problem.

Can confirm this is still an issue. Tested with changelog_from_git_commits action, which sets FL_CHANGELOG value.

I think I manage to make it work by setting the context value before calling upload_to_testflight

Actions.lane_context[SharedValues::FL_CHANGELOG] = changeLog

upload_to_testflight(
    ipa: "path_to_app_file.ipa",
    changelog: changeLog
)

I was also setting up a brand new app recently and was re-using my flawlessly working Fastlane setup for it. I then noticed that it was necessary for me to write a changelog manually once, after that it was published with my Fastlane step as well… Super strange 😄 Every time, also when it was not working, I had the success message in the Fastlane log output that the changelog message was successfully uploaded 😄

This seems to be completely random. Now after not changing any fastlane configs it stopped working again. There is really no way to tell what is going on with this functionality.

Eddpt’s solution worked for me too: https://github.com/fastlane/fastlane/issues/16129#issuecomment-757020428

But this still doesn’t work out of the box. But it is probably a bug on Apple’s side. But maybe something about this should be added to the docs some where.

Was same issue.

But for fix that, I made:

  • Changed user with access “App Manager”
  • Used this action:
In case anyone else is using the TestFlight website:
- Under External Groups, add a new group and then scroll down to click “Add Build” and fill in all the information.
- Afterwards, I removed the build and deleted the group.
This time when I ran my Fastfile, the changelog was successfully updated on the latest build.

Used code for example:

        changelog = changelog_from_git_commits(
          commits_count: 10,
          quiet: true,
          merge_commit_filtering: "exclude_merges"
        )
        puts "What to test:\n#{changelog}"

        upload_to_testflight(
          team_id: team_id,
          app_identifier: bundle_id,
          changelog: changelog,
        )

Making the user an App Manager resolved the issue

Looks like this problem still persists, thanks everyone

@Eddpt Holy macaroni, this worked for me too.

In case anyone else is using the TestFlight website:

  • Under External Groups, add a new group and then scroll down to click “Add Build” and fill in all the information.
  • Afterwards, I removed the build and deleted the group.

This time when I ran my Fastfile, the changelog was successfully updated on the latest build.

I found a nice workaround that worked for me:

Just use localized_build_info in your upload_to_testflight()

localized_build_info: {
    "default": {
        whats_new: options[:changelog],
    }
},

e.g.

upload_to_testflight(
      app_identifier: ENV['APP_IDENTIFIER'],
      ipa: "#{OUTPUT_DIRECTORY}#{PROJECT_NAME}.ipa",
      # The following is set to false in order to set the changelog
      # If using github runners, please set to false otherwise it 
      # will get really expensive!!!
      # skip_waiting_for_build_processing: true,
      skip_waiting_for_build_processing: false,
      verbose: true,
      uses_non_exempt_encryption: true,
      notify_external_testers: false,
      username:  ENV["APPLE_ID"],
      team_id: options[:apple_team_id],
      apple_id: options[:apple_app_id],
      itc_provider: ENV["sigh_#{options[:app_identifier]}_#{options[:match_type]}_team-id"],
      localized_build_info: {
        "default": {
          whats_new: options[:changelog],
        }
      },
      groups: [BUILD_FOR_PRODUCTION ? 'production_builds' : 'develop_builds']
    )