These errors keep happening from time to time when i run my app. There doesn't seem to be any rhyme or rhythm to when the errors happen. Sometimes I can run and quit my app 100 times and not see these. Sometimes every 5 times they will show up. They go away but they are slowing down the dev process. How can I fix the underlying issue?
In my experience, these 3 cases occur in 3 different scenarios.
"Springboard Error" is a common iOS simulator issue since Xcode 5.
It has no fix, as yet, other than restarting the iOS simulator.
.
"lost connection" occurs when you disconnect the device or quit the simulator prematurely.
(example: click run and then stop it almost immediately)
"Simulator in use" occurs when you're already running, say, ABC xcode project in the iOS simulator and you want to run another Xcode project, say, XYZ project in the iOS simulator simultaneously.
Go to ABC project, stop it and then run XYZ project.
Related
Sigh. It started around 6 months ago and happened from time to time. For last 2-3 days I completely lost opportunity to debug on device. Whenever I'm trying it, I get infinite stuck on "Performing install actions" step. Sometimes, it ends with "unknown error occurred", sometimes with "Could not launch", sometimes it just stuck without any error.
I know the problem is in my specific iPhone, because it doesn't happen with another iPhones and it does happen with my iPhone on different machines.
What I've already tried and it sometimes helped me, but now it doesn't help at all:
restart XCode
restart Macbook
clean build folder/derived data (yeah, I'm an experienced iOS developer, so I've tried that)
unpair device and pair it once again (I should say, that previously I thought that was a silver bullet)
reinstall XCode
reinstall iOS Device Support
turn on/turn off Wi-Fi/Bluetooth
reboot iPhone
reset iPhone
reinstall provisioning profiles
pray
unpair Apple Watch
turn off Apple Watch
My setup: XCode 14.2 (tried different versions too, for example, XCode 13), iPhone 11 (iOS 16.2, started when I was on iOS 15)
Once again, I don't have any problems when I debug on Simulator on different device.
Any recommendations would be really appreciated, cause I'm already starting to lose my mind.
Time to time, my Xcode starts freezing. Every few minutes for 5-30 seconds. I need to Force Quit as "application is not responding".
QUESTION
Is there any other way to fix this apart from removing connected devices as described here:
Xcode 12.3 keeps freezing ?
It says that even disabling "Connect via network" can help. But is there any other way? Because lets be honest - it is super convenient to test your app on real device without cables :)
Other things I have tried:
restarting Xcode
restarting MacBook
deleting everything in derived data folder
I installed xcode 6 and was working on my app on simulator.
Now i have added push support it was time to start working on the device.
The problem is i cant get it to work. The device sits there and does nothing. Xcode says the app is running on the device but nothing happens.
When i click on "Running app on device" i can see its in the status of
"Validating Application "
The whole time...
I tried the solutions on SO but they are all for xcode 4 and some points about architechture and info.plist.
Checked both nothing wrong with it (testing on 5s, 7.1).
Tested other apps (got from github and so on), same problem cant run on device.
I think it has to do with xcode because all projects (big and small,old and new) don't work. I also tried on my ipad same problem.
So its not related to project or device.
Anyone has a solution ?
Removed xcode and installed it again. Works.
But to be honest since Xcode 4 this is the worst Xcode, allot of hangs and crashes. Need to force quit at least 6 times a day.
This question already has answers here:
Xcode 4.3.2, issue with running on simulator
(6 answers)
Closed 9 years ago.
Once in every 10-20 runs I experience a hanging Xcode when trying to start a new App run in the simulator. The App won't start.
I can quit the simulator, but Xcode will simply ignore quits.
The only solution so far is to kill and restart Xcode. Fortunately that seems to work without side effects.
(xcode 4.3 on Lion, 8GB mac mini, 5.1 iOS)
Edit: I filed a bug report with Apple.
Edit June 2012: it's still a problem in Xcode 4.3.2 (4E2002)
Edit October 2012: with Xcode 4.5 this issue seems to have gone away. I do seem to notice that every run on the simulator now has a pause of a few seconds before starting the application. Perhaps the issue was fixed by introducing a longer wait somewhere. (There is no such thing as a free lunch.)
Found a workaround that saves you killing Xcode when this happens: if a hang occurs when you are running the iPhone simulator switch to iPad simulator, or vice versa. You will get the message that the simulator is already in use, but ignore that. Then switch back to the device simulator that caused your trouble in the first place, a new run will work!
Perhaps Xcode has trouble contacting the running process in the simulator, above workaround helps.
i have found that the hang is harder than all that. can't even get in to switch simulators. Quit Xcode won't work because it doesn't want to stop all tasks. tried killing a zombied clang task, but that didn't work. didn't see either gdb or lldb tasks, though i know clang is associated with lldb.
so ... no answer except force quit xcode or kill -9 xcode processes in terminal.
update … try this https://stackoverflow.com/a/10277189/774691 (which is also referred to by this https://stackoverflow.com/a/13400190/774691 ) ! it's impossible to believe it works, but i use this 2-3 times a day, and i laugh and i laugh and i laugh. it's insane, but it works. vote it up. the guy who came up with that answer needs some serious upvotes!
Use GDB instead of LLDB (default) for debugging. There are some bugs in LLDB right now affecting launch hangs, false memory address readouts, uncaught breakpoints resulting in EXC_BREAKPOINT kills).
Just press command+b and quickly press command+r and it will run.
I'm seeing this a lot. Every time I start XCode, I get one run and then after that if I try to run again (after Command-Q in the simulator) I have to Force Quit XCode if I want to run again. I can see running simulator processes with ps -ef, but even if I kill them (and they die), XCode still believes there's a simulator running.
I'm having some success with performing iOS Simulator > Reset Content and Settings... before I quit the simulator. I'm also having some success with Stopping the simulator (from XCode) as soon as I've finished testing it.
It seems that stopping the App currently running in the simulator before new compiling-run solve the problem : command+. and command+r
Moutain Lion (10.8) + Xcode Version 4.4.1 (4F1003)
I reported it to apple
BUG REPORT
12872744
https://devforums.apple.com/thread/175685
You can also restart the Simulator and restart the app manually and this wakes XCode up and it leaves the stuck DEBUG mode and goes back to STOP mode.
You have to start the run in Xcode again but at least its stopped hanging.
I'm being annoyed by a warning dialog XCode 4 shows everytime I want to run the App I'm developing... it says:
"The Service is invalid.
Please check your setup and try again.
(0xE8000022)."
See image attached:
Sometimes the App will load on the iPhone 4, sometimes it won't. It's a huge waste of time! Please if anyone knows how to help it let me know.
I though it was because I enabled iOS Device Discovery to Support Wirelessly Connected Devices. When I saw it was an useless feature I disabled it, but still have the same dialog showing up.
Well, I decided to invest some time on the issue... and I think I have an answer to it, restarting XCode 4 or swapping between versions of XCode 4 didn't helped it.
I was getting the warning dialog with two different iPhones, both iPhone 4, running iOS 5.0.1 (Build 9A405). Then, I tested with an iPad 2 running iOS 5.0.1 (Build 9A405) and the dialog did stopped popping out, so I restarted the iPhone 4s and the problem is not happening anymore, I can build and run smoothly again.
Just as I suspected, the issue must be some background process listening on the device that XCode 4 needs to talk with. This process dies at some point during development or during normal usage of the phone and does not restarts by itself, you need to turn off the device and turn it on again.