xcode 无法向引导服务器注册
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3375442/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Couldn't register with the bootstrap Server
提问by MadProfit
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”.
无法向引导服务器注册 com.yourcompany.XXX。错误:未知错误代码。
这通常意味着该进程的另一个实例已经在运行或在调试器中挂起。程序收到信号:“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.
任何帮助,将不胜感激。
回答by Rayfleck
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
我能够通过拔下 iPad、关闭电源并重新启动、清除所有 XCode 缓存和目标以及进行干净的构建来从中恢复。我正在运行 XCode 3.5.4 和 iOS 4.2.1 希望这对某人有所帮助。-麦克风
UPDATE: Same problem running Xcode 4.3 and iOS5 - just power-cycle the device.
更新:运行 Xcode 4.3 和 iOS5 的相同问题 - 只需重启设备即可。
回答by P?l Brattberg
You might wish to kill
all Simulator
processes, that can cause this error as well.
您可能希望kill
所有Simulator
进程也可能导致此错误。
Here's a one-liner to kill 'em all:
这是一个可以杀死所有人的单线:
kill -9 `ps ax | grep Simulator | grep -v grep | awk '{print }'`
Or more concise, like @brianegge mentions as a comment:
或者更简洁,就像@brianegge 在评论中提到的那样:
killall -9 Simulator
回答by theprof
My solution was to restart the ipad, wait a while and try again.
我的解决办法是重启ipad,稍等片刻再试。
回答by David H
If you get the hang when using the simulator, look at this thread: Strange Error When Testing Simulator
如果您在使用模拟器时遇到问题,请查看此线程:测试模拟器时出现奇怪的错误
You may find this test of interest, as it will tell you ASAP if the only solution is to reboot now or not:
您可能会发现这个测试很有趣,因为它会尽快告诉您唯一的解决方案是否现在重新启动:
Open Terminal and run this command: ps -Ael | grep Z
. If you get two entries, one "(clang)" and the other your app or company name, you're hosed - reboot.
打开终端,并运行此命令:ps -Ael | grep Z
。如果您得到两个条目,一个是“(clang)”,另一个是您的应用程序或公司名称,那么您就被灌输了 - 重新启动。
If you are a developer, enter a short bug and tell Apple how absolutely annoying having to reboot is, and mention they can dup this bug to "rdar://10401934" .
如果您是开发人员,请输入一个简短的错误并告诉 Apple 必须重新启动非常烦人,并提及他们可以将此错误复制到 "rdar://10401934" 。
回答by Mark Chackerian
I received the same problem, running an app on an iPhone from Xcode. The message that I was getting was the same as above:
我收到了同样的问题,从 Xcode 在 iPhone 上运行一个应用程序。我得到的消息与上面相同:
Couldn't register xxx.com.company.appname with the bootstrap server. This generally means that another instance of this process was already running or is hung in the debugger.
无法向引导服务器注册 xxx.com.company.appname。这通常意味着该进程的另一个实例已经在运行或挂在调试器中。
I tried many things to fix the problem, in this order, all which failed:
我尝试了很多方法来解决这个问题,按照这个顺序,都失败了:
- force quitting the app on the iPhone
- force quitting and then deleting the app the iPhone
- opening and closing the project
- cleaning the project
- restarting XCode
- 强制退出 iPhone 上的应用程序
- 强制退出,然后在 iPhone 上删除应用程序
- 打开和关闭项目
- 清理项目
- 重新启动 XCode
Eventually, I rebooted the iPhoneand the problem went away, which leads me to think that the source of the problem is a hung process that Xcode cannot or will not kill. If I am able to reproduce exactly what I was doing during my debugging session to get this strange state I'll add another note here.
最终,我重新启动了 iPhone并且问题消失了,这让我认为问题的根源是 Xcode 无法或不会杀死的挂起进程。如果我能够准确地重现我在调试会话期间所做的事情以获得这种奇怪的状态,我将在此处添加另一个注释。
回答by Aneil Mallavarapu
I opened a bug report with Apple: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/19/wo/WBbbbyopNFW8FFUuNSbk0w/10.66
我用苹果打开了一个错误报告: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
总结:XCode 调试器没有释放引导服务器端口
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:
重现步骤:在 Lion 10.7.2 上的 Xcode 4.2 Build 4D5163b 模拟器中调试 iPhone iOS5 应用程序时,崩溃有时会导致无法启动 bugger。相反,Xcode 会产生此错误:
Couldn't register com.MyApp.MyApp 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”.
无法向引导服务器注册 com.MyApp.MyApp。错误:未知错误代码。这通常意味着该进程的另一个实例已经在运行或在调试器中挂起。程序收到信号:“SIGABRT”。
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.
实际结果:无法启动调试器。我发现让模拟器再次工作的唯一方法是重新启动 Mac OS。
Regression:
回归:
Notes:Lots of people are having this problem: iPhone - strange error when testing on simulatorCouldn't register with the bootstrap ServerBootstrap Server Error in Xcode IPHONEhttps://discussions.apple.com/message/10416765?messageID=10416765
注意:很多人都有这个问题: iPhone - 在模拟器上测试时出现奇怪的错误无法注册引导服务器引导服务器错误在 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.
退出 XCode 和模拟器(并确保 ps -Al | egrep "Xcode|Simulator" 不返回任何内容)对问题没有帮助。
Running "launchtl bslist | grep MyApp" reveals that com.MyApp is still registered with the bootstrap server:
运行“launchtl bslist | grep MyApp”显示 com.MyApp 仍然在引导服务器上注册:
$ launchctl bslist | grep MyApp
A com.MyApp.MyApp.UIKit.migserver
A com.MyApp.MyApp
I wrote some code to find the port and invalidate it, but this too fails:
我写了一些代码来查找端口并使之无效,但这也失败了:
NSMachBootstrapServer *bsserver = [NSMachBootstrapServer sharedInstance];
NSMachPort *port = (NSMachPort *)[bsserver portForName:@"com.MyApp.MyApp"];
[port removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:<#(NSString *)#>
NSLog(@"port = %@",port);
NSLog(@"port.isValid=%d",[port isValid]);
[port invalidate];
NSLog(@"port.isValid=%d",[port isValid]);
回答by zeiteisen
I got the same issue with Xcode 4. The solution was to change the scheme. Run set to Debug, Test set to Debug, Profile set to Release, Analyze set to Debug, Archive set to Release
我在 Xcode 4 上遇到了同样的问题。解决方案是更改方案。运行设置为调试,测试设置为调试,配置文件设置为发布,分析设置为调试,存档设置为发布
回答by Gik
To sum it all up.
总结一下。
Sometimes kill -9 (the process id)helps.
Sometimes (as stated) launchctl list | grep UIKitApplication | grep "(your app name/identifier)" | awk '{print $3}' | xargs launchctl removeworks.
有时kill -9(进程 ID)会有所帮助。
有时(如所述)launchctl list | grep UIKitApplication | grep "(你的应用名称/标识符)" | awk '{print $3}' | xargs launchctl 删除工作。
But if its a "zombie" process, only a restart will solve your problem.
但是,如果它是一个“僵尸”过程,则只有重新启动才能解决您的问题。
A temporary solution is to just change the identifier (IOS Application Target, Summary Tab) to something else (like "com.mycompany1.myapp" from "com.mycompany.myapp") but remember to change it back after the reboot and before you submit it.
一个临时的解决方案是将标识符(IOS 应用程序目标,摘要选项卡)更改为其他内容(例如“com.mycompany.myapp”中的“com.mycompany1.myapp”),但请记住在重新启动后和您之前将其更改回来提交它。
(of course this will create another app on the simulator, but I guess that's the least of your problems....)
(当然,这会在模拟器上创建另一个应用程序,但我想这是您的问题中最少的......)
Unfortunately, there is no "easy way to greatness"... ;-)
不幸的是,没有“通往伟大的简单方法”...... ;-)
回答by Kiko Seijo
The easiest way its to change the target name, Remembert to change it back next day after a restart.
最简单的方法是更改目标名称,Remembert 在重新启动后第二天将其更改回来。
回答by ChenXin
Restarting my computer solved my problem. This error happened when I connected my new iPod Touch to my mac and ran my project in simulator at the same time.
重新启动计算机解决了我的问题。当我将我的新 iPod Touch 连接到我的 Mac 并同时在模拟器中运行我的项目时,就会发生这个错误。