Nimisha Ranipa
Nimisha Ranipa

Reputation: 8314

This action could not be completed. Try Again (-22421)

I am trying to upload an Apple TV App to the App Store for testing purposes, but I got the issue:

This Action could not be completed. Try Again (-22421)

as in the below image:

enter image description here

So what can I do?

Upvotes: 710

Views: 196462

Answers (30)

Heider Sati
Heider Sati

Reputation: 2614

I was experiencing the exact same error hence being here (failed about 6 times over an hour).

I just tried again now (without changing anything), it worked by itself.

I read on the Apple-forums that it's an issue with Apple servers, nothing to do with your Xcode.

I also read that others trying the upload via ApplicationLoader (Menu -> Xcode -> Open Developer Tool -> Application Loader), this will ask where your code is, you would then have to select your Archive (not the source code), you can upload your code this way if you need. I personally prefer the built-in Xcode instead.

Works either way.

For the record, I am copying the thread from Apple Forums.

Upvotes: 14

Krunal
Krunal

Reputation: 79636

You can try following solutions:
Use Application Loader to upload your app, as Xcode organizer can't upload file (rejects IPA) sometimes, without genuine reason and it's frequently occurring issue, with Xcode Organizer, that apple could not resolve permanently.

Solution for error code: 22421

  • Apple app upload server is not working properly (not in connection or lost connection during file upload). Just wait and try again later (may be after a day).
  • Fluctuation in your network connection, during file upload.
  • You may not have added privacy statements in your info.plist file.

Cocoa Keys: Here, is list of keys (with privacy statements) that you should consider to add in your info.plist file, if you have used that service in your application.


Nowadays, you may also face, this error code: 90186 (with app loader)

  • Outdated application loader can be reason of this error. Use latest Xcode tool and use application loader from Xcode Tool.
  • Incorrect/invalid provisioning profile, associated with your build. Ensure, your have used correct provisioning profile (A provisioning profile with Distribution/Production mode is require. A Development mode provisioning profile won't allow your to upload app on store.)

You can find latest Application Loader Tool from latest Xcode Tool: Xcode -> Open Developer Tool -> Application Loader

enter image description here

Upvotes: 3

BennyTheNerd
BennyTheNerd

Reputation: 4000

(As of May 23, 2018)

Step 1

Open Xcode --> Product tab --> Archive --> export and save to desktop

Step 2

Open Xcode --> Xcode tab --> Open Developer Tool --> Application Loader >> double-click Deliver YourApp and select the recently exported .ipa file from your desktop

Solved the issue every time =)

Upvotes: 57

MAhipal Singh
MAhipal Singh

Reputation: 4827

For Xcode 8.3.2

i have resolved same issue

"This action could not be completed. Try Again (-22421)"

using following steps...

  1. Quit your xcode (if open)
  2. in Application Folder, Xcode 8.3.2 -->Show Package Contents -->Contents -->Application -->Application Loader (Show package contents) -->Contents -->itms -->bin -->iTMSTransporter (right click and Open with Terminal, it will auto start updating...) after updating open your project, rebuild your archive and upload it again..

For Xcode 9

issue

”This action could not be completed. Try Again (-22421)”

has been Resolved in Xcode 9. Now, we can upload app through Xcode Organizer also.

https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW876

Upvotes: 9

Ashvin
Ashvin

Reputation: 8997

Will work for 100% sure. I had the same issue but its solved by below steps:

  1. Delete all profiles from: ~/Library/MobileDevice/Provisioning Profiles/
  2. Delete developer account from Xcode >> Preference >> Account >> Delete your Apple Id
  3. Delete derived data
  4. Restart machine
  5. Download your provisioning profiles which you require to submit app
  6. Open your project and clean it
  7. And try again for submit app.

I hope this will work for all.

Upvotes: 19

Devansh Bhardwaj
Devansh Bhardwaj

Reputation: 186

The problem can not be solved with xCode Upload Process. I was facing same issues few days ago when submitting few of my apps and all apps showing same error. After many tries, I used Application Loader to upload app and it worked.

First go to xcode -> product menu -> archive Select Export for Appstore Save IPA file Now Open Application loader by going to xCode -> xCode Menu -> Open Developer Tool -> Application Loader Login with the credentials of account, and select the IPA file. Submit it! It works!

Upvotes: 0

Fattie
Fattie

Reputation: 12582

Update June5 ...

Apple appear to have fixed the current particular bug that was present for about the last week.

In short, you can upload with the blue "Upload to App Store..." button, rather than having to use the application loader.


For June 1, 2017

even more information, the seemingly failed uploads

do indeed seem to go to the app store...!

enter image description here

with each of the items there 208-231, I had tried to upload in the normal way, and it failed with the "Try Again (-22421)" code.

In fact, unnoticed by me, they were all going up to the app store, but it looks like they were just getting stuck on endless processing.

