Xcrun: error: unable to find utility instruments, not a developer tool or in path

455

New! Save questions or answers and organize your favorite content.
Learn more.

I am following the tutorial on the official React Native website.

Using the following to build my project:

react-native run-ios

I get the error:

Found Xcode project TestProject.xcodeproj
xcrun: error: unable to find utility "instruments", not a developer   
tool or in PATH

Command failed: xcrun instruments -s
xcrun: error: unable to find utility "instruments", not a developer 
tool or in PATH

Although, when I run the app from the .xcodeproj, everything works fine.

Any suggestions?

Xcrun: error: unable to find utility instruments, not a developer tool or in path

Alireza

96k26 gold badges265 silver badges167 bronze badges

asked Sep 29, 2016 at 19:35

1

Check out this link (Running react-native run-ios occurs an error?). It appears to be a problem with the location of Command line tools.

In Xcode, select Xcode menu, then Preferences, then Locations tab. Select your Xcode version from the dropdown and exit Xcode.

Xcrun: error: unable to find utility instruments, not a developer tool or in path

Xcrun: error: unable to find utility instruments, not a developer tool or in path

answered Sep 29, 2016 at 20:12

Xcrun: error: unable to find utility instruments, not a developer tool or in path

leo7rleo7r

10.4k1 gold badge21 silver badges26 bronze badges

7

You may need to install or set the location of the Xcode Command Line Tools.

Via command line

If you have Xcode downloaded you can run the following to set the path:

sudo xcode-select -s /Applications/Xcode.app

If the command line tools haven't been installed yet, you may need to run this first:

xcode-select --install

You may need to accept the Xcode license before installing command line tools:

sudo xcodebuild -license accept 

Via Xcode

Or adjust the Command Line Tools setting via Xcode (Xcode > Preferences > Locations):

Xcrun: error: unable to find utility instruments, not a developer tool or in path

answered Dec 7, 2016 at 16:13

odlpodlp

4,8952 gold badges33 silver badges43 bronze badges

1

An update for anybody (like me) who's run into this in Xcode 13 -- the instruments command has been removed.

Updating to the latest version of react-native in your package.json file will no longer try to use the instruments command.

answered Dec 6, 2021 at 17:42

user2066349user2066349

2,2511 gold badge13 silver badges7 bronze badges

2

By default, after installing Xcode command-line not selected, so open Xcode and go to Preferences >> Locations and set Command Line Tools...

This worked for me in MAC High Sierra, Xcode Version 9.3:

Xcrun: error: unable to find utility instruments, not a developer tool or in path

Press i to open iOS emulator...

Xcrun: error: unable to find utility instruments, not a developer tool or in path

And You can see a cool new iPhone simulator like below image:

Xcrun: error: unable to find utility instruments, not a developer tool or in path

answered May 27, 2018 at 5:07

Xcrun: error: unable to find utility instruments, not a developer tool or in path

AlirezaAlireza

96k26 gold badges265 silver badges167 bronze badges

2

In my case the problem was that Xcode was not installed.

answered Sep 28, 2017 at 14:26

Xcrun: error: unable to find utility instruments, not a developer tool or in path

HeisenbergHeisenberg

5,4042 gold badges29 silver badges41 bronze badges

3

I had to accept the XCode license after my first install before I could run it. You can run the following to get the license prompt via command line. You have to type agree and confirm as well.

sudo xcodebuild -license

answered Feb 12, 2017 at 18:39

Xcrun: error: unable to find utility instruments, not a developer tool or in path

Mario TackeMario Tacke

5,2703 gold badges28 silver badges48 bronze badges

1

Problem is your Xcode version is not set on Command Line Tools, to solve this problem open Xcode>Menu>preferences> location> here for Command Line tools select your Xcode version, that's it.

Xcrun: error: unable to find utility instruments, not a developer tool or in path

answered Oct 17, 2018 at 6:45

Xcrun: error: unable to find utility instruments, not a developer tool or in path

For those like me who come to this page with this problem after updating Xcode but don't have an issue with the location setting, restarting my computer did the trick.

answered Dec 8, 2017 at 1:14

Xcrun: error: unable to find utility instruments, not a developer tool or in path

