App Store Screenshots - "Screenshot uploads in progress" Error / appScreenshotSets Error

Viewed 754

This is going to be self-answered question. This issue is wasting days and whole weeks of developer time.

See the screenshots below to see what the problem is. Apple developer forum doesn't provide you any answers.

The issue is:

Apple App Store shows no screenshots because of App Store's web interface issue. When you try to upload new screenshots it does not let you do that. It throws a STATE_ERROR with a message of 'Screenshots already exists!'.

App Store Shows No Screenshots even when previously uploaded screenshots exist

Console shows UNEXPECTED_ERROR from App Store API

AppScreenshotSets throwing a 500 Error

1 Answers

The way you resolve this is to use the App Store Connect API to delete the AppScreenshotSets for all your "Preparing for submission" review version.

Steps to follow:

  1. Generate an API keys. Go to "App Store Connect" > "Users & Access" > "Keys" (tab).

  2. Use the ISSUER_ID, KEY_ID, AUTH KEY FILE (.p8 file) to create time-sensitive token using the ruby script below:

require "base64"
require "jwt"
ISSUER_ID = "XXXX-XX-XXXXXX-XX-XXXXXXXX"
KEY_ID = "XXXXXXXX"
private_key = OpenSSL::PKey.read(File.read("AuthKey_XXXXXX.p8"))
token = JWT.encode(
   {
    iss: "XXXX-XX-XXXXXX-XX-XXXXXXXX",
    exp: Time.now.to_i + 20 * 60,
    aud: "appstoreconnect-v1"
   },
   private_key,
   "ES256",
   header_fields={
     kid: "XXXXXXXXX" }
 )
puts token

  1. Run the script with ruby

ruby generateTokenFromCredentials.rb

  1. Export the time sensitive token in terminal:

export APPSTORETOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  1. [OPTIONAL STEP] Get additional information about your app store app

export APPSTORETOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

//List user
curl 'https://api.appstoreconnect.apple.com/v1/users'  --Header "Authorization: Bearer $APPSTORETOKEN"

//List Apps
curl 'https://api.appstoreconnect.apple.com/v1/apps'  --Header "Authorization: Bearer $APPSTORETOKEN"


//Get App Store Versions
curl 'https://api.appstoreconnect.apple.com/v1/apps/<APP_STORE_ID_NUMBER>/relationships/appStoreVersions'  --Header "Authorization: Bearer $APPSTORETOKEN"


//List All App Store Version Localizations for an App Store Version
curl 'https://api.appstoreconnect.apple.com/v1/appStoreVersions/<APP_STORE_ID_NUMBER>/appStoreVersionLocalizations'  --Header "Authorization: Bearer $APPSTORETOKEN"


//Review submissions
curl 'https://api.appstoreconnect.apple.com/v1/apps/<APP_STORE_ID_NUMBER>/reviewSubmissions'  --Header "Authorization: Bearer $APPSTORETOKEN"



//Pre release versions 
curl 'https://api.appstoreconnect.apple.com/v1/apps/<APP_STORE_ID_NUMBER>/preReleaseVersions'  --Header "Authorization: Bearer $APPSTORETOKEN"


//Get App Info
curl 'https://api.appstoreconnect.apple.com/v1/apps/<APP_STORE_ID_NUMBER>/appInfos'  --Header "Authorization: Bearer $APPSTORETOKEN"

  1. Find out the appStoreVersionLocalizations from the Google Chrome or Safari Console by going to the request that threw the 500 Error.

curl 'https://appstoreconnect.apple.com/iris/v1/appScreenshotSets?include=appScreenshots&filter\[appStoreVersionLocalization\]=XXXXX-XX-XX-XX-XXXXXXX' \
  -H 'sec-ch-ua: "Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"' \
  -H 'x-csrf-itc: [asc-ui]' \


Take appStoreVersionLocalization from the URL

  1. List all the appScreenshotSets and get the ids:

//List all relavant App Screenshots
curl 'https://api.appstoreconnect.apple.com/v1/appStoreVersionLocalizations/21XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/appScreenshotSets'  --Header "Authorization: Bearer $APPSTORETOKEN"

  1. DELETE EVERY LAST ONE OF THEM

//Delete Screenshots Sets
curl -X DELETE 'https://api.appstoreconnect.apple.com/v1/appScreenshotSets/<XXXXX-XXX-XXX-XX-XXXX>' --Header "Authorization: Bearer $APPSTORETOKEN"

Now you can go back to the appstore connect's web interface and continue your uploads.

[Smash that like and subscribe button below!] [Yes, that's a joke making fun of all the youtube channels.]

Related