Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iTunes, An unknown error occurred (502)

I purchased a couple of albums from iTunes store last night and there are 3 tracks from one of the albums that just wont download and return: 'An unknown error occurred (502)', this is odd because this is supposed to be a connection error while all the other tracks downloaded but these 3 continually gave the error. I tried again this morning and even switched off all the Network barrier software just in case and the same thing happens.

This seems very odd as I mentioned all the other tracks downloaded before and after these problem tracks tried to download, so the issue appears to be these 3 tracks for some reason.


Any suggestions?

MacBook Pro (Retina, 15-inch, Mid 2014), OS X Yosemite (10.10.1)

Posted on Sep 23, 2015 1:06 AM

Reply
21 replies

Sep 23, 2015 1:15 AM in response to Mike B

Just to add to this, I see one of the albums did not download last night and so I selected the 'Check for available downloads' from the Store menu, while tracks are downloading one of them has returned a 502 error and iTunes then goes to download the next track, seems very odd that this only appears with some tracks.

Clicking the cloud icon on the tracks that are returning the 502 error just returns the error again while iTunes is actually downloading other tracks so it cannot be a connection/gateway issue!

Sep 23, 2015 12:47 PM in response to Mike B

Please read this whole message before doing anything.

This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.

Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem.

Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.

The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

Test while in safe mode. Same problem?

After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

Sep 23, 2015 3:42 PM in response to Linc Davis

Thanks for the reply.


In safe mode the issue still exists, I still get the 502 errors and then when trying again after the restart from safe mode I get the same errors so it would appear this is not being caused by any third party software.


An added bit of info:

I have selected to sync all my music to my iPhone from the MBP and find the tracks that return a 502 error on the MBP is actually on the iPhone and plays there, if I select to play a track on the MBP that has the cloud icon iTunes just kicks the selection onto play the next track after a couple of seconds of silence, so the music is on the iPhone but not downloading to the MBP!

Sep 23, 2015 5:22 PM in response to Mike B

Back up all data.

As a test, please move the iTunes library folder from the Music folder (or wherever you keep it in your home folder) to the Desktop. If you've moved the library folder to another volume, unmount the volume.

Quit and relaunch the application. It may prompt you to create a new library, or to select an existing one. Create a new one and test.

After testing, quit again and put the original library back where it was, replacing the test library. Post your results.

Sep 24, 2015 10:36 AM in response to Linc Davis

1) Placed iTunes folder from User > Library folder onto desktop

2) Launched iTunes

3) Checked one album that had tracks that had not been downloaded

4) These tracks where no longer listed in the albums tracks list

5) Checked for available downloads in iTunes

6) These tracks then reappeared in the albums tracks list

7) iTunes 502 errors appear.

8) Quit iTunes

9) Replaced the iTunes folder with original copy on desktop

10) Launched iTunes again

11) iTunes connected to the store it'self

12 ) 502 errors appear again.


iTunes didn't ask to if it was OK to create the iTunes folder, it just created it on it's own.

Problem still exists!

Sep 24, 2015 2:02 PM in response to Mike B

I could torment you with more requests for information, but I'm fairly sure that this is a problem at Apple's end, not at your end, and that you will either have to contact Apple for a resolution or just wait for it to blow over. I've seen a few other similar reports lately. You could try signing out of the iTunes Store, Music, all that stuff, and then signing back in, but I wouldn't expect any change.

Sep 25, 2015 5:14 AM in response to Mike B

I have just had exactly the same problem.


Purchased an album with 50 tracks. 48 downloaded no problem. 2 would not download and I got the (502) error message.


This happened across all my Apple devices, including iMac, Macbook Air and iPhone.


Solved the problem by turning on my iPhone's hotspot and connecting the computers to that (rather than my home wifi network) and then trying to download again.


This time the two additional tracks downloaded.


I'm guessing that there must be some security feature on my home network (I am using an Airport Extreme) which prevented the download. What is bizarre is that the other 48 tracks downloaded fine.


Suggestion - try connecting to another network.


Regards,


Richard

Sep 25, 2015 5:23 AM in response to Ubergeeksov

Well this seemed to get me all the missing tracks except 1, Military Man (Live) by Gary Moore from the album The Platinum Collection just doesn't want to know!


