Solution for “Could not restore this iPhone because an error occurred” When Restoring iOS from Mac/iTunes Backup

2 minute read

Published:

Recently, I had to send in my iPhone for repair and received a replacement device. Before handing in my phone, I made data backups using both Finder on my Mac and iTunes on Windows. When I got my new phone back and tried to restore from backup, the restoration would progress halfway—always stopping at the exact same point regardless of how many times I tried—then the phone would force restart and display the message, “Could not restore this iPhone because an error occurred.” I tried updating iTunes, using the backup on my Mac, switching cables, putting the phone in DFU mode, and a variety of other methods, but nothing worked.

I was getting a bit frustrated, because if I lost this backup, it would probably take me days or even weeks to fully migrate everything over again. After searching for similar cases, I came across some forum posts (1 2 3) that mentioned possible issues with iOS version mismatches or insufficient free space. However, I had already double-checked all those possibilities, and the problem occurred on both PC and Mac.

Fortunately, in the backup folder on my Windows PC, I found a file called log.txt (Note: I could not find an equivalent file on my Mac. I also experimented with restoring using i4Tools, so it’s unclear whether the log was generated by iTunes or i4Tools).

image.png

Most of the information in the log wasn’t much help, except for one interesting error message:

image.png

Even more fortunately, the file path in this error allowed me to pinpoint which app was causing the issue. It turned out to be an app I had sideloaded using AltStore (though this doesn’t necessarily mean the problem was caused by sideloading—it could just be a coincidence). So, does that mean that fixing this specific problem would allow the backup to be restored successfully?

To test this, I found a project on GitHub called iTunes-Backup-Explorer. To quote its description, it’s “a graphical tool to extract and replace files from encrypted and unencrypted iOS backups.” Using this tool, I located the backup files corresponding to the problematic app and deleted the entire parent folder (thankfully, I didn’t need the data from that app). After doing this, the backup was restored successfully.

A Few Personal Thoughts

I find it hard to agree with Apple’s software engineering philosophy, especially their habit of wrapping and hiding error messages. It seems they are particularly keen on keeping users in the dark about technical details and the actual location of errors. Sometimes, Apple will only ever tell you that something failed; as for exactly where or why, they absolutely refuse to say—you’re left to guess on your own.