Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload_to_testflight(distribute_only:true) stuck on "Waiting for the build to show up in the build list" #18606

Closed
4 tasks done
jeremy303 opened this issue Apr 26, 2021 · 23 comments · Fixed by #18710
Closed
4 tasks done

Comments

@jeremy303
Copy link

New Issue Checklist

Issue Description

In my Fastfile, I'm executing upload_to_testflight() with the option distribute_only:true, however Fastlane is is becoming stuck on "Waiting for the build to show up in the build list"-- which shouldn't happen for the distribute_only:true option.

I use this same Fastfile for many apps and this has worked previously for other apps. One key difference, however, is the other apps had builds that were previously submitted to TestFlight through a typical FastLane build process, i.e. FastLane building the app locally and then uploading to TestFlight. This problem is appearing with a new app with a build uploaded by another developer and my FastLane script is trying to distribute this build as the first submission to TestFlight.

Command executed

fastlane beta distribute_only:true

The "beta" action from my FastFile follows.

  desc "Upload to TestFlight"
  lane :beta do |options|
    edit_file(file: "../testflight/what_to_test.txt")
    beta_app_review_info = {
      contact_email: File.read("../testflight/contact_email_address.txt").strip,
      contact_first_name: File.read("../testflight/contact_first_name.txt").strip,
      contact_last_name: File.read("../testflight/contact_last_name.txt").strip,
      contact_phone: File.read("../testflight/contact_phone_number.txt").strip,
      demo_account_name: File.read("../testflight/demo_user.txt").strip,
      demo_account_password: File.read("../testflight/demo_password.txt").strip,
      notes: File.read("../testflight/review_notes.txt").strip,
    }
    localized_build_info = {
      default: {
        whats_new: File.read("../testflight/what_to_test.txt").strip,
      },
    }
    distribute_external = options.fetch(:distribute_external, true);
    groups = nil
    if distribute_external
      external_group =  File.read("../testflight/internal/external_testers_group.txt").strip
      groups = [external_group]
    end
distribute_only = options.fetch(:distribute_only, false);

if !distribute_only && !options[:skip_xcarchive]
  ipa_from_xcarchive
end

if !distribute_only && !options[:skip_resign]
  resign_ipa(options)
end
    
upload_to_testflight( 
  beta_app_review_info: beta_app_review_info,
  localized_build_info: localized_build_info,
  distribute_external: distribute_external,
  distribute_only: distribute_only,
  build_number: options[:build_number],
  groups: groups,
)

end

Complete output when running fastlane, including the stack trace and command used

The following output includes the breaking of the script with control-C. Otherwise, the script seems to remain indefinitely stuck in the "Waiting..." loop.

 
$ fastlane beta distribute_only:true --verbose
[✔] 🚀 
[18:02:28]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
DEBUG [2021-04-26 18:02:29.15]: Checking if there are any plugins that should be loaded...
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
DEBUG [2021-04-26 18:02:29.32]: Using distribute_only: true
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
INFO [2021-04-26 18:02:29.33]: ---------------------
INFO [2021-04-26 18:02:29.33]: --- Step: team_id ---
INFO [2021-04-26 18:02:29.33]: ---------------------
INFO [2021-04-26 18:02:29.33]: Setting Team ID to 'XXXXXXXXX' for all build steps
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
INFO [2021-04-26 18:02:29.33]: ------------------------------
INFO [2021-04-26 18:02:29.33]: --- Step: default_platform ---
INFO [2021-04-26 18:02:29.33]: ------------------------------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
INFO [2021-04-26 18:02:29.34]: Driving the lane 'ios beta' 🚀
INFO [2021-04-26 18:02:29.34]: ------------------------------------------
INFO [2021-04-26 18:02:29.34]: --- Step: Switch to ios edit_file lane ---
INFO [2021-04-26 18:02:29.34]: ------------------------------------------
INFO [2021-04-26 18:02:29.34]: Cruising over to lane 'ios edit_file' 🚖
INFO [2021-04-26 18:02:32.20]: Cruising back to lane 'ios beta' 🚘
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
Successfully loaded Appfile at path '/XXX/ios/fastlane/Appfile'
- app_identifier: 'xxx.xxxx.xxxxx'
-------
INFO [2021-04-26 18:02:32.32]: ----------------------------------
INFO [2021-04-26 18:02:32.32]: --- Step: upload_to_testflight ---
INFO [2021-04-26 18:02:32.32]: ----------------------------------
INFO [2021-04-26 18:02:32.32]: Login to App Store Connect (xxx@xxx.xxx)
Reading keychain entry, because either user or password were empty
Loading session from '/Users/jeremy/.fastlane/spaceship/xxx@xxx.xxx/cookie'
Looking for App Store Connect Team with name XXXXXXX
Looking for App Store Connect Team with ID XXXXX
INFO [2021-04-26 18:02:33.40]: Login successful
DEBUG [2021-04-26 18:02:33.40]: App Platform (ios)
DEBUG [2021-04-26 18:02:33.40]: App identifier (xxx.xxxx.xxxxx)
INFO [2021-04-26 18:02:36.25]: Waiting for processing on... app_id: XXXXXXX, app_version: , build_version: , platform: IOS
WARN [2021-04-26 18:02:36.25]: Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997
INFO [2021-04-26 18:02:36.25]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
INFO [2021-04-26 18:03:06.25]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
^CWARN [2021-04-26 18:03:09.84]: Lane Context:
INFO [2021-04-26 18:03:09.84]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios beta"}
INFO [2021-04-26 18:03:09.84]: Successfully generated documentation at path '/XXX/ios/fastlane/README.md'

+------+----------------------+-------------+
| fastlane summary |
+------+----------------------+-------------+
| Step | Action | Time (in s) |
+------+----------------------+-------------+
| 1 | team_id | 0 |
| 2 | default_platform | 0 |
| 3 | Switch to ios | 0 |
| | edit_file lane | |
| 4 | upload_to_testflight | 37 |
+------+----------------------+-------------+

