Unable to boot device because it cannot be located on disk
Asked Answered
C

6

136

The device's data is no longer present at /Users/[user name]/Library/Developer/CoreSimulator/Devices/D651BCC7-29FD-4B91-82F6-E255E856EA2F/data.

I uninstalled xcode 9 and installed xcode 9.1, but when run project, following message was shown:

Unable to boot device because it cannot be located on disk. The device's data is no longer present at /Users/[user name]/Library/Developer/CoreSimulator/Devices/D651BCC7-29FD-4B91-82F6-E255E856EA2F/data.

I found "Developer" folder, but cannot find "CoreSimulator" folder.

Cavefish answered 23/11, 2017 at 0:24 Comment(0)
D
573

I was able to resolve the issue running xcrun simctl erase all in Terminal.

Darb answered 29/12, 2017 at 10:30 Comment(8)
Accept this answer.Unrobe
xcrun: error: unable to find utility "simctl", not a developer tool or in PATHSheya
you need to first run -> sudo killall -9 com.apple.CoreSimulator.CoreSimulatorServiceHousecarl
Before run xcrun simctl erase all in Terminal, Quit Xcode.app, Simulator.app. Otherwise, run script will fail.Catalyze
God bless your soul :-)Staphyloplasty
@Milan Jansen ... save everyone and accept this answer :)Jeanajeanbaptiste
Oh man, that was scary! Yes, this answer needs to be accepted.Piquet
Work like a charm in 2023Abutting
R
61

Quit Xcode.app, Simulator.app, etc

Try the following commands in Terminal

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService    
rm -rf ~/Library/*/CoreSimulator
Ragland answered 29/11, 2017 at 13:32 Comment(6)
still same error message, how do I add the simulators back?Ship
I needed to run the killall command before I could use xcrun simctl erase all from aboveHod
YESSSSSSSSSS, finally! Thank you so much!Tamis
Thanks a lot!! Ran all the above and then ran xcrun simctl erase all and it started to work.Amylene
I tried the above and received errors in the terminal related to permissions even though I rand with sudo. I made sure I quite both Xcode and the simulator. I did a reboot and then it worked.Friendship
I think the cleanest way to stop a service is with launchctl, i.e. "launchctl stop com.apple.CoreSimulator.CoreSimulatorService"Beguin
D
41

Go to Xcode menu Window-> Devices and Simulators -> Simulators tab, right-click the bad simulator and choose Delete from the menu list, then add it back from the left bottom entry again, it works!

enter image description here

Debbydebee answered 8/5, 2019 at 2:9 Comment(2)
This worked for me thanksMohandis
This fixed it for me..Robinette
K
10

Click on the simulators dropdown at the top of Xcode, and select Download Simulators....

Simulators Dropdown

From here, you can select which versions you want to download and for what devices.

Kittiekittiwake answered 31/1, 2018 at 0:32 Comment(1)
i dont' have a Download optionFarra
H
8

Just run this command in terminal:

xcrun simctl shutdown all && xcrun simctl erase all
Handle answered 24/1, 2022 at 9:35 Comment(0)
E
0

I had the same issue.

It worked for me by erasing the device which your Mac does not found.

xcrun simctl erase AKADKJ-

Here is also a link where a found a good explanation.

https://medium.com/xcblog/simctl-control-ios-simulators-from-command-line-78b9006a20dc

Exhibitionist answered 9/3, 2022 at 22:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.