For me, it turns out that there was an iOS system update pending asking to restart the computer. Restart and let the update finish solved my problem.

answered Apr 4, 2018 at 19:24

BinBin

3,4258 gold badges32 silver badges56 bronze badges

In my case the SDKROOT environment variable was wrong, which referred to an old version of iPhoneOSxx.x.sdk. (Perhaps this would have automatically resolved itself after a reboot?)

You can check by running echo $SDKROOT and verifying that it's a valid path.

I fixed it by updating in .bash_profile:

export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk

answered Jan 25, 2018 at 21:59

pythonjsgeopythonjsgeo

4,8122 gold badges30 silver badges45 bronze badges

None of these solutions worked for me. These two similar problems offer temporary solutions that worked, it seems the simulator process isn't being shutdown correctly:

Killing Simulator Processes

From https://stackoverflow.com/a/52533391/11279823

  1. Quit the simulator & Xcode.
  2. Opened Activity monitor, selected cpu option and search for sim, killing all the process shown as result.
  3. Then fired up the terminal and run sudo xcrun simctl erase all. It will delete all content of all simulators. By content if you logged in somewhere password will be gone, all developer apps installed in that simulator will be gone.

Opening Simulator before starting the package

From https://stackoverflow.com/a/55374768/11279823

open -a Simulator; npm start

Hopefully a permanent solution is found.

answered Mar 29, 2019 at 23:45

  1. Go to Xcode Preferences

  2. Locate the location tab

  3. Set the Xcode version in Given Command Line Tools

Now, it ll successfully work.

Zorayr

22.6k7 gold badges128 silver badges121 bronze badges

answered Apr 3, 2019 at 7:21

Xcrun: error: unable to find utility instruments, not a developer tool or in path

If the previous answers didn't help you, you're probably dealing with an outdated react-native version. If you want to run your app on device without upgrading React-Native, you'll have to run the app directly from Xcode instead of doing it in the CLI. So open the .xcworkspace, select your device on the right-hand dropdown and press the "Run" icon.

Xcode screenshot

answered Jun 15 at 10:29

In Mac: After all, you are getting this issue, there may be a chance of missing the following in System Preferences -> Network -> Ethernet -> Select Advanced -> Proxies

add the following line,

*.local,localhost

answered May 16, 2019 at 8:30

This is how I got the solution,

> rm -rf ~/Library/Developer/Xcode/DerivedData
> sudo rm -rf /Library/Developer/CommandLineTools
> xcode-select --install
> sudo xcodebuild -license accept

Xcode > Preferences > Location > Command Line Tools choose.

answered Apr 25 at 19:00

Xcrun: error: unable to find utility instruments, not a developer tool or in path

simply go to Xcode

click on Xcode from the top left menu Xcode->preferences-> location-> click comman line option and set Xcode version.

answered May 17 at 6:29

Xcrun: error: unable to find utility instruments, not a developer tool or in path

For any such problem:

  1. Go to .expo folder
  2. Find apk-cache
  3. Remove that folder

and you are done..

Hope it helps?

Xcrun: error: unable to find utility instruments, not a developer tool or in path

CKE

1,44519 gold badges19 silver badges28 bronze badges

answered Oct 4, 2019 at 4:26

How install react native NPM?

You can follow our NodeJS Environment Setup tutorial to install NodeJS..
Step 1: Install create-react-native-app. ... .
Step 2: Create project. ... .
Step 3: NodeJS Python Jdk8. ... .
Step 4: Install React Native CLI. ... .
Step 5: Start react native. ... .
Step 6: Eject the project. ... .
Step 7: Installing Android Studio. ... .
Step 8: Configuring AVD Manager..

How do you run on iOS device react native?

Plug in your device via USB​ Navigate to the ios folder in your project, then open the .xcodeproj file, or if you are using CocoaPods open .xcworkspace , within it using Xcode. If this is your first time running an app on your iOS device, you may need to register your device for development.

What is the latest version of react native?

Announcing React Native 0.70..
Hermes as the Default..
Announcing React Native 0.69..
Helping migrate React Native libraries to the New Architecture..
React Native Accessibility - GAAD 2022 Update..
Announcing React Native 0.68..
An update on the New Architecture Rollout..
React Native - H2 2021 Recap..