Xcode 4 Error: Error Starting Executable

XcodeIosLaunch

Xcode Problem Overview


I ran into problem with testing my app on iOS and Xcode when I am uploading it to my actual devices (iphone and iPad), and I'm wondering if someone knows the issue and can help me out:

Normally when I build my app on my devices, the app is installed and launched on my devices. But as I am preparing for submitting my first app I was testing around and changing the Bundle Identifier, App ID, and Development Provisions (so the issue may have something to do with it), and now, when I try to build my app on my devices, although it's installed on my devices fine, Xcode will not launch the app anymore. Instead, I got this error message:

> Error Starting Executable. >Error launching remote program: No such file > or directory.

Does anyone know what the issue is? And What is this derived data folder about?

Much thanks!

Xcode Solutions


Solution 1 - Xcode

I have also faced that problem. I have closed, restarted Xcode; deleted the application from device and reinstalled it again, then the problem has gone.

Solution 2 - Xcode

Running App from a Clean Slate

For me the problem did not resolve until I did the following in this order:

  1. Delete the app from the device (Do this before trying to debug again)
  2. Quit XCode (Don't just close the project)
  3. Delete the app build folder (example path: /Users/myusername/Library/Developer/Xcode/DerivedData/MyProject-fhkaamuyvqhubaezinqbmxbnaufd/)
  4. Restart XCode
  5. Finally -- Try debugging again on the iOS device

The app build folder of step 3 refers to your app's build folder that is a child of "DerivedData". To find this you can reveal your app in finder, then backtrack until you get to "DerivedData" folder and delete the folder above that like "MyApp-crazylongweirdletters". Without this step (3), I could not debug, so this is a critical step and you must quit XCode before you do this step.

For some it appears simply restarting XCode does the trick, but not for me.

I only post this answer because the earlier answers did NOT work for me. Hopefully others banging their heads will find this and get a sigh of relief. :)

Notes:

  • The issue started happening for me when I modified the bundle id of the app.
  • My code signing is and was correct. My provisioning profile was the "Team Provisioning Profile" which should work for any app id (default for "iPhone Developer" automatic profile selector).
  • I was doing a DEBUG build (not release / distribution).

Solution 3 - Xcode

You cant debug (start from Xcode) an application signed with a distribution profile if I remember well... And then you get such messages, gdb failling to attach to process.

Solution 4 - Xcode

I finally found my error!

I was playing around with my info.plist file, and I changed the Executable Name and Bundle and Bundle Display name! As soon as I changed those back to the Defaults (EXECUTABLE_NAME, PRODUCT_NAME, PRODUCT_NAME respectively) it worked perfectly.

Solution 5 - Xcode

Delete the app from the device (tap-and-hold then delete) and try again.

Solution 6 - Xcode

For me, none of those worked. Same error, but different solution.

My problem was cause by me accidently changing the "Deployment Target" (ios version) to a version higher than what was on the phone I tried to run the code on.

The fix was simple - drop the deployment target to below or equal to the ios software version on my phone :)

Solution 7 - Xcode

I got the same error by not having my code signing correct.

Go to your project > Targets > Build Settings > Check code signing for debug state.

Solution 8 - Xcode

I stumbled upon this as a solution to another issue whch was a warning when trying to build an app on a new 4.3.5 device.

If i set the profile to distribution I do not get a warning message when building the app, but the debugger will attach to the device.

If i set the code signing to the distribution profile, i get no warnings in the build process, but the debugger will not attach. So the answer above about being signing based seems to be correct. This might also only be an issue on newer 4.3.5 devices with xcode

Solution 9 - Xcode

Product -> Clean in the menubar

Solution 10 - Xcode

I have the same problem. I solved it by changing the project's directory name and then launching the app again.

Solution 11 - Xcode

This error some times happen due to incomplete "Restore" or "Sync" process of your device which keeps the .app files locked up.

What I did I had to jailbreak my device to go find the app under /User/Applications/XXXXX-XXXX-XXX/ and phisically delete the .app

For one of the apps it worked and for other one I realized it just does not run GDB automatically so the error message is totally misleading, so I set the GDB to manual and it worked and did not give me that error, but of course I have to run the app manually for the debug session to start.

It also may have required some other stuff that I did before like checking the provision profile, but this was the last step that made it work.

Before this I tried all the solutions did not work for me, and obviously simply deleting the app by holding down your finger on the screen did not work, as it removed the icon but all the files were still there. ( Since it was a development app not a downloaded App Store app )

Solution 12 - Xcode

had same problem, quit the XCode...delete app from device...run the program again.. i solved that way..one of my friends had to restart the device.

Solution 13 - Xcode

I had this problem on a recently restored device where my in-development apps had not been reinstalled—they were showing up on Springboard as "Waiting" to be downloaded from the App Store. Deleting the app from Springboard fixed the problem.

Solution 14 - Xcode

I've faced this issue since yesterday on two different devices, both iOS 4.x. Deleting the DerivedData folder, deleting the app, restarting the Xcode, and cleaning the code did NOT work. Repeating all the steps, in addition to rebooting the device fixed it for me.

Solution 15 - Xcode

Here I am posting an update to the issue. Might be helpful for someone with the same problem. I have Xcode 4.4 and launched it on a device with iOS 5.0 . If Xcode doesnt have the 5.0 simulators

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJusmanXView Question on Stackoverflow
Solution 1 - XcodecrazywoodView Answer on Stackoverflow
Solution 2 - XcodeSamView Answer on Stackoverflow
Solution 3 - XcodeVincent GuerciView Answer on Stackoverflow
Solution 4 - XcodesridvijayView Answer on Stackoverflow
Solution 5 - XcodeAsem H.View Answer on Stackoverflow
Solution 6 - XcodeJarrodView Answer on Stackoverflow
Solution 7 - XcodeRyanJMView Answer on Stackoverflow
Solution 8 - XcodebruceView Answer on Stackoverflow
Solution 9 - XcodeAlex ZielenskiView Answer on Stackoverflow
Solution 10 - XcodeEmadView Answer on Stackoverflow
Solution 11 - XcodeRhm AkbariView Answer on Stackoverflow
Solution 12 - XcodeEarlySunView Answer on Stackoverflow
Solution 13 - XcodeBecca Royal-GordonView Answer on Stackoverflow
Solution 14 - XcodeNeekuView Answer on Stackoverflow
Solution 15 - XcodeNareshkumarView Answer on Stackoverflow