I then did I believe exactly what StevenOjo reported (yesterday) above:

  • Setting up an A NEW account on iTunes with a NEW email address

  • ALSO SET THAT UP ON DEVELOPER, remembering that, because Apple is the world's most idiotic organization, developer.apple is totally different from ituneconnect.apple

  • From my actual normal account, and this is IN DEVELOPER, NOT ITUNES CONNECT, I invited that new alter ego as an admin

  • Exporting the app from the organizer, as an IPA for app store distribution.

  • Logging into application loader with that new email and uploading the archive. It worked without any issues.

It's possible it would actually work fine now with my usual account; I don't know.

To be clear, after a very short time (say, two minutes), the final build (ie, 233 above) did indeed become "ready to test" as normal on the app store ..

enter image description here

All the "dud" uploads seem to be stuck forever on processing.

The staggering incompetence of Apple has reached "conspiracy theory" levels....

It is literally not possible to hire programmers and sysadmins, who are this bad.

There must be some sort of conspiracy theory, behind the utter fiasco that is Apple's provisioning. Maybe it's some sort of reverse-psychology marketing plot or something ....... who knows.


Later the same day:

I TRIED UPDATING itmstransporter:

I then tried with a new build number using the normal "Upload to the App Store..." cheery blue button.

It did not work ...

I then tried using Application Loader as described above...

It DID work with ApplicationLoader.

Conclusion ...

Unfortunately, itmstransporter is probably not relevant.

:/ what a fiasco.

Upvotes: 12

Bartłomiej Semańczyk
Bartłomiej Semańczyk

Reputation: 61774

When above problem exists and you have Two Factor Authentication enabled, just do the following:

  1. go to http://appleid.apple.com and then create your App-Specific Password

enter image description here

  1. Inside Application Loader login with your apple id and App Specific Password you just created.

  2. Upload your ipa to itunesconnect.

Upvotes: -1

Aanchal Chaurasia
Aanchal Chaurasia

Reputation: 629

For June 1 2017

Certain combined steps from answer of this thread that worked for me. I am writing the process that worked fine for me.

1) Open terminal and run this

cd ~

mv .itmstransporter/ .old_itmstransporter/

"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"

iTMSTransporter will then update itself, wait till process completes.

2) Logout the apple account from Xcode preferences account and login again instead of creating new Id on iTunes and developer account.

3) Clean the project and archive then export the app from organiser as an IPA for app store distribution.

4) Logging into application loader with same account and upload the ipa.

5) Process will complete successfully.

Upvotes: 3

StevenOjo
StevenOjo

Reputation: 2488

Both developers on our team experienced the same problem, from different machines on May 31st 2017. I worked around the problem by:

  1. Setting up an app specific password on my Apple ID.
  2. Exporting the app from the organizer, as an IPA for app store distribution.
  3. Logging into application loader with that App Specific password and uploading the archive. It worked without any issues.

What a lovely waste of time. Hopefully these steps work for others and save some time.

Upvotes: 5

Devansh Bhardwaj
Devansh Bhardwaj

Reputation: 186

The problem can not be solved with xCode Upload Process. I was facing same issues few days ago when submitting few of my apps and all apps showing same error. After many tries, I used Application Loader to upload app and it worked.

  1. First go to xcode -> product menu -> archive
  2. Select Export for Appstore
  3. Save IPA file
  4. Now Open Application loader by going to xCode -> xCode Menu -> Open Developer Tool -> Application Loader
  5. Login with the credentials of account, and select the IPA file.

Submit it! It works!

Upvotes: 9

Sagar Mody
Sagar Mody

Reputation: 531

After multiple days of waiting and the problem being persistent. I tried multiple solutions and the below worked for me:

Open your Terminal and put this command

sudo mkdir -p /Users/Shared

sudo chown root:wheel /Users/Shared

sudo chmod -R 1777 /Users/Shared

After I put this, everything works normally.

You can read more here http://www.cnet.com/news/itunes-crashing-with-access-privileges-error-in-10-6-7/

Upvotes: -2

ARNON
ARNON

Reputation: 1217

Open Terminal and run:

cd ~

mv .itmstransporter/ .old_itmstransporter/

"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"

Upvotes: 9

asedra_le
asedra_le

Reputation: 3067

There's another way to fix above error. Try this, it fixed it for me. Open Terminal and run:

cd ~  
mv .itmstransporter/ .old_itmstransporter/  
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter" 

Three above code line will update iTMSTransporter, then you can try uploading in XCode again.

Refs for more details: https://forums.developer.apple.com/thread/76803

Upvotes: 71

kris
kris

Reputation: 12572

Flaky network connection ...

I've had this in the past and it eventually just fixed itself.
But this weekend I tried for days consecutively without success.
However, on a hunch, I've just had success now by changing to a different network and then submitting.

Upvotes: 0

Vaiden
Vaiden

Reputation: 16112

Just happened to us.

We were sure the cause is Apple's Christmas holoday (23-27 Dec 2016). But no - we've tried again 5 minutes later and the version passed.

However - the submission button is greyed out due to the holiday.

No submit today my friend

Upvotes: 0

DevB2F
DevB2F

Reputation: 5075

Make sure you have saved the prepare for submission page under itunesconnect.apple.com for the new version

Upvotes: 0

UlfDunkel
UlfDunkel

Reputation: 169

I am quite sure that Xcode wants us to be logged in with our "normal" account to the App Store app when it tries to upload an app to the Mac App Store (MAS) via the Organizer window.

Usually, we developers all test our apps using our MAS test account. This seems to switch the logged App Store user, too. For me, this always works fine:

  1. Log in to the App Store app with your normal account.
  2. Retry the upload via the Xcode Organizer. Should then work like expected.

Upvotes: 0

Bartłomiej Semańczyk
Bartłomiej Semańczyk

Reputation: 61774

This happens because Apple's servers may not be working correctly. Just wait and try later or next time. It will work for sure eventually.

Upvotes: 768

Naresh Nallamsetty
Naresh Nallamsetty

Reputation: 1949

Just try exporting the iPA file and then upload that exported iPA file with application loader. It will solve your problem.

Upvotes: 191

Lakshaya Maheshwari
Lakshaya Maheshwari

Reputation: 512

I was too having this issues, I had uploaded my application and also updated it once but had no issues, but as i was uploading it for the 3rd time, i came across this issue, tried hell lot of things, scratched my head, googled it for hours, kept on trying the whole day, but nothing happened, but next day( a new light came) and my app uploaded on the first attempt.

Feel like there was some issue from apple side(be it there server, there software xCode or there mac).

So don not get dishearten if facing this problem, you can explore diff things with this problem but its just simple thing to correct this issue is to wait for some time take rest and try again.

Upvotes: 0

user5696333
user5696333

Reputation:

Check this list or just keep trying upload!

  • Got to member center
  • Check if there are any invalid provisioning profiles (for some reason, my app store distribution profile has become invalid)
  • Delete invalid profiles
  • Create new ones
  • Download and drag on XCode
  • Reboot Mac
  • Archive => Upload to App Store
  • Everything should be fine again

Upvotes: 2

Dasoga
Dasoga

Reputation: 5695

My problem was with the provisional profiles.

So for me it worked:

Go to Xcode preferences -> Accounts -> In my ID Apple Account -> Select "Download All"

I checked too, in member center and delete all invalid provisionals profiles and:

1 - Close Xcode

2 - Open Xcode, do clean and build of my project.

3 - Archive my code again.

Upvotes: 2

Mohit Tomar
Mohit Tomar

Reputation: 5201

Close your xCode and Application Loader,

Reboot your Mac.

Now, launch Application Loader and send it.

Upvotes: 0

vedrano
vedrano

Reputation: 2971

It is probably everything all right with your code/provisioning profiles/Xcode.

I did try once more, and it worked like a charm. I did not change anything.

Please take note that some actions of people replying earlier did take, could not have any effect on this problem but still, it might look like that actions did help. It would work with or without it anyway.

Upvotes: 0

isKrishnaK
isKrishnaK

Reputation: 393

Hey i have same issue when i am trying to upload IPA on Appstore. I solved it when i checked that my Distribution provisioning profile was invalid. So just update provisioning profile,download then install and restart Xcode. Now archive and upload it on Appstore it will be done.

OR

Create IPA and upload via Application Loader.

Good luck.

Upvotes: 28

Aleksandar Lugonja
Aleksandar Lugonja

Reputation: 95

I had the same issue. It was related to the Build Settings -> Code Signing Identity -> Release which was set to iOS Developer. If has to be set to iOS Distribution in order for Xcode upload to work.

Upvotes: 3

Alfro
Alfro

Reputation: 1544

If you connect a device while the app is building/archiving, your generic device will change to your connected device automatically, and when you are trying to upload to the app store you will have that weird crash.

This: enter image description here

will change to this automatically:

enter image description here

So to answer your question, I don't know if your issue have been caused because you plugged your iOs device while archiving, but you will be able to reproduce that issue if you plug your iOS device while archiving your app. Hope this helps somebody

Upvotes: 2

Lasse Bunk
Lasse Bunk

Reputation: 1858

I had this problem over and over again. No descriptive description, just the error message that OP posted.

In fact, it was a problem with the build and so had nothing to do with Apple's servers at all, as you might think.

The solution was to go to Organizer and Export the build, then upload it via Application Loader. Here I got the correct error messages. In my case, it was a problem with CocoaPods breaking app extension validations. I solved this and then I could upload my build.

Hope this helps someone like me.

Upvotes: 3

Berk
Berk

Reputation: 1329

I increased build number but the problem remained.

Then,

  1. I approved renewed licence agreement at itunesconnect.
  2. I opened App Store application on my MAC, and clicked update button for "Command Line Tools (OS X 10.11) for XCode, Version 7.3"
  3. I opened XCode. Clicked "Product" button on top bar. While tab content is open, I clicked "alt" key of keyboard to make "Clean Build Folder" option visible. I clicked this option.
  4. I rebuild my application for the same version that I received below error;

This action could not be completed. Try Again (-22421)

  1. This time I received below error when I want to upload new version;

This action could not be completed. Try again.

  1. I clicked Done and clicked blue "Upload to App Store" button again, and upload completed successfully.

I hope this helps.

Upvotes: 8

Related Questions