[xcode] iPhone Debugging: How to resolve 'failed to get the task for process'?

I have just added a provisioning profile to XCode (needed to support notifications and in app purchase), setup as needed the build configuration for ad hoc distribution, and tried to run the app on the device (I have done this several times in the past, without any problem).

The app is installed, but it does not start. On the console, I see the following message:

Error launching remote program: failed to get the task for process 82.
Error launching remote program: failed to get the task for process 82.
The program being debugged is not being run.
The program being debugged is not being run.

However, if I start the application on the device manually, it works as expected. I have recently installed the latest XCode 3.2 for Snow Leopard. Is this a known bug of this version of XCode or am I doing something wrong?

EDIT: It works fine with release distribution using the development provisioning profile. I have checked again the ad hoc provisioning profile to make sure it includes the device I am using.

This question is related to xcode provisioning adhoc

The answer is


Yes , Provisioning profiles which are for distribution purpose, i.e. Distrutions provisioning profiles do not support debugging and gives this error. Simply create and use debug provisioning profile (take care of this when creating provisioning profile from developer.apple.com account).


It might be that you have an expired development profile on your phone.

My development provisioning profile expired several days ago and I had to renew it. I installed the new profile on my phone and came up with the same error message when I tried to run my app. When I looked at the profile settings on my phone I noticed the expired profile and removed it. That cleared the error for me.


Open Entitlements.plist and set the boolean value get-task-allow to YES - the debugger can attach now!


This took me a while to figure out.

If you are using a distribution / ad hoc/ profile you cannot test it through xcode. You will get the error: The program being debugged is not being run.

You can build the app, go to the products folder in your app in xcode, click on the file with your project name and choose reveal in finder. You can drag this app into into iTunes and sync and that point you can test your app on your device.


I just changed my bundleIdentifier name, that seemed to do the trick.


I've patched my project with JailCoder http://jailcoder.com/ and problem resolved. Just download It and drag your xcode project to It.


I received this error when I tried to launch app from Xcode as I figured I had selected distribution profile only. Build was successful so I created .ipa file. I used testflightapp.com to run the app. You can use iTunes as well.


Almost 2hrs on this issue! And finally I solved it by replacing the

iPhone Developer

to

iPhone Developer: My Dev Account Name

for Debug's CODE_SIGN_IDENTITY:

  1. Select Project Target
  2. Build Settings
  3. Search by "code sign"
  4. Modify CODE_SIGN_IDENTITY section's Debug row with "iPhone Developer: My Dev Account Name", not just "iPhone Developer".

I've no idea why it works, but it does! At least for me!


Environment: Xcode 5.0 (5A1412).


I Had the same issue, but resolved it by following simple following steps :

  1. Make sure you have selected debug rather than release.
  2. In Debug configurations, in project settings, you should have selected developer's profile & no need of specifying the entitlements plist.
  3. Also same setting are there under: Targets: , if not manuall change them to the above for the debug config. It will work.

All the best.


If you are getting such error, the only reason could be you using a Distribution profile rather than a development profile in Xcode or a missing Entitlement property. If you are not using the Entitlements.plist, then the only possible error could be the app is getting packaged with a distribution profile. You could verify this confirming the build logs. To change this, go to Build Setting of the project and verify Code Signing Entity setting. For debugging to work, this setting should be a developer profile for the configuration that you are currently using.

https://developer.apple.com/library/ios/#qa/qa1682/_index.html

For instant results, delete all mobile provisioning profiles from xcode and install the developer profile that you intend to use.


Go to Edit Schemes and under Run -> Info -> Build Configuration, change from Ad-Hoc to Debug. Click OK to save.


As stated by Buffernet, you cannot use a distribution provisioning profile to debug. When I switched to a developer provisioning profile, I got the error "A Valid Provisioning Profile For This Executable Was Not Found".

A quick google for this lead me to the article listed below. From there, I realised that I hadn't got a valid development provisioning profile as my iPhone hadn't been added to the Provisioning Portal and all the other stuff involved.

Make sure you run an iPhone developer provisioning profile and your device has been added to the provisioning portal!

http://iosdevelopertips.com/xcode/a-valid-provisioning-profile-for-this-executable-was-not-found.html


Check ur code signing section.make sure that the code signing is iPhoneDeveloper code signe


The ad-hoc profile doesn't support debugging. You need to debug with a Development profile, and use the Ad-Hoc profile only for distributing non-debuggable copies.


Examples related to xcode

Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Make a VStack fill the width of the screen in SwiftUI error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code

Examples related to provisioning

Xcode Product -> Archive disabled Xcode doesn't see my iOS device but iTunes does Xcode - iPhone - profile doesn't match any valid certificate-/private-key pair in the default keychain A valid provisioning profile for this executable was not found for debug mode Adding devices to team provisioning profile iPhone Debugging: How to resolve 'failed to get the task for process'? Renew Provisioning Profile

Examples related to adhoc

How to connect android wifi to adhoc wifi? Can Android do peer-to-peer ad-hoc networking? iPhone Debugging: How to resolve 'failed to get the task for process'? The executable was signed with invalid entitlements