fastlane: Pilot doesn't set requiring metadata for external testing

New Issue Checklist

Issue Description

I try to upload build to TestFlight and submit it to External Testing, but got this error in terminal

The phone number is missing. The email is required. The email must be in the format: contact@example.com. The email is required. The email must be in the format: contact@example.com. The phone number is missing. Validation errors<

screen shot 2016-11-18 at 10 50 44 I tried to provide this info for build in iTC web (second form (Test information) for external testing information window in iTC) and it works, submission is successful (on web page). But it works only for current build and next pilot action (for next build) will raise the same error. You can provide this information via Spaceship here, but Pilot provides only a limited set of parameters that required only for the first information form for external testing (Test information) screen shot 2016-11-18 at 11 15 53

How to provide required metadata (Contact Information) via Pilot?

Complete output when running fastlane, including the stack trace and command used
$ bundle exec fastlane rc --env release
...
Successfully exported and compressed dSYM file
[09:27:49]: Successfully exported and signed the ipa file:
[09:27:49]: /Users/ci/ios/ReleaseNotesRedactor/ReleaseNotesRedactor.ipa
[09:27:49]: -------------------
[09:27:49]: --- Step: pilot ---
[09:27:49]: -------------------
[09:27:50]: Login to iTunes Connect (ci@gmail.com)
[09:27:55]: Login successful
[09:27:56]: Ready to upload new build to TestFlight (App: 1168935713)...
[09:27:56]: Going to upload updated app to iTunes Connect
[09:27:56]: This might take a few minutes. Please don't interrupt the script.
[09:29:16]: iTunes Transporter successfully finished its job
[09:29:16]: ------------------------------------------------------------------------------------------------------
[09:29:16]: Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.
[09:29:16]: ------------------------------------------------------------------------------------------------------
[09:29:16]: Successfully uploaded the new binary to iTunes Connect
[09:29:16]: If you want to skip waiting for the processing to be finished, use the skip_waiting_for_build_processing option
[09:29:16]: Waiting for iTunes Connect to process the new build
[09:29:50]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:30:27]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:31:02]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:31:36]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:32:10]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:33:05]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:33:39]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:34:34]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:35:08]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:35:42]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:36:20]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:36:55]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:37:29]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:38:02]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:38:36]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:39:21]: Waiting for iTunes Connect to finish processing the new build (1.3.0 - 5)
[09:39:51]: Successfully finished processing the build
[09:39:51]: You can now tweet: 
[09:39:51]: iTunes Connect #iosprocessingtime 11 minutes
ra/apps/1168935713/platforms/ios/trains/1.3.0/builds/5/testInformation
[09:39:58]: Successfully set the changelog and/or description for build
[09:39:58]: Distributing new build to testers
ra/apps/1168935713/platforms/ios/trains/1.3.0/builds/5/testInformation

#######################################################################
\# pilot 1.12.1 is available. You are on 1.12.0.
\# It is recommended to use the latest version.
\# Update using 'bundle update pilot'.
#######################################################################

1.12.1 Improvements
* Update dependency to latest fastlane_core to fix app-specific password prompting.
* Update build description immediately after upload and verification.

