Filed under: Software, iTunes, Troubleshooting, iPhone
Possible bug with iPhone synching and external iTunes libraries
TUAW reader Jamie Phelps has possibly stumbled upon a nasty iPhone synching bug when keeping one's iTunes library on an external hard drive. While tips like our how-tos for setting up iTunes with external drives or even an AirPort Disk work pretty well even when synching iPods with them, Jamie found that his iPhone gets the brainwash treatment when he's away from the drive containing his external iTunes library. As the story goes, Jamie synched his iPhone with a few songs and playlists, made a couple new playlists and then synched again. Hitting the road, however, and getting away from his external iTunes library drive is when the bug rears its nasty head: plugging the iPhone in while on the go caused iTunes to wipe out the new playlists and songs from the second sync operation, basically reverting them to their state before the second sync. To verify, Jamie even got adventurous and tried this whole thing a second time, once again watching iTunes blow away changes from the previous iPhone sync when the external media library isn't mounted. This is the first time I've heard of iTunes handling this kind of setup in a poor way; for as long as I can remember, iTunes has been clever enough to realize what's happening and and would either not sync anything to an iPod when away from the library drive, or it would actually sync any media downloaded or imported while away (as we've mentioned before, you can use the Advanced > Consolidate Library command to move all this new media once reconnected with the library drive). Since we don't really have any evidence of Apple deliberately changing this behavior for their iPods or iPhones, it makes sense for this quirk to be classified as a bug that will hopefully be squashed with an inevitable iPhone software update. But what say you, TUAW readers? Anyone else get bit? Sound off.


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 2)
Fraser Drew said 2:30PM on 7-14-2007
Doesn't iPhone sync differently (i.e. they've rewritten it)... i say this because you can use your iPhone while it's docked, and you can't use iPods.
Reply
Fritz Laurel said 2:34PM on 7-14-2007
I noticed this on day one. I really don't like the way the syncing works, you can't drag-drop or anything, aside from this removal stuff.
But, I don't think this is a bug, I think this behavior is by design. I think they did this on purpose becaue they were rushed to get the product out the door.
The sycing is really, really simplistic and only copies what you have checked off. And if you're not connected to the master library, then the files logically don't exist. And then they can't be "synced," can they?
You can't take files from an iPod and move them into your library. We've always known that. Therefore, when "syncing," or making 2 things identical, if something exists on the copy-end that doesn't exist on the master, it gets removed and thus everything has been "sunc."
Cheers,
FL
Reply
Luis said 2:51PM on 7-14-2007
I've been having issues syncing my iPhone on iTunes. After activating the phone and syncing the music and videos the phone works fine. However the issue comes when I put the iPhone back on the dock the Mac recognizes the phone but iTunes won't. So I'm not able to change the playlists or contacts on the phone since syncing is not available. I've had to reinstall itunes 4 times for it to work after each time.
Reply
John Oeffinger said 2:59PM on 7-14-2007
hmm, not on my setup. I keep a very large iTunes library on a Air Disk. I only have a small 150 or playlist I keep on the iPhone. Have run this setup since 6/29 with at least 1 sync/day with no problem.
Reply
james said 3:13PM on 7-14-2007
I also keep my music library on an external hard drive, but I only sync from a selected playlist (iphone not big enough for all music) and this bug does not seem to affect me...
I have synced a few times without my external connected and have not found that itunes wipes out my library on my iphone - it seems to leave it alone, though it does give me an error message saying that it cant find certain files
Reply
andy said 3:15PM on 7-14-2007
sounds like user error. iTunes would have had to think:
a) the library was empty (i.e. he created a new library in his user folder)
b) the iphone was set to auto sync....a bad idea if you are a "power user" syncing outside the normal home folder. Nice sensationalism though it actually got me to read and comment.
Reply
David Chartier said 3:23PM on 7-14-2007
#6: I think you might be missing the point here though. For a long time, iTunes has handled this kind of setup with an iPod gracefully. If you're away from your external hard drive, it simply won't sync anything to the phone. In Jamie's case, it's actually *making changes to the phone* when the drive isn't present. I used an external drive with my iPod for quite some time and can verify this; in fact, this kind of setup is the basis for many external iTunes library setup guides written by TUAW and many others. Now, iTunes is acting differently with the iPhone, making changes when it never did in the past with the iPod.
Reply
JCB said 3:24PM on 7-14-2007
This also happens with my 1st gen. Shuffle but not my nano or 3rd gen. iPod. Very annoying.
Reply
Jersey said 3:33PM on 7-14-2007
My 100 gigs of music is on an external drive, and I have yet to encounter this problem. I sync quite frequently without my external library connected -- usually when I want to update the address book, or safari bookmarks.
Reply
Slevin said 3:43PM on 7-14-2007
As I see it iTunes syncs the iPhone automatically when you connect, or manually if you have it set up that way.
When you tell it to sync specific playlists or songs that are on a connected external drive they'll sync, however once you disconnect that drive and attempt to resync the iPhone while the drive is missing, it won't find the songs so the iPhone or iTunes will assume those songs have been deleted or otherwise removed from your library. Since those songs are no longer in the library iTunes will wipe them from the iPhone because they are no longer in the master library. I believe this is what would happen if you did the same thing with an iPod that you did not manually arrange the tracks on
Look at it this way, iTunes is the master and the iPhone is the slave. If it exists in iTunes and you tell it to be on the iPhone then it'll appear on the iPhone. However if you remove it from iTunes but still have it on the iPhone on the next sync it'll be removed from the iPhone since the iPhone can only currently have what is in the master library. If iTunes can't find the songs then they will not exist on the iPhone, simple as that.
This is the way iTunes works and is not a bug. If you want specific songs on the iPhone then keep them in iTunes otherwise they'll be gone on the next sync. Next time think about it logically when using auto-sync and don't raise the bug flag on a default behavior in iTunes.
Reply
Jamie Phelps said 4:18PM on 7-14-2007
Like I said, I hoped I could describe the issue cogently. Apparently I didn't. Let me clarify.
The iTunes library file lives in my home directory. Only the media files are stored on Airport Disk. So, if I am not at home, then iTunes should just put an exclamation point next to the item in the library. But the playlists I created should remain intact.
When I sync the iPhone, it is iTunes' playlists that get obliterated.
To be clear: I had an old playlist called "Hand Picked" that I was synching with my 2nd Gen shuffle. I wanted a similar list for iPhone since my library is too big. I also thought to create a couple of others just for iPhone. So, I created a folder called iPhone, natch, and put three new playlists in there. I added stuff to those three playlists and set up iPhone to just sync those playlists. A check of iPhone reveals that the sync was a success. If I connect iPhone to Macbook away from Airport Disk, the playlists I lovingly created are vaporized without so much as a dialog box and then the files that were on iPhone after the changes and successful sync are no longer there.
But I have never EVER heard of an iTunes library changing when synching an iPod back to iTunes. Of course it updates play counts and some smart playlists, but nothing destructive. I take great exception to the "user error" comment.
Reply
tony said 4:37PM on 7-14-2007
I have been using my iphone with multiple external and network drives holding the files in my iTunes library and have not encountered this problem in spite of repeated syncing. ITunes is set to sync "selected playlists" each time I plug it in. The only time I need to bother connecting to these other drives is when I'm adding additional media. The stuff on my iPhone has remained intact.
Could Jamie's problem be specific to his Airport drive or maybe an iTunes settings issue? A temporary workaround would be to disable auto synch and only synch music when connected at home which, while it ought to be unnecessary, is reasonably simple as a workaround.
Reply
Alex said 4:57PM on 7-14-2007
I keep all of my music stored on an NAS and whenever I'm on the road my phone, iTunes and Macbook don't exhibit that problem. I would imagine this could be more attributed to user error than anything else ... chances are that some setting got changed somewhere within iTunes that has it overwrite everything with each sync.
Either way though, it's definitely weird. Keep us posted on what turns out to actually be the problem (and inevitable solution!) so we know how to counter it if and when it comes up!
Reply
Pete Wright said 4:59PM on 7-14-2007
I had a similar problem. 690 gigs of media in an external drive. I load a few playlists and videos. Pick up the iPhone to check it out. All is well.
Sync again, even with the media drive connected, and when I look at the media on the phone, it's wiped. Gone. Vanished. I powered off the phone completely and rebooted it -- and everything was as it should have been: all music, playlists, etc. displayed on the phone perfectly.
Reply
Jamie Phelps said 5:10PM on 7-14-2007
I went looking at my ~/Music folder, and noticed there were two XML files: iTunes Library.xml and iTunes Music Library.xml. The former lists its version number as 7.1.1 while the latter is 7.3.1. My suspicion is that these are in conflict. I moved iTunes Library.xml to another location and will see what that does to help.
Reply
Collin Ruffenach said 7:55PM on 7-14-2007
I have done this with my iPhone, as long as the playlist is still there it should be fine, it won't be able to find the songs to play them through iTunes, but it they are still referenced in the playlist you choose to sink then they will stay on the phone.
Reply
punkassjim said 7:59PM on 7-14-2007
Funny that I would check TUAW right in the middle of activating my new iPhone. And I have an external library.
Will I stop the activation? Feck no.
Reply
punkassjim said 9:05PM on 7-14-2007
Actually, the one thing I'm curious about is this: I usually take my external drive with me to work, so if I plug in my iPhone there, it shouldn't have a problem.
However, my work computer's iTunes is NOT authorized to play certain songs that my home computer IS authorized to play. Same library, different computer, different authorization key. I wonder if this will cause problems with the iPhone. I'll post if I find anything interesting.
Reply
noneother said 9:44PM on 7-14-2007
i have this issue, I use a separate flash drive for podcasts. Both external drives have the same letter designation. Itunes even says, something to the effect if you sync everything non music you will lose your music... wasn't a big deal, but i have realized my seperate music drive, podacst drive solution currently is outta play.. i know also need to see how to keep 2 sets of outlook contacts (His and hers iPhones)
Reply
Jen said 11:19AM on 7-15-2007
I just found a huge list of iPhone bugs at http://www.applehound.com/node/104
Reply