Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deliver fails to create a new app version on App Store Connect #21705

Closed
4 tasks done
ArthurAlvarez opened this issue Dec 7, 2023 · 26 comments · Fixed by #21742
Closed
4 tasks done

Deliver fails to create a new app version on App Store Connect #21705

ArthurAlvarez opened this issue Dec 7, 2023 · 26 comments · Fixed by #21742

Comments

@ArthurAlvarez
Copy link

ArthurAlvarez commented Dec 7, 2023

New Issue Checklist

Issue Description

Deliver fails to create a new app version on App Store Connect

Command executed
lane :submit_review do
  deliver(
    submit_for_review: true,
    automatic_release: false,
    force: true, # Skip HTMl report verification
    skip_metadata: true,
    skip_screenshots: true,
    skip_binary_upload: true,
    run_precheck_before_submit: false,
    submission_information: { export_compliance_uses_encryption: false,
                              add_id_info_uses_idfa: false }
  )
end
Complete output when running fastlane, including the stack trace and command used
[17:42:54]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 4)
[17:43:06]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 3)
[17:43:17]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 2)
[17:43:27]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 1)
[17:43:38]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 0)

and fails with

[17:43:48]: Cannot update languages - could not find an editable version for 'IOS'

Trying to upload a new version of an app to App Store Connect, Deliver fails when it tries to upload metadata because it didn't create a new app version successfully on App Store Connect.

Environment

Fastlane 2.217.0

@yosi-dediashvili
Copy link

Same here, started happening somewhere around yesterday noon (EST). We release updates daily stopped working today.

@bvirlet
Copy link
Contributor

bvirlet commented Dec 8, 2023

I had the issue this morning but not anymore. Probably a temporary issue with App Store Connect? @ArthurAlvarez can you try again?

@FelixLisczyk
Copy link

Same issue. When I try to create the version in App Store Connect manually, I get an error that the version number is already in use. After a page reload, the new version magically appears.

@ArthurAlvarez
Copy link
Author

I had the issue this morning but not anymore. Probably a temporary issue with App Store Connect? @ArthurAlvarez can you try again?

I have tested it with 10 apps. It always fails at the first attempt and succeeds on a retry.

@TheWirv
Copy link

TheWirv commented Dec 11, 2023

My pipelines still fail consistently

@rogerluan
Copy link
Member

rogerluan commented Dec 11, 2023

This could be a legitimate issue with App Store Connect API, e.g. http 500 or timeouts. I've been monitoring ASC API on my own and noticed that it's been partially degraded for the past ~9 hours, see: https://x.com/rogerluan_/status/1734206562418258125

My monitoring system didn't detect anything prior to 9 hours ago though (e.g. 3-4 days ago everything seemed fine on their end 😬) so it could be a different issue that is impacting you guys!

Just sharing what I got 😅

@sumeetp26
Copy link

Still happening. Is there any workaround or fix?

@rogerluan
Copy link
Member

rogerluan commented Dec 12, 2023

FWIW I'm still seeing intermittent issues (HTTP 500) with App Store Connect API calls. You can monitor them here:

https://status.statused.com

Or more specifically here (for further downtime details): https://stats.uptimerobot.com/1kzByfnDjz/795501684

@percula
Copy link

percula commented Dec 13, 2023

Same issue here. Is there a way to increase the retry interval or number of retries?

@nwainwright
Copy link

Same issue here. We're delivering builds via Transporter while this is going on. Is this an Apple or a fastlane issue? Any idea of what the resolution would be?

@rogerluan
Copy link
Member

Looks like an issue on Apple servers

@nwainwright
Copy link

Hi @rogerluan but the chances of Apple fixing their code anytime soon are pretty low so maybe fastlane can work around it somehow? They did their 10 second retries so maybe something else needs to be incorporated?

@dcacenabes
Copy link
Contributor

dcacenabes commented Dec 19, 2023

In an attempt to mitigate this, we have updated our release flows to first trigger an independent call to
ensure_version!(version_string, platform: nil, client: nil),
then we actually build the app and trigger the upload.

