I just changed some code in my program and got this error:
Couldn't register com.yourcompany.XXX with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”.
I tried restoring my program to a version that worked, rebooted, restarted, empty caches and rebuild on versions that even worked before.
Any help would be appreciated.
I opened a bug report with Apple: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/19/wo/WBbbbyopNFW8FFUuNSbk0w/10.66
Please let me know if you can't access it.
Summary: XCode debugger is not releasing bootstrap server port
Steps to Reproduce: While debugging an iPhone iOS5 app in the simulator in Xcode 4.2 Build 4D5163b on Lion 10.7.2, a crash can sometimes result in being unable to start the bugger. Instead, Xcode produces this error:
Expected Results: Should be able to start debugger after a crash.
Actual Results: Cannot start debugger. The only way I've discovered to make the simulator work again is to restart Mac OS.
Regression:
Notes: Lots of people are having this problem: iPhone - strange error when testing on simulator Couldn't register with the bootstrap Server Bootstrap Server Error in Xcode IPHONE https://discussions.apple.com/message/10416765?messageID=10416765
Quitting XCode and the Simulator (& ensuring ps -Al | egrep "Xcode|Simulator" returns nothing) does not help the problem.
Running "launchtl bslist | grep MyApp" reveals that com.MyApp is still registered with the bootstrap server:
I wrote some code to find the port and invalidate it, but this too fails:
Okay, I've got a workaround for the hardware issue that doesn't involve rebooting the phone. I assume this will also work on the simulator but I haven't tried it.
Force Springboard to relaunch by changing the language. Settings -> General -> International -> Language.
I just changed it to Spanish, waited for Springboard to relaunch, changed it back to English, and was good to go.
I was able to recover from this by unplugging the iPad, powering it down and back up, clearing all XCode caches and targets, and doing a clean build. I'm running XCode 3.5.4 and iOS 4.2.1 Hope this helps someone. -Mike
UPDATE: Same problem running Xcode 4.3 and iOS5 - just power-cycle the device.
You might wish to
kill
allSimulator
processes, that can cause this error as well.Here's a one-liner to kill 'em all:
Or more concise, like @brianegge mentions as a comment:
Lot's of good answers have been provided for fixing the problem.
I have found that I can recreate this bug by creating a breakpoint in my code so that the execution pauses. Then if I press on the Stop Button the bug will now appear when I try to run the code again. Resuming the execution before pressing the Stop Button therefore avoids this issue.
Hope this helps.
This may be caused by an instance of your app running in the background. This simplified process worked for me without even having to close xCode or shutdown my computer.
In theory Pål's command line solution should work as well. The issue definitely seems to be caused by an extra instance of the app running in the background. The app does not always seem to be getting killed properly after each test in simulator or on the device. I first noticed this when jumping between simulator and a device frequently.
As a preventive measure it is good practice to always hit the stop button in xCode after each test.