fastlane/fastlane

`deliver` fails if IDFA is set

swiftty opened this issue · 8 comments

New Issue Checklist

Issue Description

Command executed
bundler: failed to load command: fastlane (/Users/vagrant/git/vendor/bundle/ruby/3.2.0/bin/fastlane)
/Users/vagrant/git/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/spaceship/lib/spaceship/connect_api/api_client.rb:223:in `handle_response': [!] The specified resource does not exist - The path provided does not match a defined resource type. (Spaceship::UnexpectedResponse)
	from /Users/vagrant/git/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/spaceship/lib/spaceship/connect_api/api_client.rb:125:in `post'
	from /Users/vagrant/git/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:1116:in `post_idfa_declaration'
	from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/3.2.0/forwardable.rb:240:in `post_idfa_declaration'
	from /Users/vagrant/git/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/spaceship/lib/spaceship/connect_api/models/app_store_version.rb:256:in `create_idfa_declaration'
	from /Users/vagrant/git/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/deliver/lib/deliver/submit_for_review.rb:189:in `update_idfa'
	from /Users/vagrant/git/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/deliver/lib/deliver/submit_for_review.rb:23:in `submit!'
	from /Users/vagrant/git/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/deliver/lib/deliver/runner.rb:261:in `submit_for_review'

In post_idfa_declaration, fastlane calls POST /v1/idfaDeclarations, but api does not exists.
I can't find idfaDeclarations in the apple documentation.
https://developer.apple.com/documentation/appstoreconnectapi
Perhaps already deprecated and removed?

I also encountered a similar error when using deliver action.
I fixed it by changing add_id_info_uses_idfa in submission_information of deliver action from true to false.

    deliver(
      ...,
      submission_information: {
        "add_id_info_uses_idfa" => false,
      },
    )

I also encountered a similar error when using deliver action. I fixed it by changing add_id_info_uses_idfa in submission_information of deliver action from true to false.

    deliver(
      ...,
      submission_information: {
        "add_id_info_uses_idfa" => false,
      },
    )

for me this still happens ->

+----------------------------------------------------------------------------------------------------------+ | deliver 2.220.0 Summary | +----------------------------------------------------------------------------+-----------------------------+ | api_key | ******** | | skip_screenshots | true | | skip_metadata | false | | overwrite_screenshots | true | | sync_screenshots | false | | submit_for_review | true | | automatic_release | false | | force | true | | precheck_include_in_app_purchases | false | | submission_information.add_id_info_limits_tracking | true | | submission_information.add_id_info_serves_ads | false | | submission_information.add_id_info_tracks_action | true | | submission_information.add_id_info_tracks_install | true | | submission_information.add_id_info_uses_idfa | false | | submission_information.content_rights_has_rights | true | | submission_information.content_rights_contains_third_party_content | true | | submission_information.export_compliance_platform | ios | | submission_information.export_compliance_compliance_required | false | | submission_information.export_compliance_encryption_updated | false | | submission_information.export_compliance_uses_encryption | false | | submission_information.export_compliance_is_exempt | false | | submission_information.export_compliance_contains_third_party_cryptography | false | | submission_information.export_compliance_contains_proprietary_cryptography | false | | submission_information.export_compliance_available_on_french_store | false | | screenshots_path | ./fastlane/screenshots | | metadata_path | ./fastlane/metadata | | app_version | 1.0.0 | | app_identifier | ---- ------------| | ipa | Runner.ipa | | platform | ios | | edit_live | false | | use_live_version | false | | skip_binary_upload | false | | skip_app_version_update | false | | screenshot_processing_timeout | 3600 | | verify_only | false | | reject_if_possible | false | | version_check_wait_retry_limit | 7 | | phased_release | false | | reset_ratings | false | | run_precheck_before_submit | true | | precheck_default_rule_level | warn | | ignore_language_directory_validation | false | +----------------------------------------------------------------------------+--------------------

[13:34:33]: The specified resource does not exist - The path provided does not match a defined resource type. .../spaceship/connect_api/api_client.rb:223:in handle_response': [!] The specified resource does not exist - The path provided does not match a defined resource type. (Spaceship::UnexpectedResponse)
from .../spaceship/lib/spaceship/connect_api/api_client.rb:149:in delete' from .../spaceship/lib/spaceship/connect_api/tunes/tunes.rb:1133:in delete_idfa_declaration'
from .../forwardable.rb:240:in delete_idfa_declaration' from.../spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb:39:in delete!'
`

fr0l commented

Seems it was deprecated in v1.5 by Apple and finally removed.

fr0l commented

Btw. It helps just to remove the add_id_info_uses_idfa setting from Deliverfile / deliver call

fr0l commented

I've created a PR #22003 here to delete the deprecated IDFA-related code.
It's in progress. Probably I've deleted too much / not enough. Maybe some parts need to be just marked as @deprecated for time being. Let's see. still in progress.

the issue itself can be mitigated by:

  • a) setting add_id_info_uses_idfa to false
  • b) deleting add_id_info_uses_idfa from Deliverfile / call to deliver method

the PR is just code removal