Your mobile device has encountered an unexpected error (0xE8000001)

Your mobile device has encountered an unexpected error (0xE8000001). That’s the error I got stuck on for the last 1.5 weeks when trying to deploy and test my iPhone application on my device instead of the simulator.

I surfed tons of forums and discussion boards but didn’t find any solution, but since this is something I really had to get past, I didn’t give up and tried out everything I could think about… with success! :-)

The weird thing about this error is that it doesn’t occur the first time you deploy your application. Everything goes great until you try it a 2nd time (or sometimes it works a couple of times and then it just happens at random). I read rumors that if you restore your iPhone, you can deploy your app again 1 time (or a couple of times) and after that the error appears again.
These facts made me suspect that there is something left or changed on the device after the first time you install your application, so here’s what I did:
- I restored my iPhone and jailbroke it, installed SSH on it, connected to it from my laptop and started looking around. I made a full dump of the file system (list of files & dirs, file properties, file sizes,…) and then deployed my application a couple of times until I got the error.
- When I got the error I made a new dump of the file system and I wrote a little tool that compared the 2 lists from head to toe.
- After having found all the differences I started changing them back one by one and tested if the change fixed my problem.
- I quickly found out that the directory “/private/var/mobile/Media/PublicStaging” was holding a copy of my application and after deleting this copy, I could deploy again just fine.

I suppose this is a bug in the iPhone SDK, or maybe in v2.2 of the iPhone OS? I don’t know exactly, but if you encounter this error when deploying your app, here’s what to do:
1. jailbreak your iPhone (unless there’s another way to do step 2, then you can skip this step)
2. install SSH on it
3. every time you get the error, SSH to your iPhone (default root password on v2.2 is “alpine”) and delete your application folder inside “/private/var/mobile/Media/PublicStaging”
4. you can now deploy again ;-)

Oh and euhm… don’t forget to put SSH off again when you’re done, or change your default password, because you don’t want anyone to SSH into your iPhone when you’re on some public wifi, do you?

15 Responses to “Your mobile device has encountered an unexpected error (0xE8000001)”


  1. 1 Brandon December 22, 2008 at 1:31 am

    I’m glad to hear someone finally dug a little deeper into this issue. I guess for those of us who haven’t jailbroken our phones, we’ll have to wait for a bug fix (assuming it is a bug which in my experience I would agree with).

  2. 2 Vincent Claeys December 22, 2008 at 12:24 pm

    It was the first time I tried running my application on the device so I don’t know if this occurs in other SDK/OS versions as well. If it doesn’t (on the apple forums I can only find 2.2 related posts about it), I assume this is a bug and I hope they release a fix soon :/

  3. 3 Brandon December 22, 2008 at 11:29 pm

    I never had this problem with 2.1. I updated both the SDK and the iPhone OS at the same time so I would certainly place the blame on one of those two updates.

  4. 4 Keith Johnston January 3, 2009 at 9:58 pm

    I ran into the same issue. As a workaround, without jailbreaking your iphone, just make sure you *always* remove the application first before re-installing it. Do not do the ‘replace’ operation. As long as I remove it first and then install it using the Xcode organizer, I have not had this problem.

  5. 5 Vincent Claeys January 5, 2009 at 1:09 pm

    Thanks a lot for the input Keith! I’m sure a lot of people will be very happy with your solution!

  6. 6 frank January 11, 2009 at 7:13 pm

    This happened to me twice. I never succeeded in jailbreaking. My solution was completely restore my iphone.

  7. 7 DragonFly January 23, 2009 at 12:53 pm

    Your a genius. Thanks you so much for fixing my problem. I can’t tell you how much frustration went away with your helpful comment. THank you from the bottom of my iPhone’s little cyber heart. Rudy

  8. 8 MS February 22, 2009 at 11:56 am

    Just ran across this webpage while searching for a solution to this problem.

    I was able to fix it by restoring my iPhone. During the restore, I chose “no-backup” as I really wanted to install just the firmware and nothing else.

  9. 9 JC April 6, 2009 at 7:36 am

    Sweet! I ran into this same problem myself… however, I was able to resolve the problem WITHOUT jailbreaking my phone, and WITHOUT restoring it either. How did I do it? I simply had to “Clean All Targets” (from the Build menu in Xcode). I hope this approach continues to work for me, and wasn’t just a one-time deal. ;-)

  10. 10 carbonxt May 6, 2009 at 7:36 am

    It just worked for me to remove the old application from my phone, then do a “clean all targets” and then “build and go”. yay!

  11. 11 Mike Laurence May 10, 2009 at 1:19 am

    Note to all desperate coders who don’t want to restore OR jailbreak:

    You can just change your package identifier (com.company.app) slightly and it will “start anew” properly. You may need to restore/jailbreak eventually to recapture that first identifier, but you don’t have to slow down your development cycle multiple times for it (just when you’re doing final deployments).

  12. 12 san July 12, 2009 at 10:53 pm

    oh man, i just have no words. thanks, it helps :)


  1. 1 2.2 + error (0xE8000001, 501, 0x41e8) - Page 2 - iPhone Dev SDK Forum Trackback on January 10, 2009 at 4:02 pm
  2. 2 Your mobile device has encountered an unexpected error (0xE800003A) during the instal Trackback on January 23, 2009 at 1:29 pm
  3. 3 devinsblog » Blog Archive » Xcode error 0xE8000001, can’t install iPhone applications Trackback on January 24, 2009 at 9:59 pm

Leave a Reply




 

December 2008
M T W T F S S
    Jan »
1234567
891011121314
15161718192021
22232425262728
293031