Update using 'sudo gem update pilot'
[09:40:25]: Variable Dump:
[09:40:25]: {:DEFAULT_PLATFORM=>:ios, :ENVIRONMENT=>"release", :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios rc", :GET_INFO_PLIST_VALUE_CUSTOM_VALUE=>"1.3.0", :VERSION_NUMBER=>"1.3.0", :BUILD_NUMBER=>"5", :IPA_OUTPUT_PATH=>"/Users/ci/ios/ReleaseNotesRedactor/ReleaseNotesRedactor.ipa", :DSYM_OUTPUT_PATH=>"/Users/ci/ios/ReleaseNotesRedactor/ReleaseNotesRedactor.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/ci/Library/Developer/Xcode/Archives/2016-11-18/ReleaseNotesRedactor 2016-11-18 09.24.10.xcarchive"}

[09:40:25]: The phone number is missing. The email is required. The email must be in the format: contact@example.com. The email is required. The email must be in the format: contact@example.com. The phone number is missing. Validation errors

[09:40:25]: fastlane finished with errors

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

[09:40:26]: Error finding relevant GitHub issues: undefined method `map' for nil:NilClass

[!] The request could not be completed because:
 The phone number is missing. The email is required. The email must be in the format: contact@example.com. The email is required. The email must be in the format: contact@example.com. The phone number is missing. Validation errors

Environment

Please run fastlane env and copy the output below. This will help us help you 👍 If you used --capture_output option please remove this block - as it is already included there.


<details><summary>🚫 fastlane environment 🚫</summary>

### Stack

| Key                 | Value                                                          |
| ------------------- | -------------------------------------------------------------- |
| OS                  | 10.11.6                                                        |
| Ruby                | 2.0.0                                                          |
| Bundler?            | false                                                          |
| Git                 | git version 2.9.0                                              |
| Installation Source | /usr/local/bin/fastlane                                        |
| Host                | Mac OS X 10.11.6 (15G31)                                       |
| Ruby Lib Dir        | /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib |
| OpenSSL Version     | OpenSSL 0.9.8zc 19 Mar 2015                                    |
| Is contained        | false                                                          |
| Xcode Path          | /Applications/Xcode.app/Contents/Developer/                    |
| Xcode Version       | 8.1                                                            |


### System Locale

| Variable | Value       |   |
| -------- | ----------- | - |
| LANG     | ru_RU.UTF-8 | ✅ |
| LC_ALL   |             |   |
| LANGUAGE |             |   |


### fastlane files:

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

ruby
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the fastlane actions command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running fastlane

class FileHelper
      def self.read(path)
        file = File.open(path, "r+")
        res = file.read
        file.close
        res
      end
      def self.write(path, str)
        file = File.open(path, "w+")
        file.write(str)
        file.close
      end
end
# If you want to automatically update fastlane if a new version is available:
update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "1.106.2"

default_platform :ios

platform :ios do
  before_all do
    # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
    ENV["CRASHLYTICS_API_TOKEN"] = "1d22b1c5af737ceefbc64d95eb5976ebc35eb72d"
    ENV["CRASHLYTICS_BUILD_SECRET"] = "f03d3a13592ee0018cc142b6285a858afac01da8a33127e17b84aba45f4fad7e"
    cocoapods
  end

  desc "Runs all the tests"
  lane :test do
    scan
  end

  def generateReleaseNotes(file, project_id, version)
    Dir.chdir "/Users/ci/botBackend" do
      UI.message(Dir.pwd)
      system("groovy ~/botBackend/redmine.groovy " + file + " " + project_id + " " + version)
      UI.message($?)
      if $? != 0 
        raise Exception.new("Не удалось сгенерировать ReleaseNotes")
      end
    end
  end

  desc "Submit a new Beta Build to Crashlytics"
  lane :beta do
    # match(type: "appstore") # more information: https://codesigning.guide

    # Increment the build number (not the version number)
    v = gs_increment_beta_version(path: Dir.pwd+"/versions.json")
    increment_build_number_in_plist(xcodeproj:ENV["xcodeproj"], 
      target:ENV["target"],
      build_number: v.build.to_s 
    )
    version_name = v.major.to_s + "." + v.minor.to_s + "." + v.build.to_s
    generateReleaseNotes("fileBeta", ENV["project_id"], version_name)
    ruText = FileHelper.read("/Users/ci/botBackend/notes/" + ENV["project_id"] + "/" + version_name + "_ru.txt")
    enText = FileHelper.read("/Users/ci/botBackend/notes/" + ENV["project_id"] + "/" + version_name + "_en.txt")
    crashlytics_changelog = ruText + "\n\n" + enText
    Dir.chdir ".." do
      UI.message(Dir.pwd)
      sh "chmod 744 ./DeleteDerrivedData.sh"
      sh Dir.pwd+"/DeleteDerrivedData.sh"
    end
    gym(scheme: ENV["APP_SCHEME"],
use_legacy_build_api: true) # Build your app - more options available
    crashlytics(emails:"veselovskiysergey94@gmail.com",
      notes: crashlytics_changelog,
      groups: "iOS dev circle, iOS test circle"
      )
    # 
    # sh "your_script.sh"
    gs_save_beta_version(path: Dir.pwd+"/versions.json", version: v)
    # You can also use other beta testing services here (run fastlane actions)
  end

  desc "Submit a new Release Candidate build to TestFlight"
  lane :rc do
    v = gs_increment_rc_version(path: Dir.pwd+"/versions.json")
    plist_path = get_info_plist_path(xcodeproj:ENV["xcodeproj"], 
      target:ENV["target"])
    set_info_plist_value(path: plist_path, key: "ITSAppUsesNonExemptEncryption", value: "false") #без задания этого флага версия не зальется на тестфлай
    increment_version_number_in_plist(
      version_number: v.major.to_s + "." + v.minor.to_s + ".0",   
      xcodeproj: ENV["xcodeproj"],  
      target: ENV["target"]
    )
    increment_build_number_in_plist(xcodeproj:ENV["xcodeproj"], target:ENV["target"],
      build_number: v.build.to_s 
    )
    version_name = v.major.to_s + "." + v.minor.to_s
    generateReleaseNotes("fileRc", ENV["project_id"], "1.2")#version_name)
    Dir.chdir ".." do
      sh "chmod 744 ./DeleteDerrivedData.sh"
      sh Dir.pwd+"/DeleteDerrivedData.sh"
    end
    ruText = FileHelper.read("/Users/ci/botBackend/notes/" + ENV["project_id"] + "/" + "1.2" + "_ru.txt")
    enText = FileHelper.read("/Users/ci/botBackend/notes/" + ENV["project_id"] + "/" + "1.2" + "_en.txt")
    gym(scheme: ENV["APP_SCHEME"],
      use_legacy_build_api: true) # Build your app - more options available
    pilot(changelog: ruText,
      beta_app_description:"Мое описание",
      distribute_external: true,
      beta_app_feedback_email: "cimobdaemon@gmail.com"
      )
    gs_save_rc_version(path: Dir.pwd+"/versions.json", version: v)
  end

  desc "Deploy a new version to the App Store"
  lane :release do
    v = gs_increment_release_version(path: Dir.pwd+"/versions.json")
    # match(type: "appstore")
    # snapshot
    generateReleaseNotes("fileRelease", ENV["project_id"], v.major.to_s + "." + v.minor.to_s)
    # gym(scheme: ENV["APP_SCHEME"]) # Build your app - more options available
    deliver(submit_for_review: true,
      skip_binary_upload:true,
      automatic_release:true,
      submission_information: {
      add_id_info_limits_tracking: false,
      add_id_info_serves_ads: false,
      add_id_info_tracks_action: false,
      add_id_info_tracks_install: false,
      add_id_info_uses_idfa: false,
      content_rights_has_rights: true,
      content_rights_contains_third_party_content: false,
      export_compliance_platform: 'ios',
      export_compliance_compliance_required: false,
      export_compliance_encryption_updated: false,
      export_compliance_app_type: nil,
      export_compliance_uses_encryption: false,
      export_compliance_is_exempt: false,
      export_compliance_contains_third_party_cryptography: false,
      export_compliance_contains_proprietary_cryptography: false,
      export_compliance_available_on_french_store: false
    })
    # frameit
    gs_save_release_version(path: Dir.pwd+"/versions.json", version: v)
  end

  # You can define as many lanes as you want

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack(
    #   message: "Successfully deployed new App Update."
    # )
  end

  error do |lane, exception|
    # slack(
    #   message: exception.message,
    #   success: false
    # )
  end
end


# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md

# fastlane reports which actions are used
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
</details>

<details><summary>./fastlane/Appfile</summary>

ruby
team_id "RJD93KSR37"  # Developer Portal Team ID
GS Mobile Developers Account, [18 Nov 2016, 14:18]: 
app_identifier "ru.gradoservice.ReleaseNotesRedactor" # The bundle identifier of your app
# for_platform :ios do
#   for_lane :test do
#     app_identifier 'ru.gradoservice.MapInformer.beta'
#   end
# end

filename = File.expand_path("./Appfile.local")

if File.exist?(filename)
  puts "Using local Appfile #{filename}"
  eval(File.read(filename)) 
end
apple_id "cimobdaemon@gmail.com" # Default Apple email address

# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md

</details>

### fastlane gems

| Gem                 | Version | Update-Status       |
| ------------------- | ------- | ------------------- |
| credentials_manager | 0.16.2  | ✅ Up-To-Date        |
| fastlane_core       | 0.56.0  | ✅ Up-To-Date        |
| spaceship           | 0.37.0  | ✅ Up-To-Date        |
| deliver             | 1.15.0  | 🚫 Update availaible |
| snapshot            | 1.16.3  | ✅ Up-To-Date        |
| frameit             | 3.0.0   | ✅ Up-To-Date        |
| pem                 | 1.4.0   | ✅ Up-To-Date        |
| cert                | 1.4.4   | ✅ Up-To-Date        |
| sigh                | 1.11.2  | ✅ Up-To-Date        |
| produce             | 1.3.0   | ✅ Up-To-Date        |
| gym                 | 1.12.0  | ✅ Up-To-Date        |
| pilot               | 1.12.0  | 🚫 Update availaible |
| scan                | 0.14.1  | ✅ Up-To-Date        |
| supply              | 0.7.1   | ✅ Up-To-Date        |
| match               | 0.11.0  | ✅ Up-To-Date        |
| screengrab          | 0.5.5   | 🚫 Update availaible |
| fastlane            | 1.109.0 | 🚫 Update availaible |


### Loaded fastlane plugins:

| Plugin                        | Version | Update-Status |
| ----------------------------- | ------- | ------------- |
| fastlane-plugin-versioning    | 0.2.4   | ✅ Up-To-Date  |
| fastlane-plugin-gs_versioning | 0.1.1   | ✅ Up-To-Date  |


<details><summary><b>Loaded gems</b></summary>

| Gem                           | Version |
| ----------------------------- | ------- |
| highline                      | 1.7.8   |
| terminal-table                | 1.4.5   |
| json                          | 1.8.3   |
| dotenv                        | 2.1.1   |
| net-ssh                       | 3.2.0   |
| net-sftp                      | 2.1.2   |
| rubyzip                       | 1.1.7   |
| security                      | 0.1.3   |
| krausefx-shenzhen             | 0.14.11 |
| slack-notifier                | 1.5.1   |
| rouge                         | 1.11.1  |
| xcpretty                      | 0.2.4   |
| multipart-post                | 2.0.0   |
| word_wrap                     | 1.0.0   |
| multi_json                    | 1.12.1  |
| colored                       | 1.2     |
| commander                     | 4.4.0   |
| babosa                        | 1.0.2   |
| gh_inspector                  | 1.0.2   |
| credentials_manager           | 0.16.2  |
| fastlane_core                 | 0.56.0  |
| multi_xml                     | 0.5.5   |
| faraday-cookie_jar            | 0.0.6   |
| fastimage                     | 1.6.8   |
| mini_magick                   | 4.5.1   |
| xcpretty-travis-formatter     | 0.0.4   |
| excon                         | 0.54.0  |
| plist                         | 3.2.0   |
| CFPropertyList                | 2.3.3   |
| claide                        | 1.0.1   |
| nanaimo                       | 0.2.2   |
| xcodeproj                     | 1.4.1   |
| bundler                       | 1.13.6  |
| fastlane-plugin-versioning    | 0.2.4   |
| fastlane-plugin-gs_versioning | 0.1.1   |
</details>


*generated on:* **2016-11-18**

</details>

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 25 (2 by maintainers)

Most upvoted comments

hey folks, as a workaround - could you try using spaceship (inside your fastfile)

require "spaceship"

lane :submit_app_for_beta_review do
  Spaceship::Tunes.login
  app = Spaceship::Tunes::Application.find("my.app.id")
  version = app.edit_version

  # to submit the latest build use the variable below
  use_build = version.candidate_builds.first

  # for specific build_number use this.
  # use_build = version.candidate_builds.find(build_version: "BUILD_NR").first

  # here you'll define the beta submission information.
  parameters = {
    changelog: "Awesome new features",
    description: "Why would I want to provide that?",
    feedback_email: "contact@company.com",
    marketing_url: "http://marketing.com",
    first_name: "Felix",
    last_name: "Krause",
    review_email: "contact@company.com",
    phone_number: "+430123456789",
    significant_change: false,

  # Optional Metadata:
    privacy_policy_url: nil,
    review_user_name: nil,
    review_password: nil,
    encryption: false
  }

  # this will submit it!
  use_build.submit_for_beta_review!(parameters)
end

let me know if this helps you.