AppForShare

Codemagic TestFlight publishing: processing, 422 errors, beta groups

· 5 min read

Codemagic TestFlight publishing: processing, 422 errors, beta groups

Publishing to TestFlight from Codemagic is two steps that look like one. First the .ipa is uploaded to App Store Connect. Then Apple processes it, and only after that can the build go to testers or to beta review. Most Codemagic TestFlight problems sit in the gap between those two steps. This guide explains the gap, the errors people report, and how beta groups work. Codemagic facts are from docs.codemagic.io, help.codemagic.io and the codemagic-ci-cd GitHub repositories as read on November 5, 2026.

The publishing block

Codemagic's App Store Connect publishing docs list these options:

publishing:
  app_store_connect:
    auth: integration
    submit_to_testflight: true
    beta_groups:
      - QA
      - Clients
    expire_build_submitted_for_review: true
    submit_to_app_store: false

submit_to_testflight submits the build for TestFlight beta review, beta_groups names the groups that get it, and expire_build_submitted_for_review expires an older build waiting in review. For the App Store there are submit_to_app_store, release_type (manual, after approval or scheduled), earliest_release_date and phased_release. The build must be signed for the App Store: distribution_type: app_store.

Why it takes time

After the upload, App Store Connect processes the build: it checks the binary and prepares it for testers. Codemagic's help center says this usually takes between 5 and 30 minutes, and can take longer when Apple is busy. During that time the build exists, but nothing can be done with it except wait.

Waiting costs build minutes if the workflow stays open for it. Plan for that in your timeout.

The 422 error: "The build is not in a valid processing state"

The most commented issue in Codemagic's cli-tools repository, #346, is about this message. It means something asked Apple to act on the build (add it to a group, submit it for beta review) before Apple had finished processing it, or after processing failed. Things to check:

  1. Was processing still running? Open the build in App Store Connect, TestFlight. If it says Processing, the next step was too early.
  2. Did processing fail? Apple emails the account holder when a build is invalid, often for a missing privacy manifest reason, a missing usage description or an SDK that is too old. The build then never becomes valid.
  3. Is export compliance answered? A build waiting for the encryption question cannot go to external testers. Set ITSAppUsesNonExemptEncryption in Info.plist if your app only uses exempt encryption.
  4. Is the right build picked? Two builds with the same version and build number confuse lookups. Issues #303 and #305 report a wrong TestFlight build number being returned; give each build a unique number.

Other errors people report

SymptomUsual cause
Upload refused for a duplicate build numberThe build number was used before for this version; raise it, for example from BUILD_NUMBER
Build never shows in TestFlightProcessing failed; check the email from Apple
Private key "not valid"The App Store Connect API key content lost its line breaks or header lines
App record not foundThe app does not exist in App Store Connect yet, or the bundle id differs
External testers do not get the buildBeta review is still pending or was not submitted

Beta groups and beta review, plainly

  • Internal testers are members of your App Store Connect team. They can get a build as soon as it is processed, with no review.
  • External testers are anyone with an email or the public link. Their builds need TestFlight beta review by Apple first.
  • A group gets a build only when someone gives it to the group, by hand in App Store Connect or by a tool such as Codemagic's beta_groups.

Apple decides beta review. No tool can approve it or speed it up.

Doing the TestFlight step from AppForShare

If your Codemagic builds already go to AppForShare for ad hoc testers, a second workflow can upload the App Store signed .ipa there as well. Then an Admin can send it to TestFlight from the build page, with optional What to Test text (Pro). AppForShare uploads it to App Store Connect and sets What to Test only once Apple has processed the build, so nobody has to time that step by hand.

On Team, the same confirm can pick TestFlight groups (internal and external) and tick "submit for beta review when processed". After Apple has processed the build, AppForShare gives it to those groups and submits it for beta review. It skips the review with Apple's reason when the build is not waiting for one, for example when export compliance is not answered, and it stops without writing anything when Apple cannot process the build. The Admin gets one email with the result. Beta review is submitted only when an Admin asked for it on that send, never on its own, and AppForShare does not answer export compliance for you.

Processing times stay Apple's: AppForShare waits for them like any other tool and does not promise how long they take.

Common questions

Should I keep Codemagic's TestFlight publishing?

If it works for you, yes. Move the step only if you want a person to confirm each send, or one place for the build, its testers and its store steps.

Can testers install a TestFlight build from a link?

No. App Store signed builds install only through TestFlight or the App Store. For a link, sign a second build ad hoc; see Codemagic iOS ad hoc builds for Flutter.

How long is a TestFlight build available?

A TestFlight build expires 90 days after upload.

The Android side of store publishing is in Codemagic Google Play "Package not found". For every Codemagic step in one place, read Use AppForShare with Codemagic, or create a free account to look at the build page.

Keep reading

App Distribution Platform · · 5 min read

AppForShare File Size and Upload Limits

AppForShare limits the size of each build you upload by plan: 50 MB without an account, 150 MB on the Free plan, 2 GB on Pro and 4 GB on Team. Accounts also have a storage total, and every plan...