putpkt: write failed, broken pipe

11,761

Solution 1

This problem seems to happen whenever I quit the app on my device (pressing the home button) while the debugger is stopped at a breakpoint. Any subsequent build and run on my device results in this error.

To fix this, there's no need to delete the app, clean or rebuild. Just need to restart the device.

Solution 2

Well, I've restored my iPad to factory defaults. And it seems to work now, so yeah.

EDIT: Please look at @mud's answer below since it solves most cases without a complete restore. In my case that didn't work, so I've accepted this answer.

Solution 3

I had the same error - I not only restarted my device, but also deleted the app on my device and cleaned the build directory (product --> clean on Xcode 4).

I then built and ran the program again and it worked.

I did not need to restart Xcode.

Share:
11,761
Tejaswi Yerukalapudi
Author by

Tejaswi Yerukalapudi

Updated on June 14, 2022

Comments

  • Tejaswi Yerukalapudi
    Tejaswi Yerukalapudi almost 2 years

    I'm using AdHoc deploy to deploy my app on an iPad, and I get this error. I've checked out a few questions in SO that say the same, but the solution has always been restart XCode, Restart iPad, Restart Mac. I've done all three and this error does not go away. Any other tips I need to look at?

    Thanks,
    Teja.

  • ettore
    ettore almost 13 years
    worked, thanks. It's kind of crazy there's such a huge bug in Xcode 4/SDK 4.3. Hopefully Apple will fix this soon.
  • Tejaswi Yerukalapudi
    Tejaswi Yerukalapudi almost 13 years
    Well, I've actually tried this and didn't work in my case. I've however updated my answer to point to this post.
  • Rich Apodaca
    Rich Apodaca over 12 years
    Restarting the device did the trick for me on a PhoneGap project - thanks @mud.
  • Rasmus Styrk
    Rasmus Styrk over 12 years
    Worked! I restored a lot of my code before i found this answer.. :s
  • Banjer
    Banjer over 12 years
    I had to enter the password on my iphone to unlock the device in order to fix this issue.