fastlane: `get_latest_app_store_version` Returns Old Versions – Possibly Due to Recent API Changes

New Issue Checklist

Issue Description

My CI jobs have been working normally since this morning, all the get_live_app_store_version and get_latest_app_store_version from Fastlane returning the value from 2022, not the latest version anymore.

I tried to fork Fastlane and modify the filter and other stuff but not helping at all. Log the response of the request /v1/apps/{id}/appStoreVersions, it contains a very old versions. I think we need support from experts who can help to by-pass or fix this issue.

Seems it may be related to changes in the App Store Connect API. Only happen this morning.

Command executed
        app = Spaceship::ConnectAPI::App.find(params[:bundle_id])
        latest_version = app.get_latest_app_store_version
        
        UI.message "latest_version: #{latest_version.version_string}"

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 35
  • Comments: 48 (6 by maintainers)

Most upvoted comments

So, is it an Apple-related bug that is expected to be resolved soon?

This seems to be the case: a bug on Apple’s end. Not sure yet if there’s anything we can do about this.

Whenever this happens they usually fix it within a few hours, or a couple days the latest.

Let’s be patient and hope for the former 🙏🙏

Might be relevant, but we started to receive [!] An attribute value is not acceptable for the current resource state. - The attribute 'versionString' can not be modified. - /data/attributes/versionString just recently for the deliver method.

An attribute value is not acceptable for the current resource state. - The attribute ‘versionString’ can not be modified

This is related to the app store versions API returning things out of order and not respecting filters. Due to this, the latest inflight store version being returned is very likely an old one that can not be edited.

We have started seeing some really old versions returned for most of the fastlane/spaceship get_<x>_app_store_version functions.

Waiting for Apple devs to wake up and fix this.

It looks like Apple has fixed the API 🥳

So, is it an Apple-related bug that is expected to be resolved soon?

Yes, seems to be working fine now.

This issue is from Apple’s side, not from Fastlane. I’ll reopen the issue only if anyone has a similar issue with Fastlane

We found a workaround - publish app to the testflight and do manual release from testflight.

Seems everything is fixed now. I’m closing this issue, thanks everyone 🥂

Guys i found a workaround.

If i create the desired version in apple connect without any build and trigger the pipeline again, it works!

For example: My build to deploy in CI it’s 2.0.0 then i have created a 2.0.0 version in AppleConnect app and trigger again the pipeline.

It’s a manual process but if you need to do this faster, it’s the way.

Might be relevant, but we started to receive [!] An attribute value is not acceptable for the current resource state. - The attribute 'versionString' can not be modified. - /data/attributes/versionString just recently for the deliver method.

I have the same issue~~~~

I contacted Apple “distribution” topic. https://developer.apple.com/contact/topic/select

The platform filter is also broken. When using tvOS, the API returned iOS builds.

Guys i found a workaround.

If i create the desired version in apple connect without any build and trigger the pipeline again, it works!

Can confirm, works fine for me. Thanks for sharing!

I found out about this issue through one of the customers over at Statused: apparently their app status is being reported wrong since last night:

1

I also saw that Apple released App Store Connect API v3.6 Beta 1 (not sure when): https://developer.apple.com/documentation/appstoreconnectapi/ — this might be related.

I’ll keep a close eye on this issue and hope that Apple fixes it soon.

Seeing this issue right now for tramline, even the history tab on ASC itself is all in the wrong order.

Yep, same here. Using Transporter for IPA upload like a caveman…

Same issue on my side, can’t publish new version on the store. Spaceship::UnexpectedResponse: [!] An attribute value is not acceptable for the current resource state. - The attribute 'versionString' can not be modified. - /data/attributes/versionString

Event worse, the last published and approved versions are not event listed in the App Store Connect webpage 🫠

SCR-20241022-jqpg-2

For me also the latest versions are missing in AppStoreConnect history tab.

Event worse, the last published and approved versions are not event listed in the App Store Connect webpage 🫠

SCR-20241022-jqpg-2

I have the same issue. “[!] An attribute value is not acceptable for the current resource state. - The attribute ‘versionString’ can not be modified. - /data/attributes/versionString (Spaceship::UnexpectedResponse)”

deliver(  
    release_notes: {
      'default': File.read(“/Users/XXXX/release_notes.txt”),
      'en-US': File.read(“/Users/XXXX/release_notes.txt”)
    },
    submission_information: { add_id_info_uses_idfa: false },   
    submit_for_review: true,
    automatic_release: true,
    ipa: sh("curl -sL URL --output /Users/XXXX"),
    ipa: "/Users/XXXX",
    app_identifier: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier),
    team_id: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
    run_precheck_before_submit: false,
    precheck_include_in_app_purchases: false,
    app_review_attachment_file: "/Users/XXXX",
    force: true,
    skip_metadata: false,
    skip_screenshots: true,
    skip_binary_upload: false,
)

I think this is related to my question here

In our case it seems that the https://appstoreconnect.apple.com/iris/v1/apps/1073341917/appStoreVersions API does not return paging links and if you have >50 results, you only see the first 50.

Guys i found a workaround. If i create the desired version in apple connect without any build and trigger the pipeline again, it works! For example: My build to deploy in CI it’s 2.0.0 then i have created a 2.0.0 version in AppleConnect app and trigger again the pipeline. It’s a manual process but if you need to do this faster, it’s the way.

Confirmed working!

Before I submit build 2.0, I should create 2.0 version in ASC?

If so, not working on my end. 😦

same here… created new version in ASC tried uploading - doesn’t work. Seems it not for everyone

Guys i found a workaround. If i create the desired version in apple connect without any build and trigger the pipeline again, it works! For example: My build to deploy in CI it’s 2.0.0 then i have created a 2.0.0 version in AppleConnect app and trigger again the pipeline. It’s a manual process but if you need to do this faster, it’s the way.

Confirmed working!

Before I submit build 2.0, I should create 2.0 version in ASC?

If so, not working on my end. 😦

Same issue, tried creating new version in ASC manually, nothing works. Can’t even upload metadata.

Same here, for sure Apple noticed this already since this affects every Dev/App Companies

Experiencing this as well!

Guys i found a workaround.

If i create the desired version in apple connect without any build and trigger the pipeline again, it works!

For example: My build to deploy in CI it’s 2.0.0 then i have created a 2.0.0 version in AppleConnect app and trigger again the pipeline.

It’s a manual process but if you need to do this faster, it’s the way.

I tried this, but unfortunately it didn’t work of us

I almost have the same issue, but got error:

fastlane-2.225.0/fastlane/lib/fastlane/actions/app_store_build_number.rb:60:in `get_build_info': [!] undefined method `version' for nil (NoMethodError)

Everything was fine yesterday fastlane version: 2.225