ERROR [2021-04-26 18:03:09.85]: fastlane finished with errors
Traceback (most recent call last):
31: from /usr/local/bin/fastlane:23:in <main>' 30: from /usr/local/bin/fastlane:23:in load'
29: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/bin/fastlane:23:in <top (required)>' 28: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off'
27: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:41:in start' 26: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:352:in run'
25: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in run!' 24: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
23: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in run_active_command' 22: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in run'
21: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in call' 20: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:108:in block (2 levels) in run'
19: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle' 18: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane'
17: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:45:in execute' 16: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:45:in chdir'
15: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:49:in block in execute' 14: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/lane.rb:33:in call'
13: from ../../../../ios-support/iOS.Fastfile:200:in block (2 levels) in parsing_binding' 12: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing'
11: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' 10: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:229:in execute_action'
9: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:229:in chdir' 8: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action'
7: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action' 6: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action'
5: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/actions/upload_to_testflight.rb:28:in run' 4: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/pilot/lib/pilot/build_manager.rb:102:in wait_for_build_processing_to_be_complete'
3: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/build_watcher.rb:27:in wait_for_build_processing_to_be_complete' 2: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/build_watcher.rb:27:in loop'
1: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/build_watcher.rb:56:in block in wait_for_build_processing_to_be_complete' /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/build_watcher.rb:56:in sleep': Interrupt

Environment

 
  
✅ fastlane environment ✅

Stack

Key Value
OS 11.2.3
Ruby 2.6.3
Bundler? false
Git git version 2.24.3 (Apple Git-128)
Installation Source /usr/local/bin/fastlane
Host macOS 11.2.3 (20D91)
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 12.4

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
# import common Fastfile from appstore-submissions repo (intended to be the root
# of individual app submission repos)
import "../../../../ios-support/iOS.Fastfile"
`./fastlane/Appfile`
# Appfile provides values shared by fastlane tools

app_identifier File.read("../metadata/app_identifier.txt").strip

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.3.0
slack-notifier 2.3.2
atomos 0.1.3
CFPropertyList 2.3.6
claide 1.0.3
colored2 3.1.2
nanaimo 0.2.6
xcodeproj 1.13.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.6.0
terminal-table 1.8.0
plist 3.5.0
public_suffix 2.0.5
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.7.0
tty-cursor 0.7.0
tty-spinner 0.9.1
artifactory 3.0.15
babosa 1.0.3
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
excon 0.72.0
unf_ext 0.0.7.6
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
ruby2_keywords 0.0.2
faraday 1.1.0
faraday_middleware 1.0.0
fastimage 2.1.7
gh_inspector 1.1.3
json 2.1.0
mini_magick 4.10.1
naturally 2.2.0
rubyzip 2.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
dotenv 2.7.5
bundler 1.17.3
simctl 1.6.8
jwt 2.1.0
uber 0.1.0
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
mini_mime 1.0.2
multi_json 1.14.1
signet 0.13.0
memoist 0.16.2
os 1.0.1
googleauth 0.11.0
httpclient 2.8.3
google-api-client 0.38.0
google-cloud-env 1.3.1
google-cloud-errors 1.0.0
google-cloud-core 1.5.0
digest-crc 0.5.0
google-cloud-storage 1.25.1
emoji_regex 1.0.1
jmespath 1.4.0
aws-partitions 1.297.0
aws-eventstream 1.0.3
aws-sigv4 1.1.1
aws-sdk-core 3.94.0
aws-sdk-kms 1.30.0
aws-sdk-s3 1.61.2
forwardable 1.2.0
logger 1.3.0
stringio 0.0.2
ipaddr 1.2.2
openssl 2.1.2
ostruct 0.1.0
strscan 1.0.0
date 2.0.0
fileutils 1.1.0
etc 1.0.1
io-console 0.4.7
zlib 1.0.0
libxml-ruby 3.1.0
rexml 3.1.9
psych 3.1.0
mutex_m 0.1.0
webrick 1.4.2

generated on: 2021-04-26

@jeremy303
Copy link
Author

As I have to get this particular app out to TestFlight, I tried to move ahead with using my FastLane script to build from source and upload to TestFlight, but upload_to_testflight() failed with Server error got 500. Output is below:

$ fastlane beta [✔] 🚀 [18:59:00]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile [18:59:03]: --------------------- [18:59:03]: --- Step: team_id --- [18:59:03]: --------------------- [18:59:03]: Setting Team ID to 'xxx' for all build steps [18:59:03]: ------------------------------ [18:59:03]: --- Step: default_platform --- [18:59:03]: ------------------------------ [18:59:03]: Driving the lane 'ios beta' 🚀 [18:59:03]: ------------------------------------------ [18:59:03]: --- Step: Switch to ios edit_file lane --- [18:59:03]: ------------------------------------------ [18:59:03]: Cruising over to lane 'ios edit_file' 🚖 [18:59:07]: Cruising back to lane 'ios beta' 🚘 [18:59:07]: --------------------------------------------------- [18:59:07]: --- Step: Switch to ios ipa_from_xcarchive lane --- [18:59:07]: --------------------------------------------------- [18:59:07]: Cruising over to lane 'ios ipa_from_xcarchive' 🚖 [18:59:07]: --------------------- [18:59:07]: --- Step: xcbuild --- [18:59:07]: --------------------- [18:59:07]: For a more detailed xcodebuild log open /Users/xxx/Library/Logs/fastlane/xcbuild/2021-04-26/12503/xcodebuild.log [18:59:07]: $ set -o pipefail && xcodebuild -exportArchive -archivePath "XXX 4-26-21, 6.56 PM.xcarchive" -exportPath "." -exportOptionsPlist "../../../ios-support/export_options.plist" build | tee '/Users/xxx/Library/Logs/fastlane/xcbuild/2021-04-26/12503/xcodebuild.log' | xcpretty --color --simple [18:59:08]: ▸ 2021-04-26 18:59:08.918 xcodebuild[12515:7122859] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/qz/bjhhs9x127l0jp8rrv7c_hvr0000gp/T/XXX_2021-04-26_18-59-08.917.xcdistributionlogs'. [18:59:10]: ▸ Export Succeeded [18:59:10]: Exported .ipa from XXX 4-26-21, 6.56 PM.xcarchive [18:59:10]: Cruising back to lane 'ios beta' 🚘 [18:59:10]: ------------------------------------------- [18:59:10]: --- Step: Switch to ios resign_ipa lane --- [18:59:10]: ------------------------------------------- [18:59:10]: Cruising over to lane 'ios resign_ipa' 🚖 [18:59:10]: -------------------------------------- [18:59:10]: --- Step: get_provisioning_profile --- [18:59:10]: --------------------------------------

+-------------------------------------+------------------------+
| Summary for sigh 2.181.0 |
+-------------------------------------+------------------------+
| filename | app.mobileprovision |
| adhoc | false |
| developer_id | false |
| development | false |
| skip_install | false |
| force | false |
| app_identifier | xxx |
| username | xxx@xxx.xxx |
| team_id | xxx |
| ignore_profiles_with_different_name | false |
| skip_fetch_profiles | false |
| skip_certificate_verification | false |
| platform | ios |
| readonly | false |
| fail_on_name_taken | false |
+-------------------------------------+------------------------+

