31

I created an iOS test flight build using Fastlane, and I got this strange error, not sure why because it was working fine yesterday and now without any change in Fastlane configuration it gives me an error while uploading the build to the Apple App store.

errors wordings are as below

[21:50:01]: Transporter transfer failed.
[21:50:01]: 
[21:50:01]: Cannot obtain the content provider public id. Please specify a provider short name using the -asc_provider option.

[21:50:02]: Cannot obtain the content provider public id. Please specify a provider short name using the -asc_provider option.
Return status of iTunes Transporter was 1: Cannot obtain the content provider public id. Please specify a provider short name using the -asc_provider option.
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.

[21:50:02]: Error uploading ipa file: 


[21:50:02]: fastlane finished with errors

[!] Error uploading ipa file:

Refer below logs enter image description here

Haresh Ghatala
  • 1,996
  • 17
  • 25
  • 1
    Run fastlane with `--verbose` and see if the issue is more clear from detailed logs – timbre timbre Oct 19 '22 at 21:01
  • 1
    oh, and also: "If you are on multiple App Store Connect teams, iTunes Transporter may need a provider short name to know where to upload your binary. pilot will try to use the long name of the selected team to detect the provider short name. To override the detected value with an explicit one, use the itc_provider option." (source: https://docs.fastlane.tools/actions/testflight/) – timbre timbre Oct 19 '22 at 21:02
  • 3
    Don't show pictures of code if you can help it. I'm pretty sure you can copy that stuff out of the fastlane log and paste it into the question _as code text_. – matt Oct 20 '22 at 17:22
  • [See here](https://meta.stackoverflow.com/a/285557/20170164) for why you should use text instead of images of text. Flag this and the other image-related comment as "no longer needed" after you have edited. – rainbow.gekota Nov 04 '22 at 17:09

7 Answers7

16

For those who are suffering with this on Azure Devops's AppStoreRelease task. Using @user20291554 solution it can be fixed as follows

 - job: ios
    pool:
      vmImage: macOS-latest
    variables:
      DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS: "-asc_provider <your team ID or short name if different>"
    steps:
      ...
      - task: AppStoreRelease@1
        inputs:
      ...
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
  • can we mention `DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS ` in variable group `variables: - group: App Variables` – Sagar Nov 08 '22 at 13:15
  • @Sagar Yes, it worked for me also in variables group. Name: "DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS" . Value: "-asc_provider 12345" where 12345 is your team id. – K232 Nov 09 '22 at 14:15
  • @K232 can I add this on Azure lib. variable group instead of `.YML` file. I received `The username xyz.com is not a member of the provider 12345` – Sagar Nov 10 '22 at 06:11
  • For those that are on the old 'classic' release pipelines, add the variable under the 'variables' tab and leave out the double quotes around the value - worked for me – jimmycliffface Apr 05 '23 at 15:41
10

Please add the itc_provider along with the apple_id on the below line of code.

upload_to_testflight(
    skip_waiting_for_build_processing: true,
    apple_id: "APPLE_ID",
    itc_provider:"ID" #example: W4A0P2BYMN
)

If you are on multiple App Store Connect teams, deliver needs a provider short name to know where to upload your binary. deliver will try to use the long name of the selected team to detect the provider short name. To override the detected value with an explicit one, use the itc_provider option.

Paul Kastel
  • 913
  • 1
  • 13
  • 22
Maheshvirus
  • 6,749
  • 2
  • 38
  • 40
7

I had the same.

This comment from github helped me.

Add ENV variable to your deployment (or local machine , or Fastfile directly) With DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS we can add the "missing" -asc_provider variable.

ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-asc_provider YourShortName" Just deployed and it works for those who can't wait.

7

For me adding the environment variable works perfectly:

ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD: true

For my case, here is an example of Azure DevOps pipelines:

- task: AppStoreRelease@1
    env:
        ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD: true
    ...

Source Fastlane GitHub issue

James Risner
  • 5,451
  • 11
  • 25
  • 47
SHato
  • 93
  • 5
6

This is how I solved it!


      deliver(
        app_identifier: '{{YOUR_APP_ID}}',
        submit_for_review: false,
        skip_screenshots: true,
        force: true,
        itc_provider: "{{YOUR_TEAM_ID}}" // <- added!
      )
efiejfejt
  • 61
  • 1
6

To get itc_provider run command /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin/iTMSTransporter -m provider -u 'appleid@xxx.xx' -p 'xxxx-xxxx-xxxx-xxxx' -account_type itunes_connect -v off

where appleid@xxx.xx your appleid xxxx-xxxx-xxxx-xxxx - password for your app

How to generate an app-specific password

  • Sign in to appleid.apple.com.
  • In the Sign-In and Security section, select App-Specific Passwords.
  • Select Generate an app-specific password or select the Add button Blue plus sign icon., then follow the steps on your screen.
  • Enter or paste the app-specific password into the password field of the app.

enter image description here

AlexNikov
  • 81
  • 3
1

Im using the fastlane deliver to upload my apps

The solution for me was: Add new tag/flag for command fastlane deliver Example: fastlane deliver --username xxx@xxx.com....

And new tag added was --itc-provider my_team_id

You can found your team_id here: page

So, the command at the end was: fastlane deliver --verbose --ipa xxx --username xxx --app_identifier xxx --itc_provider team_id

xxx => corresponds about your project team_id => corresponds about Team ID, that you can get on page above