[Fix] Screenshot uploads in progress Error / appScreenshotSets Error

The Error “Screenshot uploads in progress” Error / appScreenshotSets Error, is an error that is invoked when you are working on a iOS application and trying to upload screenshots.

Given below is the snippet of the error you might get:

Screenshot uploads in progress Error / appScreenshotSets Error

I would like to share with you the steps I took to fix the “Screenshot uploads in progress” Error / appScreenshotSets Error

Why Screenshot uploads in progress Error / appScreenshotSets Error is Seen?

The error, Screenshot uploads in progress Error / appScreenshotSets Error is seen because you have not deleted the AppScreenshotSets for all of your “Preparing for submission” review versions using the App Store Connect API. You will have to delete the AppScreenshotSets to fix the error Screenshot uploads in progress” Error / appScreenshotSets.

The detailed solution to fix the error Screenshot uploads in progress Error / appScreenshotSets Error, is given below:

How to Fix Screenshot uploads in progress Error / appScreenshotSets Error?

To fix the error, Screenshot uploads in progress Error / appScreenshotSets Error, you will have to start deleting the AppScreenshotSets for all of your “Preparing for submission” review versions using the App Store Connect API.

To fix the error, Screenshot uploads in progress Error / appScreenshotSets Error, you will have to follow the steps mentioned below:

Step 1: The first step is to produce API keys. To do so open “App Store Connect” and select “Users & Access” then “Keys” (tab).

Step 2: The next step is to use the following ruby script to construct a time-sensitive token using the ISSUER ID, KEY ID, and AUTH KEY FILE (.p8 file):

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

Step 3: In order to run the script with ruby use the following below mentioned code:

ruby generateTokenFromCredentials.rb

Step 4: Then you will have to export the time sensitive token in terminal using the following code:

export APPSTORETOKEN=XXXXXXXXXXXX

Step 5: You can also use this additional but optional step to get more information about your applications app store. To do so use the following below mentioned code:

export APPSTORETOKEN=XXXXXXXX

//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"

Step 6: Then visit the request that generated the 500 Error to learn the appStoreVersionLocalizations from the Google Chrome or Safari Console.

You can do so by running the below mentioned code:

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

Step 7: Get the IDs for each appScreenshotSet by listing them all, you can do so by running the below mentioned code:

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

Step 8: This is the final step where you will have to every appScreenshotSet, by running the below mentioned code:

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

This should fix the error Screenshot uploads in progress Error / appScreenshotSets Error.

Conclusion

To fix the error, Screenshot uploads in progress Error / appScreenshotSets Error, you will have to start by deleting the AppScreenshotSets for all of your “Preparing for submission” review versions using the App Store Connect API.