[18:59:10]: Starting login with user 'xxx@xxx.xxx'
[18:59:11]: Successfully logged in
[18:59:11]: Fetching profiles...
[18:59:12]: Verifying certificates...
[18:59:12]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you
[18:59:12]: Creating new provisioning profile for 'xxx' with name 'xxx AppStore' for 'ios' platform
[18:59:14]: Downloading provisioning profile...
[18:59:14]: Successfully downloaded provisioning profile...
[18:59:15]: Installing provisioning profile...
/xxx/ios/app.mobileprovision
[18:59:15]: Setting Provisioning Profile type to 'app-store'
[18:59:15]: --------------------------------------
[18:59:15]: --- Step: get_ipa_info_plist_value ---
[18:59:15]: --------------------------------------
[18:59:15]: --------------------------------------
[18:59:15]: --- Step: get_ipa_info_plist_value ---
[18:59:15]: --------------------------------------
[18:59:15]: --------------------------------------
[18:59:15]: --- Step: get_ipa_info_plist_value ---
[18:59:15]: --------------------------------------
[18:59:15]: Original bundle information:
[18:59:15]: App ID: xxx
[18:59:15]: Version: 1.0.0
[18:59:15]: Build number: 2
[18:59:15]: --------------------
[18:59:15]: --- Step: resign ---
[18:59:15]: --------------------
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/sigh/lib/assets/resign.sh xxx.ipa D7CCBE667AEE486645E7CF21870E8AAE8F3BAFD0 -p /xxx/ios/app.mobileprovision xxx.ipa
_floatsignTemp/Payload/GTSeaLevelApp.app: replacing existing signature

[18:59:16]: Successfully signed xxx.ipa!
[18:59:16]: Successfully re-signed .ipa 🔏.
[18:59:16]: Cruising back to lane 'ios beta' 🚘
[18:59:16]: ----------------------------------
[18:59:16]: --- Step: upload_to_testflight ---
[18:59:16]: ----------------------------------
[18:59:16]: Login to App Store Connect (xxx@xxx.xxx)
[18:59:17]: Login successful
[18:59:20]: Ready to upload new build to TestFlight (App: xxx)...
[18:59:34]: iTunes Transporter successfully finished its job
[18:59:34]: Going to upload updated app to App Store Connect
[18:59:34]: This might take a few minutes. Please don't interrupt the script.
[19:00:05]: iTunes Transporter successfully finished its job
[19:00:05]: --------------------------------------------------------------------
[19:00:05]: Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.
[19:00:05]: --------------------------------------------------------------------
[19:00:05]: Successfully uploaded the new binary to App Store Connect
[19:00:05]: If you want to skip waiting for the processing to be finished, use the skip_waiting_for_build_processing option
[19:00:05]: Note that if skip_waiting_for_build_processing is used but a changelog is supplied, this process will wait for the build to appear on AppStoreConnect, update the changelog and then skip the remaining of the processing steps.
[19:00:05]: Waiting for processing on... app_id: xxx, app_version: 1.0.0, build_version: 2, platform: IOS
[19:00:05]: Read more information on why this build isn't showing up yet - #14997
[19:00:05]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
[19:00:36]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
[19:01:09]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2) for IOS
[19:01:40]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2) for IOS
[19:02:11]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2) for IOS
[19:02:42]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2) for IOS
[19:03:13]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2) for IOS
[19:03:44]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2) for IOS
[19:04:14]: Successfully finished processing the build 1.0.0 - 2 for IOS
[19:04:15]: Using App Store Connect's default for notifying external testers (which is true) - set notify_external_testers for full control
[19:04:15]: Distributing new build to testers: 1.0.0 - 2
[19:04:15]: Export compliance has been set to 'false'. Need to wait for build to finishing processing again...
[19:04:15]: Set 'ITSAppUsesNonExemptEncryption' in the 'Info.plist' to skip this step and speed up the submission
+--------------------------------------+--------------------------------------+
| Lane Context |
+--------------------------------------+--------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios beta |
| XCODEBUILD_DERIVED_DATA_PATH | |
| SIGH_PROFILE_PATH | /Users/xxx/Developer/source/apps |
| | tore-submissions/submissions/sea-le |
| | vel-sensing/ios/app.mobileprovision |
| SIGH_PROFILE_PATHS | ["/Users/xxx/Developer/source/ap |
| | pstore-submissions/submissions/sea- |
| | level-sensing/ios/app.mobileprovisi |
| | on"] |
| SIGH_UDID | 55a432b1-03ed-4db6-8afb-8b7404a0cdc |
| | e |
| SIGH_UUID | 55a432b1-03ed-4db6-8afb-8b7404a0cdc |
| | e |
| SIGH_NAME | xxx AppStore |
| SIGH_PROFILE_TYPE | app-store |
| GET_IPA_INFO_PLIST_VALUE_CUSTOM_VAL | 2 |
| UE | |
+--------------------------------------+--------------------------------------+
[19:04:17]: Server error got 500

+------+------------------------+-------------+
| fastlane summary |
+------+------------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------------+-------------+
| 1 | team_id | 0 |
| 2 | default_platform | 0 |
| 3 | Switch to ios | 0 |
| | edit_file lane | |
| 4 | Switch to ios | 0 |
| | ipa_from_xcarchive | |
| | lane | |
| 5 | xcbuild | 3 |
| 6 | Switch to ios | 0 |
| | resign_ipa lane | |
| 7 | get_provisioning_prof | 4 |
| | ile | |
| 8 | get_ipa_info_plist_va | 0 |
| | lue | |
| 9 | get_ipa_info_plist_va | 0 |
| | lue | |
| 10 | get_ipa_info_plist_va | 0 |
| | lue | |
| 11 | resign | 1 |
| 💥 | upload_to_testflight | 300 |
+------+------------------------+-------------+

[19:04:17]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

➡️ 500 server error
#17886 [open] 49 💬
3 weeks ago

➡️ beta_pa path is relative to the fastlane directory, not the project directory
#500 [closed] 4 💬
22 Sep 2016

➡️ Deliver fails with error 500 on price tire update phase
#17736 [open] 10 💬
4 weeks ago

and 24 more at: https://github.com/fastlane/fastlane/search?q=The%20request%20could%20not%20be%20completed%20because%3A%0A%09Server%20error%20got%20500&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser.

[!] The request could not be completed because:
Server error got 500

Unfortunately, I didn't get a stack trace as I didn't use the --verbose flag. However, I noticed that the build was successfully uploaded to App Store Connect, so I tried running my script again using distribute_only:true to distribute this new build. This time the script did not hang looping on "Waiting for the build to show up in the build list", but it did fail with Server error got 500. This time I did get a stack trace, with the failure occuring in post_beta_app_review_submissions(). Output follows:

$ fastlane beta distribute_only:true --verbose [✔] 🚀 [19:16:33]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile DEBUG [2021-04-26 19:16:34.96]: Checking if there are any plugins that should be loaded... Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- DEBUG [2021-04-26 19:16:36.73]: Using distribute_only: true Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- INFO [2021-04-26 19:16:36.75]: --------------------- INFO [2021-04-26 19:16:36.75]: --- Step: team_id --- INFO [2021-04-26 19:16:36.75]: --------------------- INFO [2021-04-26 19:16:36.76]: Setting Team ID to 'xxx' for all build steps Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- INFO [2021-04-26 19:16:36.76]: ------------------------------ INFO [2021-04-26 19:16:36.76]: --- Step: default_platform --- INFO [2021-04-26 19:16:36.76]: ------------------------------ Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- INFO [2021-04-26 19:16:36.76]: Driving the lane 'ios beta' 🚀 INFO [2021-04-26 19:16:36.77]: ------------------------------------------ INFO [2021-04-26 19:16:36.77]: --- Step: Switch to ios edit_file lane --- INFO [2021-04-26 19:16:36.77]: ------------------------------------------ INFO [2021-04-26 19:16:36.77]: Cruising over to lane 'ios edit_file' 🚖 INFO [2021-04-26 19:17:33.51]: Cruising back to lane 'ios beta' 🚘 Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- Successfully loaded Appfile at path '/xxx/ios/fastlane/Appfile' - app_identifier: 'xxx' ------- INFO [2021-04-26 19:17:33.66]: ---------------------------------- INFO [2021-04-26 19:17:33.66]: --- Step: upload_to_testflight --- INFO [2021-04-26 19:17:33.66]: ---------------------------------- INFO [2021-04-26 19:17:33.66]: Login to App Store Connect (xxx@xxx.xxx) Reading keychain entry, because either user or password were empty Loading session from '/Users/xxx/.fastlane/spaceship/xxx@xxx.xxx/cookie' Looking for App Store Connect Team with name Georgia Tech Research Corporation Looking for App Store Connect Team with ID 420283 INFO [2021-04-26 19:17:34.66]: Login successful DEBUG [2021-04-26 19:17:34.66]: App Platform (ios) DEBUG [2021-04-26 19:17:34.68]: App identifier (xxx) INFO [2021-04-26 19:17:37.85]: Waiting for processing on... app_id: xxx, app_version: 1.0.0, build_version: 2, platform: IOS INFO [2021-04-26 19:17:38.30]: Successfully finished processing the build 1.0.0 - 2 for IOS WARN [2021-04-26 19:17:38.30]: No build specified - fetching latest build DEBUG [2021-04-26 19:17:38.30]: App Platform (ios) WARN [2021-04-26 19:17:39.43]: Using App Store Connect's default for notifying external testers (which is true) - set `notify_external_testers` for full control INFO [2021-04-26 19:17:39.43]: Distributing new build to testers: 1.0.0 - 2 Timeout received! Retrying after 3 seconds (remaining: 5)... Timeout received! Retrying after 3 seconds (remaining: 4)... Timeout received! Retrying after 3 seconds (remaining: 3)... Timeout received! Retrying after 3 seconds (remaining: 2)... Timeout received! Retrying after 3 seconds (remaining: 1)... WARN [2021-04-26 19:17:40.94]: Lane Context: INFO [2021-04-26 19:17:40.94]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios beta"} ERROR [2021-04-26 19:17:40.94]: Server error got 500 INFO [2021-04-26 19:17:40.95]: Successfully generated documentation at path '/xxx/ios/fastlane/README.md'

+------+----------------------+-------------+
| fastlane summary |
+------+----------------------+-------------+
| Step | Action | Time (in s) |
+------+----------------------+-------------+
| 1 | team_id | 0 |
| 2 | default_platform | 0 |
| 3 | Switch to ios | 0 |
| | edit_file lane | |
| 💥 | upload_to_testflight | 7 |
+------+----------------------+-------------+

ERROR [2021-04-26 19:17:40.96]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...
Search query: The request could not be completed because:
Server error got 500

URL: https://api.github.com/search/issues?q=The%20request%20could%20not%20be%20completed%20because%3A%0A%09Server%20error%20got%20500+repo:fastlane/fastlane
➡️ 500 server error
#17886 [open] 49 💬
3 weeks ago

➡️ beta_pa path is relative to the fastlane directory, not the project directory
#500 [closed] 4 💬
22 Sep 2016

➡️ Deliver fails with error 500 on price tire update phase
#17736 [open] 10 💬
4 weeks ago

and 24 more at: https://github.com/fastlane/fastlane/search?q=The%20request%20could%20not%20be%20completed%20because%3A%0A%09Server%20error%20got%20500&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser.
Traceback (most recent call last):
33: from /usr/local/bin/fastlane:23:in <main>' 32: from /usr/local/bin/fastlane:23:in load'
31: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/bin/fastlane:23:in <top (required)>' 30: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off'
29: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:41:in start' 28: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:352:in run'
27: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in run!' 26: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
25: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in run_active_command' 24: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in run'
23: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in call' 22: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:108:in block (2 levels) in run'
21: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle' 20: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane'
19: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:45:in execute' 18: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:45:in chdir'
17: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:49:in block in execute' 16: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/lane.rb:33:in call'
15: from ../../../../ios-support/iOS.Fastfile:200:in block (2 levels) in parsing_binding' 14: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing'
13: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' 12: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:229:in execute_action'
11: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:229:in chdir' 10: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action'
9: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action' 8: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action'
7: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/actions/upload_to_testflight.rb:29:in run' 6: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/pilot/lib/pilot/build_manager.rb:177:in distribute'
5: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/pilot/lib/pilot/build_manager.rb:401:in distribute_build' 4: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/models/build.rb:176:in post_beta_app_review_submission'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in post_beta_app_review_submissions' 2: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/testflight/testflight.rb:115:in post_beta_app_review_submissions'
1: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/api_client.rb:124:in post' /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/api_client.rb:191:in handle_response': Server error got 500 (Spaceship::InternalServerError)
33: from /usr/local/bin/fastlane:23:in <main>' 32: from /usr/local/bin/fastlane:23:in load'
31: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/bin/fastlane:23:in <top (required)>' 30: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off'
29: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:41:in start' 28: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:352:in run'
27: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in run!' 26: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
25: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in run_active_command' 24: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in run'
23: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in call' 22: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/commands_generator.rb:108:in block (2 levels) in run'
21: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle' 20: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane'
19: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:45:in execute' 18: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:45:in chdir'
17: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:49:in block in execute' 16: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/lane.rb:33:in call'
15: from ../../../../ios-support/iOS.Fastfile:200:in block (2 levels) in parsing_binding' 14: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing'
13: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' 12: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:229:in execute_action'
11: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:229:in chdir' 10: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action'
9: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action' 8: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action'
7: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/fastlane/lib/fastlane/actions/upload_to_testflight.rb:29:in run' 6: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/pilot/lib/pilot/build_manager.rb:177:in distribute'
5: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/pilot/lib/pilot/build_manager.rb:401:in distribute_build' 4: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/models/build.rb:176:in post_beta_app_review_submission'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in post_beta_app_review_submissions' 2: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/testflight/testflight.rb:115:in post_beta_app_review_submissions'
1: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/api_client.rb:124:in post' /Library/Ruby/Gems/2.6.0/gems/fastlane-2.181.0/spaceship/lib/spaceship/connect_api/api_client.rb:191:in handle_response': [!] The request could not be completed because: (Spaceship::InternalServerError)
Server error got 500

These errors may be distinct from my original error, but I wanted to include them for context. Also, these errors may be related to other Server error got 500 issues (#17886, #17736) , but in my case are breaking during the TestFlight actions, rather than in other FastLane actions documented in existing issues. Please let me know if I should file a different issue related to these errors.

@max-ott
Copy link
Contributor

max-ott commented Apr 29, 2021

What is the build / version code? How is it different to your "old"/other apps?

@jeremy303
Copy link
Author

Thanks, @max-ott.

In the first case ("Waiting..." loop), there was only a single build (build '1') and I used distribute_only:true without specifying the build-- when should default to the latest. I did the the same when using distribute_only:true with the second build (build '2', 500 error). If my recollection is correct, before uploading the second build I did try distribute_only:true while explicitly specifying build '1', having the same results ('Waiting..' loop).

@dproskin-clear
Copy link

sadly, also getting this issue. it seemed to have started the last few days, prior to that, was working fine. Apple's API status indicates an outage on 4/28/21 https://developer.apple.com/system-status/ that could be related and started this, but whatever it is, something is still going on.

We run our actions mostly on github actions and they usually work fine. I have noticed that randomly, if I run this command locally on my own mac, it works fine, whereas Github gets stuck. I'm wondering if Apple changed something that breaks this command.

@nwainwright
Copy link

We've been having the same issue. We had to fall back on manually uploading the files to the App Store. Btw...when I ran fastlane to send the dSyms to Firebase Apple sent me a text code that I had to type into fastlane. Is there a chance that Apple's APIs now have a new layer of security that's blocking fastlane? Btw, we use fastlane with CircleCI.

@max-ott
Copy link
Contributor

max-ott commented May 1, 2021

2 factor authentication is now required for already 2 months or so.

@nwainwright
Copy link

Thanks @max-ott, our fastlane+CircleCI started failing just last week

@nwainwright
Copy link

@max-ott how would we even do 2FA with fastlane and a hosted CircleCI build process?

@max-ott
Copy link
Contributor

max-ott commented May 2, 2021

Apple ID sessions are usually valid for 30 days, that’s why yours might have worked so long. Use App Store Connect API key (recommended) or copy over Apple ID session Cookies (https://docs.fastlane.tools/best-practices/continuous-integration/#authenticating-with-apple-services)

@nwainwright
Copy link

Wow, thanks @max-ott. It's so kind of you to reply, on a Sunday no less!

@nwainwright
Copy link

@andrewclaus
Copy link

This appears to be the same issue that I am having. I am using the AppStore API key and manually grabbing the latest build number (because it was failing to automatically select the latest build number).

fastfile:

  lane :external_pilot do |options|
    set_appstore_api_key

    build_number = app_store_build_number(live: false)

    testflight(
      distribute_only: true,
      groups: ["External Pilot Testers"],
      build_number: build_number.to_s
    )
  end

  lane :set_appstore_api_key do
    app_store_connect_api_key(
      key_id: "XXXXXX",
      issuer_id: "XXXXXX",
      key_filepath: "./AppStoreConnectAPIKey.p8",
      duration: 1200, # optional (maximum 1200)
      in_house: false, # optional but may be required if using match/sigh
    )
  end

output:

[18:41:23]: �[32m------------------------------�[0m
[18:41:23]: �[32m--- Step: default_platform ---�[0m
[18:41:23]: �[32m------------------------------�[0m
[18:41:23]: �[32mDriving the lane 'ios external_pilot' 🚀�[0m
[18:41:23]: �[32m-----------------------------------------------------�[0m
[18:41:23]: �[32m--- Step: Switch to ios set_appstore_api_key lane ---�[0m
[18:41:23]: �[32m-----------------------------------------------------�[0m
[18:41:23]: Cruising over to lane 'ios set_appstore_api_key' 🚖
[18:41:23]: �[32m---------------------------------------�[0m
[18:41:23]: �[32m--- Step: app_store_connect_api_key ---�[0m
[18:41:23]: �[32m---------------------------------------�[0m
[18:41:23]: Cruising back to lane 'ios external_pilot' 🚘
[18:41:23]: �[32m------------------------------------�[0m
[18:41:23]: �[32m--- Step: app_store_build_number ---�[0m
[18:41:23]: �[32m------------------------------------�[0m
[18:41:23]: Using App Store Connect API token...
[18:41:25]: Fetching the latest build number for any version
[18:41:27]: Latest upload for version 2.0.1 on ios platform is build: 2408
[18:41:27]: �[33mbuild_number: 2408�[0m
[18:41:27]: �[32m------------------------�[0m
[18:41:27]: �[32m--- Step: testflight ---�[0m
[18:41:27]: �[32m------------------------�[0m
[18:41:27]: Creating authorization token for App Store Connect API
[18:41:30]: Waiting for processing on... app_id: 929744216, app_version: , build_version: 2408, platform: IOS
[18:41:30]: �[33mRead more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997�[0m
[18:41:30]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)

And it continues waiting until the bulid server times out.

@nwainwright
Copy link

@andrewclaus I ensure that our main App Store account and the app specific password were in CircleCI and it worked again. See the link from @max-ott above.

@EmDee
Copy link
Contributor

EmDee commented May 7, 2021

We are suddenly running into this problem as well.

The build is correctly uploaded, but then at the end we're getting the Server error got 500 as well.

[14:37:46]: Successfully finished processing the build 21.18.5 - 2021050710 for IOS
[14:37:47]: Distributing new build to testers: 21.18.5 - 2021050710
[14:37:47]: Export compliance has been set to 'false'. Need to wait for build to finishing processing again...
[14:37:47]: Set 'ITSAppUsesNonExemptEncryption' in the 'Info.plist' to skip this step and speed up the submission
+------------------+----------------------------------+
|                    Lane Context                     |
+------------------+----------------------------------+
| DEFAULT_PLATFORM | ios                              |
| PLATFORM_NAME    | ios                              |
| LANE_NAME        | ios publish_testflight           |
| KEYCHAIN_PATH    | ~/Library/Keychains/tmp_keychain |
+------------------+----------------------------------+
[14:37:51]: Server error got 500

Not sure if this related to the ITSAppUsesNonExemptEncryption key. Another app has successfully been submitted roughly around the same time and that seems to be the only difference.

@EmDee
Copy link
Contributor

EmDee commented May 7, 2021

Setting ITSAppUsesNonExemptEncryption to NO didn't have any effect, i.e. still getting the server error. Not sure why it works for one apps and not for the other, yet.

The only difference in the upload_to_testflight job is the one that is failing has notify_external_testers: true. I can't imagine that it fails due that change, but I will try it out nonetheless.

@nwainwright
Copy link

@EmDee it's related to Apple's 2FA. We did the apple id and app-specific password and it's back to working fine. @max-ott shared https://docs.fastlane.tools/best-practices/continuous-integration/#method-3-application-specific-passwords and it has other options

@EmDee
Copy link
Contributor

EmDee commented May 7, 2021

@EmDee it's related to Apple's 2FA. We did the apple id and app-specific password and it's back to working fine. @max-ott shared https://docs.fastlane.tools/best-practices/continuous-integration/#method-3-application-specific-passwords and it has other options

Mine (and I think OP‘s) is a different issue though. I‘ve been using the session cookie solution for a while now.

The server 500 error is definitely a new one. I would venture and say something has changed on Apple‘s side, but I just don’t understand (yet) why another of our apps doesn’t run into this problem (both using the same session cookie).

@EmDee
Copy link
Contributor

EmDee commented May 7, 2021

As expected changing the notify_external_testers property didn't change anything.

This error sounds very similar to #17886 (comment), but that one was closed stating that Apple has fixed it.

@HolySamosa Are you still experiencing the same behavior?

@andrewclaus
Copy link

It seems like there was a new fastlane release with an update to the build watcher that went live today, #18682

So instead of the infinite loop of "Waiting for the build to show up in the build list", I get this error instead:
"There is no app version to watch"

I am not sure what is wrong.. This new error is still not helpful in tracking down the problem. I am trying to distribute this testflight version to my external test group. This build version exists in testflight in the "Approved" status.

Additional ouput

2021-05-14T20:44:25.9882910Z [20:44:25]: �[32m------------------------�[0m
2021-05-14T20:44:25.9884590Z [20:44:25]: �[32m--- Step: testflight ---�[0m
2021-05-14T20:44:25.9886750Z [20:44:25]: �[32m------------------------�[0m
2021-05-14T20:44:25.9887800Z [20:44:25]: Creating authorization token for App Store Connect API
2021-05-14T20:44:27.4449300Z [20:44:27]: Waiting for processing on... app_id: 715582067, app_version: , build_version: 3809, platform: IOS
2021-05-14T20:44:27.4477600Z +---------------------+--------------------+
2021-05-14T20:44:27.4488660Z | �[33mLane Context�[0m |
2021-05-14T20:44:27.4490000Z +---------------------+--------------------+
2021-05-14T20:44:27.4490910Z | DEFAULT_PLATFORM | ios |
2021-05-14T20:44:27.4491690Z | PLATFORM_NAME | ios |
2021-05-14T20:44:27.4492620Z | LANE_NAME | ios external_pilot |
2021-05-14T20:44:27.4493390Z | LATEST_BUILD_NUMBER | 3809 |
2021-05-14T20:44:27.4497010Z | LATEST_VERSION | 3.8.5 |
2021-05-14T20:44:27.4501760Z +---------------------+--------------------+
2021-05-14T20:44:27.4503200Z [20:44:27]: �[31mThere is no app version to watch�[0m
2021-05-14T20:44:27.5327600Z
2021-05-14T20:44:27.5345720Z +------+-----------------------------------------+-------------+
2021-05-14T20:44:27.5348390Z | �[32mfastlane summary�[0m |
2021-05-14T20:44:27.5349970Z +------+-----------------------------------------+-------------+
2021-05-14T20:44:27.5351080Z | Step | Action | Time (in s) |
2021-05-14T20:44:27.5352840Z +------+-----------------------------------------+-------------+
2021-05-14T20:44:27.5353790Z | 1 | default_platform | 0 |
2021-05-14T20:44:27.5354740Z | 2 | Switch to ios set_appstore_api_key lane | 0 |
2021-05-14T20:44:27.5356450Z | 3 | app_store_connect_api_key | 0 |
2021-05-14T20:44:27.5358800Z | 4 | app_store_build_number | 2 |
2021-05-14T20:44:27.5360130Z | 💥 | �[31mtestflight�[0m | 1 |
2021-05-14T20:44:27.5361720Z +------+-----------------------------------------+-------------+
2021-05-14T20:44:27.5362020Z
2021-05-14T20:44:27.5362770Z [20:44:27]: �[31mfastlane finished with errors�[0m
2021-05-14T20:44:27.5480820Z
2021-05-14T20:44:27.5482670Z Looking for related GitHub issues on fastlane/fastlane...
2021-05-14T20:44:27.5486140Z
2021-05-14T20:44:28.8400420Z ➡️ �[33m[Regression][fastlane_core][deliver] Fix deliver is unable to automatically select the latest build and submit it for review�[0m
2021-05-14T20:44:28.8402550Z https://github.com//pull/18682 [�[32mclosed�[0m] 3 💬
2021-05-14T20:44:28.8406910Z an hour ago
2021-05-14T20:44:28.8413500Z
2021-05-14T20:44:28.8414880Z ➡️ �[33mUploading to TestFlight hangs at "waiting for the build..." for very long time�[0m
2021-05-14T20:44:28.8416460Z https://github.com//issues/18054 [�[31mopen�[0m] 13 💬
2021-05-14T20:44:28.8417320Z 3 weeks ago
2021-05-14T20:44:28.8417830Z
2021-05-14T20:44:28.8419030Z ➡️ �[33mDELIVER (2.150.0.rc3/4) always ask attribute whatsNew�[0m
2021-05-14T20:44:28.8420390Z https://github.com//issues/16700 [�[31mopen�[0m] 80 💬
2021-05-14T20:44:28.8421300Z 2 weeks ago
2021-05-14T20:44:28.8421900Z
2021-05-14T20:44:28.8423220Z and 184 more at: https://github.com/fastlane/fastlane/search?q=There%20is%20no%20app%20version%20to%20watch&type=Issues&utf8=✓
2021-05-14T20:44:28.8424030Z
2021-05-14T20:44:28.8425200Z 🔗 You can ⌘ + double-click on links to open them directly in your browser.
2021-05-14T20:44:28.8427000Z bundler: failed to load command: fastlane (/usr/local/lib/ruby/gems/2.7.0/bin/fastlane)
2021-05-14T20:44:28.8428820Z /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:90:in matching_build': \e[31m[!] There is no app version to watch\e[0m (FastlaneCore::BuildWatcherError) 2021-05-14T20:44:28.8430800Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:31:in block in wait_for_build_processing_to_be_complete'
2021-05-14T20:44:28.8432450Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:30:in loop' 2021-05-14T20:44:28.8434170Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:30:in wait_for_build_processing_to_be_complete'
2021-05-14T20:44:28.8435850Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/pilot/lib/pilot/build_manager.rb:102:in wait_for_build_processing_to_be_complete' 2021-05-14T20:44:28.8437790Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/actions/upload_to_testflight.rb:28:in run'
2021-05-14T20:44:28.8440810Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action' 2021-05-14T20:44:28.8442650Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action'
2021-05-14T20:44:28.8444230Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action' 2021-05-14T20:44:28.8445830Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:229:in chdir'
2021-05-14T20:44:28.8447410Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:229:in execute_action' 2021-05-14T20:44:28.8449030Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name'
2021-05-14T20:44:28.8450580Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing' 2021-05-14T20:44:28.8452050Z from Fastfile:170:in block (2 levels) in parsing_binding'
2021-05-14T20:44:28.8454040Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/lane.rb:33:in call' 2021-05-14T20:44:28.8455610Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:49:in block in execute'
2021-05-14T20:44:28.8457120Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:45:in chdir' 2021-05-14T20:44:28.8458670Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:45:in execute'
2021-05-14T20:44:28.8460190Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane' 2021-05-14T20:44:28.8461880Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle'
2021-05-14T20:44:28.8463490Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/commands_generator.rb:109:in block (2 levels) in run' 2021-05-14T20:44:28.8465080Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
2021-05-14T20:44:28.8466530Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run' 2021-05-14T20:44:28.8468080Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
2021-05-14T20:44:28.8469620Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!' 2021-05-14T20:44:28.8471190Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
2021-05-14T20:44:28.8473120Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/commands_generator.rb:353:in run' 2021-05-14T20:44:28.8474730Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/commands_generator.rb:42:in start'
2021-05-14T20:44:28.8476290Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off' 2021-05-14T20:44:28.8477870Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/bin/fastlane:23:in <top (required)>'
2021-05-14T20:44:28.8479230Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in load' 2021-05-14T20:44:28.8480640Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in <top (required)>'
2021-05-14T20:44:28.8482030Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in load' 2021-05-14T20:44:28.8483560Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in kernel_load'
2021-05-14T20:44:28.8485140Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:28:in run' 2021-05-14T20:44:28.8486680Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:494:in exec'
2021-05-14T20:44:28.8488160Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 2021-05-14T20:44:28.8489790Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
2021-05-14T20:44:28.8491320Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 2021-05-14T20:44:28.8492930Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:30:in dispatch'
2021-05-14T20:44:28.8494410Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 2021-05-14T20:44:28.8496030Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:24:in start'
2021-05-14T20:44:28.8497500Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/exe/bundle:49:in block in <top (required)>' 2021-05-14T20:44:28.8499070Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/friendly_errors.rb:130:in with_friendly_errors'
2021-05-14T20:44:28.8500410Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/exe/bundle:37:in <top (required)>' 2021-05-14T20:44:28.8502360Z from /usr/local/lib/ruby/gems/2.7.0/bin/bundle:23:in load'
2021-05-14T20:44:28.8503620Z from /usr/local/lib/ruby/gems/2.7.0/bin/bundle:23:in <main>' 2021-05-14T20:44:28.8505480Z /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:90:in matching_build': There is no app version to watch (FastlaneCore::BuildWatcherError)
2021-05-14T20:44:28.8507290Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:31:in block in wait_for_build_processing_to_be_complete' 2021-05-14T20:44:28.8509360Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:30:in loop'
2021-05-14T20:44:28.8510890Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/build_watcher.rb:30:in wait_for_build_processing_to_be_complete' 2021-05-14T20:44:28.8512520Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/pilot/lib/pilot/build_manager.rb:102:in wait_for_build_processing_to_be_complete'
2021-05-14T20:44:28.8514060Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/actions/upload_to_testflight.rb:28:in run' 2021-05-14T20:44:28.8515550Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action'
2021-05-14T20:44:28.8517090Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action' 2021-05-14T20:44:28.8518550Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action'
2021-05-14T20:44:28.8520470Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:229:in chdir' 2021-05-14T20:44:28.8521870Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:229:in execute_action'
2021-05-14T20:44:28.8523360Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' 2021-05-14T20:44:28.8524850Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing'
2021-05-14T20:44:28.8526200Z from Fastfile:170:in block (2 levels) in parsing_binding' 2021-05-14T20:44:28.8527480Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/lane.rb:33:in call'
2021-05-14T20:44:28.8529200Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:49:in block in execute' 2021-05-14T20:44:28.8531140Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:45:in chdir'
2021-05-14T20:44:28.8532660Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/runner.rb:45:in execute' 2021-05-14T20:44:28.8534070Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane'
2021-05-14T20:44:28.8535580Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle' 2021-05-14T20:44:28.8537050Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/commands_generator.rb:109:in block (2 levels) in run'
2021-05-14T20:44:28.8538500Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call' 2021-05-14T20:44:28.8539810Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run'
2021-05-14T20:44:28.8541340Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command' 2021-05-14T20:44:28.8542750Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
2021-05-14T20:44:28.8544180Z from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!' 2021-05-14T20:44:28.8546080Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/commands_generator.rb:353:in run'
2021-05-14T20:44:28.8547540Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/commands_generator.rb:42:in start' 2021-05-14T20:44:28.8548970Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off'
2021-05-14T20:44:28.8550390Z from /usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.183.0/bin/fastlane:23:in <top (required)>' 2021-05-14T20:44:28.8551620Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in load'
2021-05-14T20:44:28.8553100Z from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in <top (required)>' 2021-05-14T20:44:28.8554370Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in load'
2021-05-14T20:44:28.8555720Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in kernel_load' 2021-05-14T20:44:28.8557050Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:28:in run'
2021-05-14T20:44:28.8558390Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:494:in exec' 2021-05-14T20:44:28.8559730Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
2021-05-14T20:44:28.8561190Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' 2021-05-14T20:44:28.8562640Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch'
2021-05-14T20:44:28.8564470Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:30:in dispatch' 2021-05-14T20:44:28.8565820Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start'
2021-05-14T20:44:28.8567190Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:24:in start' 2021-05-14T20:44:28.8568510Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/exe/bundle:49:in block in <top (required)>'
2021-05-14T20:44:28.8569940Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/friendly_errors.rb:130:in with_friendly_errors' 2021-05-14T20:44:28.8571280Z from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/exe/bundle:37:in <top (required)>'
2021-05-14T20:44:28.8572530Z from /usr/local/lib/ruby/gems/2.7.0/bin/bundle:23:in load' 2021-05-14T20:44:28.8573700Z from /usr/local/lib/ruby/gems/2.7.0/bin/bundle:23:in

'

@dcacenabes
Copy link
Contributor

It seems like there was a new fastlane release with an update to the build watcher that went live today, #18682

So instead of the infinite loop of "Waiting for the build to show up in the build list", I get this error instead:
"There is no app version to watch"

I am not sure what is wrong.. This new error is still not helpful in tracking down the problem. I am trying to distribute this testflight version to my external test group. This build version exists in testflight in the "Approved" status.

Additional ouput

I am not sure if this can help you, but we just had a similar issue. Before we were only passing the build number to the pilot call in order to submit the build. After latest update that does not work anymore, and we had now to also pass the app version as a parameter, otherwise it was trying to get a different version from the app store connect API.

@lucgrabowski
Copy link
Contributor

lucgrabowski commented May 17, 2021

I spent some time investigating how BuildWatcher was working before for deliver and pilot and both of them got a seperate treatment based on select_latest flag.

matched_builds = Spaceship::ConnectAPI::Build.all(
app_id: app_id,
version: watched_app_version,
build_number: watched_build_version,
platform: platform
)
# Raise error if more than 1 build is returned
# This should never happen but need to inform the user if it does
if matched_builds.size > 1 && !select_latest
error_builds = matched_builds.map do |build|
"#{build.app_version}(#{build.version}) for #{build.platform} - #{build.processing_state}"
end.join("\n")
error_message = "FastlaneCore::BuildWatcher found more than 1 matching build: \n#{error_builds}"
UI.crash!(error_message)
end

When select_latest for deliver is true BuildWatcher attempts to select latest build even if only build_number is provided and app_version is skipped. I think that if there were two builds, e.g. 1.1.0(2) and 1.0.0(1), and we were searching with 'build_number' = '1', it would fetch 1.0.0(1) as the latest.

upload_to_testflight/pilot calls BuildWatcher through BuildManager with select_latest = false:

def wait_for_build_processing_to_be_complete(return_when_build_appears = false)
platform = fetch_app_platform
if config[:ipa]
app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
else
app_version = config[:app_version]
app_build = config[:build_number]
end
latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(
app_id: app.id,
platform: platform,
app_version: app_version,
build_version: app_build,
poll_interval: config[:wait_processing_interval],
return_when_build_appears: return_when_build_appears,
return_spaceship_testflight_build: false
)

My understanding is that for pilot if AppStore ConnectAPI returns more than 1 build, it should crash.
For example, if we had builds 1.0.0(1) and 1.1.0(1) and used pilot with only build_number = 1 it would crash.
I think that it wouldn't crash only if build_number values were unique across all builds for the app, because AppStore would return only 1 build. Using only build_number without app_version may lead to unexpected results.
Please correct me if my understanding is wrong.

To have the same logic as before and match the logic without waiting for build processing enabled:

# Get latest uploaded build if no build specified
if build.nil?
app_version = config[:app_version]
build_number = config[:build_number]
if build_number.nil?
if app_version.nil?
UI.important("No build specified - fetching latest build")
else
UI.important("No build specified - fetching latest build for version #{app_version}")
end
end
platform = Spaceship::ConnectAPI::Platform.map(fetch_app_platform)
build ||= Spaceship::ConnectAPI::Build.all(app_id: app.id, version: app_version, build_number: build_number, sort: "-uploadedDate", platform: platform, limit: 1).first
end

code below
if versions.empty?
if select_latest
UI.message("Watched build version should not be present when there is no app version to watch") unless watched_build_version.nil?
UI.message("Searching for the latest build")
versions = [nil]
else
raise BuildWatcherError.new, "There is no app version to watch"
end
end

could be changed to:

if versions.empty?
  message = watched_build_version.nil? ? "Searching for the latest build" : "Searching for the latest build with build number: #{watched_build_version}"
  UI.message(message)
  versions = [nil]
end

@EmDee
Copy link
Contributor

EmDee commented May 21, 2021

I've tried running the upload_to_testflight with verbose logging, but don't out much more. I think pilot is running into timeout problems, although I'm not sure if this is related to the server error though.

This is the output:

INFO [2021-05-21 15:45:33.66]: Distributing new build to testers: 21.20.5 - 2021052110
Timeout received! Retrying after 3 seconds (remaining: 5)...
Timeout received! Retrying after 3 seconds (remaining: 4)...
Timeout received! Retrying after 3 seconds (remaining: 3)...
Timeout received! Retrying after 3 seconds (remaining: 2)...
Timeout received! Retrying after 3 seconds (remaining: 1)...
WARN [2021-05-21 15:45:35.50]: Lane Context:
INFO [2021-05-21 15:45:35.50]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios publish_testflight", :KEYCHAIN_PATH=>"~/Library/Keychains/tmp_keychain"}
ERROR [2021-05-21 15:45:35.50]: Server error got 500

@EmDee
Copy link
Contributor

EmDee commented May 21, 2021

Wow, I should've caught this one earlier... my problem is (probably) completely unrelated to this issue.

I've switched the main app language a while back and apparently forgot to setup the information for the testers.

The TestFlight section in the App Store Connect was telling me all along, but I somehow completely missed/ignored it. That's why it was failing for me with the server error 500 message.

image

@fastlane fastlane locked and limited conversation to collaborators Jul 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
8 participants