Search code examples
app-storetestflightfastlane

Transporter error "An error occurred while trying to call the requested method validateAssets. (1272)"


I'm getting this error while I'm trying to upload to TestFlight with a fastlane script.

[2021-11-03T17:54:53.268Z] ERROR [2021-11-03 13:54:52.87]: �[31mTransporter transfer failed.�[0m
[2021-11-03T17:54:53.268Z] WARN [2021-11-03 13:54:52.87]: 
[2021-11-03T17:54:53.268Z] ERROR [2021-11-03 13:54:52.87]: �[31mAn error occurred while trying to call the requested method validateAssets. (1272)
�[0m
[2021-11-03T17:54:53.625Z] WARN [2021-11-03 13:54:53.23]: �[33m[iTMSTransporter] [2021-11-03 13:54:52 EDT]  DBG-X:   parameter ErrorMessage = An error occurred while trying to call the requested method validateAssets. (1272)
[2021-11-03T17:54:53.625Z] �[0m
[2021-11-03T17:54:53.625Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] [2021-11-03 13:54:52 EDT]  DBG-X:   parameter ShouldUseRESTAPIs = false
[2021-11-03T17:54:53.625Z] �[0m
[2021-11-03T17:54:53.625Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] [2021-11-03 13:54:52 EDT]  DBG-X:   parameter Success = false
[2021-11-03T17:54:53.625Z] �[0m
[2021-11-03T17:54:53.625Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] [2021-11-03 13:54:52 EDT]  ERROR: An error occurred while trying to call the requested method validateAssets. (1272)
[2021-11-03T17:54:53.625Z] �[0m
[2021-11-03T17:54:53.625Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] [2021-11-03 13:54:52 EDT]  DBG-X: The error code is: 1272
[2021-11-03T17:54:53.625Z] �[0m
[2021-11-03T17:54:53.625Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] [2021-11-03 13:54:52 EDT]   INFO: Done performing authentication.
[2021-11-03T17:54:53.625Z] �[0m
[2021-11-03T17:54:53.625Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] 
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] 
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] 
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] Package Summary:
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter]  
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] 1 package(s) were not uploaded because they had problems:
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter]    /var/folders/ym/dgt7pnss2rvblfnggshs_q480000gp/T/d20211103-56747-osueyi/1520720139-6a162c39-f397-454e-8bca-48c15aac2845.itmsp - Error Messages:
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter]        An error occurred while trying to call the requested method validateAssets. (1272)
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] WARN [2021-11-03 13:54:53.24]: �[33m[iTMSTransporter] [2021-11-03 13:54:52 EDT]  DBG-X: Returning 1
[2021-11-03T17:54:53.626Z] �[0m
[2021-11-03T17:54:53.626Z] INFO [2021-11-03 13:54:53.24]: iTunes Transporter output above ^
[2021-11-03T17:54:53.626Z] ERROR [2021-11-03 13:54:53.24]: �[31mAn error occurred while trying to call the requested method validateAssets. (1272)
[2021-11-03T17:54:53.626Z] Return status of iTunes Transporter was 1: An error occurred while trying to call the requested method validateAssets. (1272)
[2021-11-03T17:54:53.626Z] The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.�[0m

My fastlane script is:

 desc "Push a new beta build to TestFlight"
  lane :beta do |options|
      
    build_app(workspace: "MyApp.xcworkspace", scheme: "MyApp")

    upload_to_testflight(
      skip_waiting_for_build_processing: true
    )
  end

It was working as expected. But then it started to throw the error. I didn't change anything. It broke itself.

Note: I use the latest version of fastlane-2.197.0.


Solution

  • Thanks to Andrew. He has a solution and explained the issue here. I configured the fastlane with the following steps, and it started to work again.

    In the installation folder of fastlane, for me it was usr/local/Cellar/fastlane/2.197.0/libexec/gems/fastlane-2.197.0, changed the line 36 of fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb

    From:

    return self.package_path
    

    To:

    return ipa_path
    

    And

    the line 264 of fastlane_core/lib/fastlane_core/itunes_transporter.rb

    From:

    "-f #{source.shellescape}",
    

    To:

    "-assetFile #{source.shellescape}",
    

    Note that: The line number might change related to your fastlane version and this will disappear when you update fastlane.