iOS Xcode 10 Simulator Error (OSStatus error -600) - ios

Since upgrading to Mojave I have been getting the following error when I try to run the simulator.
The simulator runs when you acknowledge the error, but the app is not uploaded from Xcode to the simulator.
If I connect an actual device I can build and run the app no problem. I have tried this with a few different apps so it doesn't appear to be app specific.
The log in the Mac console shows:
default 11:13:49.003902 +1000 Xcode iOSSimulator: Could not launch simulator: -600
default 11:13:49.004097 +1000 Xcode iOSSimulator: 📱<DVTiPhoneSimulator (0x7fd0b309d380), iPhone X, unknown class, 12.2 (16E226), FAA893B1-BCCB-402E-87DD-24DC7710B4A5> could not launch simulator for com.apple.platform.iphonesimulator
What I have tried:
Turn it off and on again. Xcode, simulator and laptop.
Cleaned the build folder and deleted derived data.
None of the solutions from this stack overflow question worked.
I also tried the solution from this question (albeit it was a different error) but it doesn't work either.
I looked up OSStatus error -600 on google - it is procNotFound, which didn't really help much. It means no eligible process with specified descriptor
Any suggestions would be appreciated!

Restart the computer (not just Xcode). Then go into Library / Developer / CoreSimulator / Devices and throw everything in the trash. Then launch Xcode, go into Devices and Simulators, and delete all simulators from the Simulators pane. Now create one simulator in the Simulators pane. You will be able to build and run on it.
EDIT The OP reports that even this was insufficient to clean out the problematic dead simulators. It was also necessary to say xcrun simctl delete unavailable in the Terminal.

Related

Xcode 12: Failed to start remote service "com.apple.debugserver" on iOS device