The home network I was connecting to was not running through my Airport Extreme but I did try connecting to that also, I didn't expect that to work as the extreme is connected to the same internet that is sent to my home and so to the router the main network is coming from but I took the computer outside and connected to the G4 network on my iPhone using the Hotspot on it and that got them all except one so I am now much better off.


So it must be something that is not compatible with Apple downloads and the network although as you mentioned all the other tracks where downloaded without issue as where mine and even stranger the one track (Military Man) that just does not want to download from either of the two networks I connect to.


Thanks for the suggestion

Sep 26, 2015 6:59 AM in response to Mike B

I had this problem on a Sam Smith album, it was Track 5 I'm not the only one. Have tried for 2 days and have tried everything suggested in the forum but to no avail. Decided to turn off wireless and make a direct connection via cable to router, still did not work. Then I went to Youtube with the intention to download the missing track from there. I began by just playing the track and watching the video on Youtube, I then decided to try downloading from the ITunes store one last time whilst watching and listening to it on Youtube, and what do you know bingo! ITunes download the track to my ITunes folder at the very same time. Whether this was a pure coincidence and the problem had fixed itself or Apple had fixed the problem I will never know but it worked for me and the track is now playing without any problems, it's worth a try. Good luck and I hope you get the problem sorted.


regards

Steve

Sep 27, 2015 12:13 AM in response to Mike B

Hi,


I have had a similar problem since yesterday, where the Spotify iOS app will not download on 3 different iPhones and also on my laptop via iTunes, I get the 502 Bad Gateway error. Tried without my WiFi but can only get GPRS in my area so that didn't work either. All other apps I tried, downloaded fine.


Hopefully, Apple will sort this issue out soon.

Sep 27, 2015 8:26 AM in response to jbloomfield

Had the "502" error pop up in iTunes while trying to update Spotify and Freedom apps, could not update same apps via the iPad or iPhone also. Tried deleting and then re-downloading again, but still failed - switch from my home network (adsl2+) to iPhones 3G but still no good. All this time was speaking to Apple tech support, we came to the conclusion it was not at my end but could not identify what was happening, tech even spoke to accounts to check if my Apple ID was ok - all fine.


We agreed to a call back a day later (Friday 25th 8.00pm BST) to enable tech support time to discuss issue internally - but guess what, tried download at 10.00am that morning and all went fine, in fact the speed was very fast. Tech Support still not sure what had gone wrong, I confirmed that nothing had changed at my end so concluded it was Apple network not accepting the request for update/download of said apps for some reason or the developers for the apps having some how caused an issue on the update release!


While the two apps above would not initially download I did try others and all went fine, and Beats streamed ok and Podcasts kept updating - only advice is if anyone has similar issues give it a couple of days and see it it resolves itself!

Feb 11, 2016 9:33 AM in response to SiHancox

This is a generic network error. I've been getting 403, then 502 errors when I enable my caching server (OS X Mountain Lion Server.) None of the Macs on my local network will work. Doesn't matter what OS it is. I have 10.8, 10.9 and 10.11 machines and none will download iTunes App Store updates, or initiate purchases. However, if I use any of my iOS devices on the LAN, while connected to Wi-Fi, there's no problem buying or downloading updates. Also, if I turn off my caching server, and lose the resulting caching benefits, I can download without problem. Oddly, my caching service increments as I download new items, it just won't let any devices use that data.

When I called Apple, I went through 6 techs before being hung up on. None had any idea what was the problem, so I think the problem here is one of a few things:

1. Apple has quietly deprecated another back-end service (Mountain Lion caching service)

2. There's a transient network problem...why most problems seem to resolve themselves after a period of time

3. (Most likely) There's something inherent in my setup that's recently (6 months ago) failed. If I take any of my Macs to another location, I have no problems doing the same things.

Feb 11, 2016 10:05 AM in response to Matt W (TechnicalMac)

Hi Matt, thanks for the information but I am sure it's not 2) a network error. The track eventually download at some time as when going to that album about a week ago I noticed the track had since downloaded.

The reason I don't think it is a network error is because iTunes was downloading other tracks without issue, also if I where to select to download this track I would get the 502 error but selecting to download another track would download that track so not a network error for me but as I say, thanks for the feedback.

iTunes, An unknown error occurred (502)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.