iOS - strange error when testing on simulator

2019-01-01 16:21发布

I was testing my app on the simulator when it crashed on clicking a button of a UIAlertView. I stopped debugging there, made some changes to the code and built the app again. Now when I run the application, I get this error in the console

Couldn't register com.myApp.debug 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 removing the app from the simulator, doing a clean build but I still get this error when I try to run the app.

What should I do to be able to run the app on my simulator again?

30条回答
看风景的人
2楼-- · 2019-01-01 17:12

No rebuild or reinstall needed for my issue, and in my case the error appeared when trying to run the app on the iPhone. Simulator worked fine.

Solution: Delete app off phone, do a cold restart of phone and now all is well.

查看更多
唯独是你
3楼-- · 2019-01-01 17:13

I just had this error. I tried restarting the simulator and Xcode but my project would only work again after a clean and build. No idea what caused it.

查看更多
梦寄多情
4楼-- · 2019-01-01 17:13

Fixed by rebooting my phone after deleting the app, then rebuilding it clean and running again. Works fine now.

Weird.

查看更多
后来的你喜欢了谁
5楼-- · 2019-01-01 17:14

I had the problem @jyap mentions with zombie processes. The only way to clear them was to reboot. However, I noticed that my friends working on the same project would get the same issue but could kill the simulator without creating a zombie process. I completely uninstalled Xcode and re-installed it, and while I still get the error, it doesn't create zombie processes, so I don't have to reboot.

Before I did that, I was using this really ugly workaround: change your app ID and run again. You end up with junk copies of the app in the simulator, but you can put off rebooting for a while.

查看更多
高级女魔头
6楼-- · 2019-01-01 17:16

I was getting this error all the time until I stopped trusting the "Stop" button in the Run dialog box. Now that I always hit stop in the toolbar before trying to run, I have yet to encounter any zombie processes.

查看更多
听够珍惜
7楼-- · 2019-01-01 17:16

I faced this kind of issue once in my case here's what i did

  1. Delete the app from simulator.
  2. Delete the derived data folder.
  3. Perform a clean action in the project by selecting the product menu - clean
  4. Reset the simulator.
  5. Quit Xcode.
  6. Try running the project now if its working fine else go to step 7
  7. Repeat all steps from 1 to 5 and then restart your machine.

In most of the cases i got it running at step 6 extreme cases i had to restart my machine.

查看更多
登录 后发表回答