I updated my Xcode to Version 12.4 (12D4e) and after that I am unable to run my app on my device
iPhone X iOS 14.4.2.
Its alway show this Error
When I check my device connected status, Its show as connected
Action I applied
Clear DerivedData folder.
Unpair device and connected again.
Drank 20+ coffees.
I was able to fix the Xcode 12 app install/deployment issue described above:
Failed to start remote service "com.apple.debugserver" on device.
Domain: com.apple.dtdevicekit
Code: 811
Recovery Suggestion: Please check your connection to your device.
User Info: {
DVTRadarComponentKey = 261622;
}
...
by doing the following steps:
Quiting Xcode.
Deleting Xcode cache directory (ie, rm -rf ~/Library/Caches/com.apple.dt.Xcode).
Rebooting the offending iOS device.
Connecting the iOS device to Xcode by cable (instead of wireless network connection).
Starting Xcode again.
By the way, I've a setup very close to yours:
Xcode 12.5 (build 12E262) and
iOS 14.5.1 (on a iPhone XĘ€ device)
1st solution
I fixed this by:
Closing Xcode
Deleting the current iOS version in my folder that's related to my device.
~/Library/Developer/Xcode/iOS DeviceSupport
Restarting Xcode. Wait a little bit for it to refresh and copy cache files in my case then Run.
Based on Can I delete data from the iOS DeviceSupport directory? it's ok to delete the iOS DeviceSupport folder.
I noticed when I did it and reconnected my device it re-downloaded the iOS device Support files.
If the support files don't download and the cache files are not copying, try restarting your computer as well.
I started also getting this error:
Errors were encountered while preparing your device for development.
Please check the Devices and Simulators Window.
Restart your phone and reconnect it to the compter if this happens. Then you should get a message in Xcode saying:
Preparing your phone for development.
2nd solution
Unpair the device in Xcode.
Clean the project.
Unplug and then restart iPhone.
Restart Xcode.
3rd solution
If none of the above worked, I was able to run the program by re-enabling Connect via Network.
After doing this now I can run project via USB.
4th solution
I submitted this bug to Apple. Apple also suggests this can be caused by faulty data cords. Maybe try another cord as well.
Unplug the iPhone, Turn it off and again turn it on and reconnect. It worked for me. Sometimes iPhone Debug connection network server clogs up. When you restart iPhone it reinitiate the connection.
This issue keeps happening and it seems like there's a myriad of reasons that may cause it, and so there are a lot of solutions that fixed it for people. Someone even suggested that none of the fixes actually work, and it's only the fact that time passes as we try different solutions that actually fixes it. Nevertheless, I will share what worked for me and what I found so far.
a. In the past, the issue was most often caused for me by using an older version of Xcode with a newer iOS. Apple doesn't always release the version of Xcode that supports the latest iOS at the same time, and this issue sometimes happens as a result of that. There are people who suggest right clicking the Xcode App > Show Package Contents > Developer > Platforms > iPhoneOS.platform > Device Support and renaming the folder for the latest supported version to the one running on the phone (for example renaming 16.0 to 16.1). I've had better luck with using the Beta of Xcode if it's not out yet (in this case using 14.1 RC2 instead of 14.0.1).
b. Incrementing the build number and setting a Display Name. This seems to have fixed the issue after nothing else worked. Again, this seems very random, so it could be unrelated, but it did fix it in my case after nothing else suggested on all the threads about this worked.
c. Deleting the profile in Settings > General > VPN & Device Management
Other suggestions I've seen across threads:
Restarting the device (seems to be the most popular solution)
Unpairing the device
Checking device status under Window > Devices and Simulators. There may sometimes be some further info about what is going on here, the device may still be preparing for development or downloading symbols or whatever
Using another cable. This never worked for me, after trying with 3 cables, 2 from Apple and one 3rd party, but others reported it worked
Deleting Derived Data (use Dev Cleaner or rm -rf ~/Library/Developer/Xcode/DerivedData
Uninstalling the app manually from the device
Resetting Network Settings
Force restarting the iPhone
Apple really needs better errors and less ridiculous bugs like this.
I had to update Xcode to fix this issue because my version of Xcode did not support my up-to-date iOS version.
I've had the same issue and also had the problem that I wasn't able to connect my device by cable (it popped on and of), so I had to use wifi connection on Xcode.
I was able to see the icon of the app created by Xcode on my iOS device, but whenever I tried to start it, it won't do so giving the "Untrusted Developer" error message.
I fixed this by going to:
Settings > General > VPN & Device Management > Developer App
Here you have to chose the App and consent to trusting it.
I reset the iPhone network settings and it works!
I have the same problem, my solution is update my ios version(15.1 to 15.2 beta)
I tried all the resolvent, nothing worked
restart iOS, Xcode, macOS
clear DeviceSupport, Caches
unpair iphone, change lighting cable
Then I find my ios version(15.1) does not exist in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport.
I try to fix it, but failed.
Finally, I can only update my iOS device to 15.2 beta version, It solved! Xcode is update to beta version too.
My devices original version:
iOS 15.1
Xcode 13.1 (13A1030d)
I'm on Xcode 13.3 and I fixed this by unplugging and plugging the cable between my MacBook Air and my mini iPad 3.
I fixed it by,
Following the steps : Window > Device and Simulator > Select your device and Right Click on it > Unpair after that re-connect your iOS Device then boom... Clean builds and run the app, it will work for you.
Upon solutions aren't working for me. Restart my iPhone then all well done.

Xcode 12. Unable to lookup with an unavailable runtime

Unable to boot a simulator in Xcode 12.0 beta.
The simulator is not running only if chosen SwiftUI Project. Automatic preview is not working as well.
Simulator is running on iOS 14.0.
Any suggestions?
I had the same issue and I just found a solution.
TL;DR: Quit all running sim and try again, if it still doesn't work, delete the sim and re-add it.
Actually the detailed message is misleading (which you see by clicking "Details"), it shows:
Details
Unable to lookup with an unavailable runtime. Domain:
com.apple.CoreSimulator.SimError Code: 405
-- The iOS 14.0 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime
path not found Recovery Suggestion: Download the iOS 14.0 simulator
runtime from the Components section in Xcode's Preferences.
--
System Information
macOS Version 10.15.5 (Build 19F101) Xcode 12.0 (17177)
At least for me that is what the detailed message says... It suggests that I do not have iOS 14 simulator installed.
Even more confusing was that when I opened Xcode Settings and clicked to Components -> Simulator I do not see iOS 14 in the list:
And looking at the existing simulator list next to my Schema it does not explicitly say that the OS of these devices are running iOS 14.
What fixed it for me was to:
Make sure to quit any potentially running simulators. This step might be enough? I didn't actually try, I just went straight a head to step 2...
Delete a simulator using the "Devices and Simulator Window" - which you can open with shortcut CMD+SHIFT+2 - by right clicking the sim and select "Delete". I used iPhone SE (2nd generation)... After deleting it, then
Re-add it, by clicking the plus button in the bottom left corner of the same "Devices and Simulator Window", chose the wanted devices, probably the same you just deleted, and make sure "OS version" is set to 14.
Try running again and it works!
I have MacOs Catalina (10.15.7). Quited Simulator and restarted it again then tried to add new device. It worked.
I tried many solutions, but only this one worked.
sudo xcrun simctl shutdown all && sudo xcrun simctl erase all
link

Memory profiling doesn't work with Xcode, just displays "No Selection"

I am using the latest version of Xcode 9 and macOS 10.13.
When I try to make a memory graph from the current state of my application, it shows an empty screen that says No Selection.
I also tried to profile and work with Instruments, but it did not allow me to run due to a permission error.
Target failed to run.
Permission to debug [app name] was denied.
I am aware of these threads and tried the suggestions available in them, but they didn't seem to work:
Reddit - Has instruments stopped working for you in Xcode 9 due to a permission denied error? Is there a workaround for this?
Apple Developer Forums - Xcode 9 - Instruments permission denied
Stack Overflow - Why do I get instruments - “Target failed to run”?
Stack Overflow - Can't launch my app in Instruments: At least one target failed to launch
Things that I tried:
Restarting Xcode
Emptying the Derived Data folder
Cleaning the project
Cleaning the Build folder
Modifying the scheme's application environment to Debug instead of Release
Manually managing provisioning profiles and selecting Development profiles for Debug and Release
Trying simulators with different OS versions (iOS 11, iOS 10)
Looks like it's a specific issue with Xcode 9.
Are there any workarounds for this issue?
I tried building the application on a physical device and it worked, hovever, the memory graph did not show my Swift classes (for e.g., my controllers were simply not there). Allocation observing worked fine with Instruments, nonetheless.
It seems like this is an issue caused by the simulator.
In My Case I was Using Xcode 9. When I have checked to Xcode-> Preferences->Locations->Command Line Tools = Xcode 8.3.3 so I just Changed from Xcode 8.3.3 to Xcode 9.0 and It starts working.
In my case the Build Configuration for Profiling was set to Release instead of Debug in the Scheme. After changing it, I could just profile in the Simulator.
Hope this helps.

xcode 7.3.1 Invalid Device State

I upgraded to OS X 10.11.5 and Xcode 7.3.1 a few days ago and all seemed well. Then today after adding my new iPhone 6s Plus to the device IDs in my developer account and having Xcode do an automatic 'fix issue' to update the provisioning profile when trying to run my apps on my new device, I am now getting Invalid Device State errors on all my simulators in all my apps. Running the apps on my new device works fine, but all the simulators give me the error. I tried the solutions found here iOS Simulator: Invalid device state and here Invalid Device State - Xcode/iOS Simulator error but neither have resolved my issue. When I run xcrun simctl list all the devices show a status of Shutdown, which I assume is what the status should be. I then run xcrun simctl erase all and I get no errors. I then did a clean build and a clean build folder, and restarted my Mac, and still the error occurs after doing all these steps. This is really frustrating, and I hope someone can point me in the right direction. I always get nervous when it comes to upgrading OS X and/or Xcode because more often than not something breaks in my apps, or something like this occurs.
I tried everything possible to get this to work for two days. Finally I re-installed Xcode and that did it. In case someone runs into this issue and the regular solutions do not work, don't waste your time trying to figure it out, just re-install Xcode and save yourself some time.
just quit xcode and simulator. it will resolve the problem.

iOS Simulator: Invalid device state

I just downloaded Xcode 6.4 from App Store and started to create a hello world app to learn swift but I get the error saying "Invalid Device State".
I googled a lot and tried the below things:
Restarted Mac and entered xcode and started project (as mentioned in a stack overflow thread)
I created a new iOS app with another layout but showed the same error again if I ran that project.
I deleted all projects and re-installed Xcode again. Started a new project and ran it but still getting the same error.
I am running Yosemite 10.10.1 and the Xcode version is 6.4.
Can anyone help me ?
Devices can get stuck in the creating state if errors occur in older versions of Xcode. This was fixed at some point in Xcode 7, but I'm not sure if the fix made it back into an Xcode 6.x release.
From Terminal.app, please run 'xcrun simctl list'. Locate the UDID of the device that you are attempting to boot. If it is stuck in the 'Creating' state, you can try recreating it by running 'xcrun simctl erase '.
If it is stuck in a different state, please update your question appropriately to indicate which state the device is stuck in.
On a side note, I suggest you update your OS. There have been a lot of quality fixes since 10.10.1. 10.10.5 just came out.
Try to switch from your original simulator to new one (for example from iphone 6 to 6plus) and then switch back to original one (iphone 6) and it should be ok

Resources