Our assumption (that might be totally wrong) is that between the call that Fastlane does to create a new version in the App Store and the call to upload metadata, there is not enough time for ASC to properly propagate the changes. We hope that by introducing a few minutes delay between the 2 operations the release will be successful.

@nwainwright
Copy link

Hi @dcacenabes, thank you, is is this in the latest fastlane or do we need to call a special version somehow? I'm a bit of a newbie.

@dcacenabes
Copy link
Contributor

dcacenabes commented Dec 19, 2023

for this you need to work with the app store connect API directly.

Spaceship::ConnectAPI.token = "this_is_your_token"
app = Spaceship::ConnectAPI::App.get(app_id: "your_app_id_in_app_store_connect")
app.ensure_version!("X.Y.Z", platform: Spaceship::ConnectAPI::Platform::IOS) # X.Y.Z is the semantic version of the new release for your app

You can find information on how to authenticate in the official docs:
https://github.com/fastlane/fastlane/blob/master/spaceship/docs/AppStoreConnect.md#login

@nwainwright
Copy link

Thanks @dcacenabes!

@ArthurAlvarez
Copy link
Author

ArthurAlvarez commented Dec 19, 2023

I was able to mitigate the issue simply by increasing the timeout time to 60 seconds instead of 10. You can check #21741.
I hope Apple fixes the issue on their side soon. For now, that's the easiest solution.

@rogerluan
Copy link
Member

rogerluan commented Dec 20, 2023

Hey everyone! 👋

Hi @rogerluan but the chances of Apple fixing their code anytime soon are pretty low so maybe fastlane can work around it somehow? They did their 10 second retries so maybe something else needs to be incorporated?

I've opened a PR that should resolve the issues you guys are seeing: #21742

@ everyone, if you wanna help (and increase the chances of your CI succeeding 😇), you can help test this PR of mine in the wild 🙇 this would be tremendously helpful and I'd be super grateful! ☺️ — Check out the PR description for steps on how to install my PR in your fastlane setup

Looking forward to hearing feedback from the community whether the proposed solution works 🙏


@ArthurAlvarez I reviewed your PR and I proposed a different solution (see PR above), I hope you're okay with that! 🙇 thank you for taking a stab at fixing this issue, though! Super helpful! ❤️

@kpowelltech
Copy link

This is still a significant issue for us. I build hundreds of apps using Fastlane and approx. 50% of my builds fail. I'm using Fastlane version 2.219.0.

@lukeredpath
Copy link

lukeredpath commented Jan 31, 2024

Just ran into this issue for the first time, running my first release train of the year. Our CI release flow uploads a release build to TestFlight for internal QA and then holds on an approval job - once approved it runs the last CI job that actually submits the build for review using deliver. I ran that today and it failed with the error mentioned above. I had to run it three times before it was successful. Note that the build was already uploaded and had been on TestFlight for about 45 minutes before I ran this last part of the job.

@mregnauld
Copy link

mregnauld commented Feb 3, 2024

I experienced the same problem today too. I tried a second time and it worked.

@BubnovSA
Copy link

BubnovSA commented Feb 9, 2024

I wonder when this will be fixed, because half of the assemblies simply don’t work....

@ArthurAlvarez
Copy link
Author

Currently there is no working solution to this problem. #21742 adds some retries with exponential backoff to increase the chances of your lane succeeding but it may make your CI/CD task take a long time to complete and even then it may still fail.

Personally, whenever I release a new version of my app on the App Store, I am now manually creating the next app version on App Store Connect and then any subsequent lanes that upload that version will work as always.

@alex-lechner
Copy link

This issue is still not fixed (at least for Github Workflow. I'm using Fastlane version 2.219.0 (latest as of now) and I still get Cannot update languages - could not find an editable version for 'IOS'

@Dante1349
Copy link

had the same issue as well with the latest fastlane version

@lukeredpath
Copy link

Still happening for me - every time I run our workflow to submit for review, it fails this way and has to be retried. The job succeeds the second time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment