An error occurred uploading to the iTunes store

2019-02-05 00:05发布

问题:

Using Xcode 4.3.2.

Since yesterday, I can't upload to ITunes Store. I can't find any reasons.

Archive -> Validate... no problem.

But, it is occurred error in distribute.

My app is using Push.

My Xcode version is 4.3.2.

What do I do to escape this state?

Please help me... and thank you.

回答1:

I had the similar issue..which i was able to fix using the solution mentioned here - An error occurred uploading to the iTunes Store - Please upgrade Java

for quick reference I am adding the solution here also

open terminal window and execute below lines of code

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0


回答2:

I upgraded to java 1.7 (October 2012) and applied the latest Apple patch 2012-006 (if I'm not wrong)

Well, it disabled the java preferences (the Oracle Java pref is used inside the System Pref) and the Java Preferences in the Utilities folder was removed (by the latest Apple patch), because it seems they want yo force you to use the latest Java release (I can understand it, considering the security problems).

Result: I'm not able to submit to the app store and there is no way to re-enable it

XCode use Java at it's core function and a problem in Java makes Apple XCode unusable to submit to the App Store ... I didn't suspect that.



回答3:

Well I managed to workaround the issue by updating my symlinks. Here's what I did:

cd /System/Library/Frameworks/JavaVM.framework/Versions

ls -l

total 72 lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.4 -> CurrentJDK

lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.4.2 -> CurrentJDK

lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.5 -> CurrentJDK

lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.5.0 -> CurrentJDK

lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.6 -> CurrentJDK

lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.6.0 -> CurrentJDK

drwxr-xr-x 8 root wheel 272 Oct 18 16:42 A

lrwxr-xr-x 1 root wheel 10 Oct 18 17:18 Current -> A

lrwxr-xr-x 1 root wheel 59 Oct 18 16:41 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

sudo mv Current Current.bak

sudo ln -s CurrentJDK Current

java -version

java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

This changes the 'Current' symlink to point to the same version that 'CurrentJDK' is pointing to. This may or may not be the same on your system, so double check. This may or may not cause other problems, but so far I haven't seen any.

To undo the changes, just go back to the same directory and:

sudo rm Current

sudo mv Current.bak Current

Hope this helps!



回答4:

Try to use "Software Update..." from "Apple symbol" also works



回答5:

If Xcode gives you the following error in Console

Error: Java 1.5, 1.6, or 1.7 is required. Currently, java is the default java version. Please upgrade.

Check whether there is a Software Update. In my case there was one: Java for OSX 2012-002

Java for OS X 2012-002 delivers improved compatibility, security, and reliability by updating Java SE 6 to 1.6.0_31.

Please quit any web browsers and Java applications before installing this update.

See http://support.apple.com/kb/HT5055 for more details about this update.

See http://support.apple.com/kb/HT1222 for information about the security content of this update.

After the update I could submitted my app with no error.



回答6:

It's an issue with the last java version, a workaround in terminal write:

sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0

Then you can upload normally.



回答7:

This did not solve my problem. I was having this problema because I installed and set as default the Oracle Java 1.7. Disabling it and using Apple Java, this problem went away.



回答8:

Oracle Java 1.7 Broke the Xcode Application uploader again!! I filed this as a Bug on ADC and it was acknowledged as such.

I was able to fix two ways:

  1. Unistall Java 1.7 and fallback to Apple Java 1.6.34 or 35 work.
  2. Temporarily turn off Java 1.7. Goto: Applications > Utilities > Java Preferences and un-check java 1.7. After that the uploader worked. If you need 1.7 you can turn it back on after you upload.