fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.67k stars 5.72k forks source link

Pilot: Need to specify -itc_provider error when supplying team name #6525

Closed MattCheetham closed 7 years ago

MattCheetham commented 8 years ago

New Issue Checklist

Pilot is asking for itc_provider when trying to upload an app. We use Deliver and Pilot on a few of our apps on the same account but for some reason this one specific app refuses to submit and the iTMSTransporter issue bubbles up despite us providing team name. Originally the issue was popping up in Bitrise CI for us but I tried exporting the IPA myself and using Pilot via the command line with no success. Not sure where I'm going wrong here. As far as I can see providing itc_provider isn't necessary because I provide team name and looking at the logs it seems to identify the team correctly from this but fail on upload. Please let me know if there are any further details I can provide that would be of use.

Complete output when running fastlane, including the stack trace and command used
Matthews-MBP:Local iOS matthewcheetham$ pilot upload --team_name "American Red Cross" --ipa /Users/matthewcheetham/Desktop/First\ Aid\ 2.0\ 2016-10-13\ 09-27-41/First\ Aid\ 2.0.ipa --verbose
WARN [2016-10-13 09:34:01.30]: To not be asked about this value, you can specify it using 'username'
Your Apple ID Username: email@domain.com
INFO [2016-10-13 09:34:05.09]: Login to iTunes Connect (email@domain.com)
Looking for iTunes Connect Team with name American Red Cross
Looking for iTunes Connect Team with ID 351910
INFO [2016-10-13 09:34:11.65]: Login successful
DEBUG [2016-10-13 09:34:11.68]: App identifier (com.americanredcross.firstaid)
INFO [2016-10-13 09:34:14.42]: Ready to upload new build to TestFlight (App: 529160691)...
INFO [2016-10-13 09:34:15.00]: Wrote XML data to '/tmp/529160691.itmsp'
INFO [2016-10-13 09:34:15.27]: Going to upload updated app to iTunes Connect
INFO [2016-10-13 09:34:15.27]: This might take a few minutes. Please don't interrupt the script.
DEBUG [2016-10-13 09:34:15.33]: /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/java/bin/java -Djava.ext.dirs=/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/java/lib/ext -XX:NewSize=2m -Xms32m -Xmx1024m -Xms1024m -Djava.awt.headless=true -Dsun.net.http.retryPost=false -classpath /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/lib/itmstransporter-launcher.jar com.apple.transporter.Application -m upload -u email@domain.com -p YourPassword -f /tmp/529160691.itmsp -t Signiant -k 100000 2>&1
DEBUG [2016-10-13 09:34:18.66]: [Transporter]: INFO: Transporter is skipping bundle update check: Already checked recently.
DEBUG [2016-10-13 09:34:18.82]: [Transporter]: INFO: Logging configured successfully.
DEBUG [2016-10-13 09:34:18.82]: [Transporter]: DEBUG: Attempting refresh of configuration data from https://contentdelivery.itunes.apple.com/transporter/Defaults.properties
DEBUG [2016-10-13 09:34:18.98]: [Transporter]: DEBUG: Configuration refresh successful.
DEBUG [2016-10-13 09:34:18.98]: [Transporter]: DEBUG: Saving configuration to local path: /Users/matthewcheetham/.itmstransporter/Defaults.properties
DEBUG [2016-10-13 09:34:18.98]: [Transporter]: INFO: iTMSTransporter : iTunes Store Transporter [1.9.0]
DEBUG [2016-10-13 09:34:18.98]: [Transporter]: INFO: OS identifier: Mac OS X 10.12 (x86_64); jvm=24.80-b07; jre=1.7.0-internal-root_2015_05_12_09_52-b00
DEBUG [2016-10-13 09:34:18.98]: [Transporter]: INFO: Memory: [JVM] 853M free, 982M total, 982M max [System] (Physical) 85M free, 16384M total (Swap) 928M free, 5120M total
DEBUG [2016-10-13 09:34:18.99]: [Transporter]: INFO: Upload mode selected.
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: INFO: Examining the package at: /tmp/529160691.itmsp
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: INFO: Ensuring that package has well formed metadata file...
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: DEBUG: Getting case-sensitive metadata xml filename...
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: INFO: Gathering the list of valid files from the package ...
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: DEBUG:   3cdb0f86e0f0b7161689273ee0fc18b0.ipa will be verified by Apple's web service to determine if it is a valid file.
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: DEBUG:   metadata.xml will be verified by Apple's web service to determine if it is a valid file.
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: INFO: Finished gathering the list of valid files from the package.
DEBUG [2016-10-13 09:34:19.00]: [Transporter]: DEBUG:   Case-sensitive metadata filename is: metadata.xml
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: INFO: Performing authentication of package 529160691.itmsp ...
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X: Memory: [JVM] 843M free, 982M total, 982M max [System] (Physical) 75M free, 16384M total (Swap) 927M free, 5120M total
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X: Memory: [JVM] 843M free, 982M total, 982M max [System] (Physical) 75M free, 16384M total (Swap) 927M free, 5120M total
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X: Using operation named: authenticateForSession
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X: Apple's web service operation input parameters:
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter Application = iTMSTransporter
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter BaseVersion = 1.9.0
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter OSIdentifier = Mac OS X 10.12 (x86_64); jvm=24.80-b07; jre=1.7.0-internal-root_2015_05_12_09_52-b00
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter Password = **hidden value**
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter TransporterArguments = -m upload -u email@domain.com -p **hidden value** -f /tmp/529160691.itmsp -t Signiant -k 100000
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter Username = email@domain.com
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter Version = 1.9.0
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: DBG-X:   parameter iTMSTransporterMode = upload
DEBUG [2016-10-13 09:34:19.05]: [Transporter]: INFO: id = 20161013093419-767
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X: Apple's web service operation return value:
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter SessionId = CIqnDBIQltnHo5wDTD6iKTRHTpXPKg==
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter SharedSecret = 42e2797e-4391-4e3b-b903-337ccdfac204
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X: Deflated 452 bytes to 392
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X: Using operation named: validateMetadata
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X: Apple's web service operation input parameters:
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter Application = iTMSTransporter
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter BaseVersion = 1.9.0
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter Files = [3cdb0f86e0f0b7161689273ee0fc18b0.ipa, metadata.xml]
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter Metadata = <?xml version="1.0" encoding="UTF-8"?>
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter MetadataChecksum = 7ed8d16438a4dd34bfe3c974c307159e
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter MetadataCompressed = (suppressed)
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter OSIdentifier = Mac OS X 10.12 (x86_64); jvm=24.80-b07; jre=1.7.0-internal-root_2015_05_12_09_52-b00
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter PackageName = 529160691.itmsp
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter PackageSize = 100302566
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter Throttle = 100000
DEBUG [2016-10-13 09:34:19.62]: [Transporter]: DBG-X:   parameter TransporterArguments = -m upload -u email@domain.com -p **hidden value** -f /tmp/529160691.itmsp -t Signiant -k 100000
DEBUG [2016-10-13 09:34:19.63]: [Transporter]: DBG-X:   parameter Username = email@domain.com
DEBUG [2016-10-13 09:34:19.63]: [Transporter]: DBG-X:   parameter Version = 1.9.0
DEBUG [2016-10-13 09:34:19.63]: [Transporter]: DBG-X:   parameter iTMSTransporterMode = upload
DEBUG [2016-10-13 09:34:19.63]: [Transporter]: INFO: id = 20161013093419-647
DEBUG [2016-10-13 09:34:33.99]: [Transporter]: DBG-X: Apple's web service operation return value:
DEBUG [2016-10-13 09:34:34.00]: [Transporter]: DBG-X:   parameter ErrorMessage = Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command. Please contact us if you have questions or need help. (1627)
DEBUG [2016-10-13 09:34:34.00]: [Transporter]: DBG-X:   parameter Errors = [Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command. Please contact us if you have questions or need help. (1627)]
DEBUG [2016-10-13 09:34:34.00]: [Transporter]: DBG-X:   parameter ErrorCode = 1627
DEBUG [2016-10-13 09:34:34.00]: [Transporter]: DBG-X:   parameter Success = false
ERROR [2016-10-13 09:34:34.00]: [Transporter Error Output]: Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command. Please contact us if you have questions or need help. (1627)
DEBUG [2016-10-13 09:34:34.00]: [Transporter]: DBG-X: The error code is: 1627
ERROR [2016-10-13 09:34:34.11]: Transporter transfer failed.
WARN [2016-10-13 09:34:34.11]: 
ERROR [2016-10-13 09:34:34.11]: Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command. Please contact us if you have questions or need help. (1627)
ERROR [2016-10-13 09:34:34.18]: Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command. Please contact us if you have questions or need help. (1627)
Return status of iTunes Transporter was 1: Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command. Please contact us if you have questions or need help. (1627)
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
/Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.52.1/lib/fastlane_core/ui/interface.rb:145:in `user_error!': [!] Error uploading ipa file, for more information see above (FastlaneCore::Interface::FastlaneError)
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.52.1/lib/fastlane_core/ui/ui.rb:14:in `method_missing'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/build_manager.rb:22:in `upload'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/commands_generator.rb:59:in `block (2 levels) in run'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:153:in `run'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in `run_active_command'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.52.1/lib/fastlane_core/ui/fastlane_runner.rb:36:in `run!'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in `run!'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/commands_generator.rb:135:in `run'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/commands_generator.rb:15:in `start'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/bin/pilot:6:in `<top (required)>'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/bin/pilot:23:in `load'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/bin/pilot:23:in `<main>'
Matthews-MBP:Local iOS matthewcheetham$ 

Configuration Files

N/A

Environment

fastlane 1.105.2

Do you use bundler to execute fastlane (i.e. bundle exec fastlane)? No

Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? Yes. rbenv on this machine on 2.3.0

TKBurner commented 8 years ago

@MattCheetham Have you tried providing that parameter? It seems like this is the most viable workaround. We provide sane defaults but sometimes you need to manually set things. Thanks!

KrauseFx commented 8 years ago

Is there any way for fastlane to detect this value automatically? Sorry, I don't have an account handy that requires this parameter

MattCheetham commented 8 years ago

@TKBurner Providing that parameter and removing the --team_id one spits out the error

Multiple iTunes Connect teams found, please enter the number of the team you want to use: 
Note: to automatically choose the team, provide either the iTunes Connect Team ID, or the Team Name in your fastlane/Appfile:

Proivding both --team_id and --itc_provider also still errors

ERROR [2016-10-18 08:27:09.65]: [Transporter Error Output]: Unable to find an iTunes Connect user for username email@domain.com and provider 351910. This username may not be enabled for iTunes Connect. Contact your team admin for assistance. (1296)
DEBUG [2016-10-18 08:27:09.65]: [Transporter]: DBG-X: The error code is: 1296
ERROR [2016-10-18 08:27:09.75]: Transporter transfer failed.
WARN [2016-10-18 08:27:09.75]: 
ERROR [2016-10-18 08:27:09.75]: Unable to find an iTunes Connect user for username email@domain.com and provider 351910. This username may not be enabled for iTunes Connect. Contact your team admin for assistance. (1296)
ERROR [2016-10-18 08:27:09.81]: Unable to find an iTunes Connect user for username email@domain.com and provider 351910. This username may not be enabled for iTunes Connect. Contact your team admin for assistance. (1296)
Return status of iTunes Transporter was 1: Unable to find an iTunes Connect user for username email@domain.com and provider 351910. This username may not be enabled for iTunes Connect. Contact your team admin for assistance. (1296)
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
/Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.52.1/lib/fastlane_core/ui/interface.rb:145:in `user_error!': [!] Error uploading ipa file, for more information see above (FastlaneCore::Interface::FastlaneError)
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.52.1/lib/fastlane_core/ui/ui.rb:14:in `method_missing'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/build_manager.rb:22:in `upload'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/commands_generator.rb:59:in `block (2 levels) in run'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/command.rb:153:in `run'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in `run_active_command'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.52.1/lib/fastlane_core/ui/fastlane_runner.rb:36:in `run!'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in `run!'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/commands_generator.rb:135:in `run'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/lib/pilot/commands_generator.rb:15:in `start'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pilot-1.10.1/bin/pilot:6:in `<top (required)>'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/bin/pilot:23:in `load'
    from /Users/matthewcheetham/.rbenv/versions/2.3.0/bin/pilot:23:in `<main>'
Matthews-MBP:Local iOS matthewcheetham$ 

@KrauseFx Sorry I don't have any idea how you can go about this automatically. It seems even providing the right info doesn't work although I'm still not sure why.

TKBurner commented 8 years ago

@MattCheetham Does this account have an admin role on iTC?

MattCheetham commented 8 years ago

@TKBurner We have the "App Manager" role on that account

TKBurner commented 8 years ago

@MattCheetham Can you try with an account with admin privileges and let me know if that clears things up for you? Because of certain API permissions beyond our control you might need to be in this role. Thanks!

MattCheetham commented 8 years ago

@TKBurner Hmm I'll give it a try. Curious as to why that would affect one specific app on the account where all the other submit fine with the same account permission setup.

It's a client's account so will need to get them to bump us to admin and then I'll get back to you.

TKBurner commented 8 years ago

@MattCheetham Interesting. That shouldn't be the case, but maybe something is weird here. Let me know what happens with the change. Thanks!

MattCheetham commented 7 years ago

@TKBurner Okay so I didn't get around to elevating access on that account but the issue has popped up again on a new app that we've just set up under another account (That is also a linked account like the original issue). I've verified that I can upload fine through Xcode and we are an Admin on this account.

So we're actually building this new one through Bitrise and submitting using the deliver step. I'm at a bit of a loss of how to fix this as the error just says to provide --itc_provider to iTMSTransporter which I obviously can't do.

MattCheetham commented 7 years ago

Okay so the command that Bitrise runs is deliver --username username@domain.com --app 1180912547 --team_name '3 SIDED CUBE DESIGN LTD' --ipa '/Users/matthewcheetham/Downloads/Ready for Business.ipa' --skip_screenshots --skip_metadata --force which fails

I ran it locally and also get the failure.

However adding the --itc_provider key does fix the issue and the upload succeeds. So it does look like it's something to do with the --team_name or --team_id identifying correctly. Unfortunately, I have no way to pass --itc_provider in Bitrise but I'll link them to this issue as they have been following too and maybe it is something that they can provide functionality for.

The command that succeeds is deliver --username username@domain.com --app 1180912547 --team_name '3 SIDED CUBE DESIGN LTD' --ipa '/Users/matthewcheetham/Downloads/Ready for Business.ipa' --skip_screenshots --skip_metadata --force --itc_provider "3SIDEDCUBEDESIGNLTD"

fastlane-bot commented 7 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

yakimant commented 7 years ago

Have the same issue with such code:

    pilot(
      ipa: ipa,
      skip_waiting_for_build_processing: true,
      team_id: itc_team_id,
      username: apple_username,
    )

for some teams (not all).

Adding itc_provider: itc_provider helped. itc_provider i've take from (second column)

/Applications/Xcode-8.2.1.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USER' -p "PASSWORD" -account_type itunes_connect -v off

itc_provider is sometimes (not always) the same team_id from Developer Portal.

Hope it helps.

fastlane-bot commented 7 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

fastlane-bot commented 7 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1: