13

When I run the application, it is installed in the device, but will crash immediately. I want to debug in the device, below is the information:

error: failed to launch '/Users/wujinjin/Library/Developer/Xcode/DerivedData/化龙巷-gyktkapynghuobbqslisrornfrut/Build/Products/Debug-iphoneos/化龙巷.app/化龙巷' -- failed to send the qLaunchSuccess packet

information from device:

Exception Type: 00000020 Exception Codes: 0x8badf00d Highlighted Thread: 0

Application Specific Information: 化龙巷 failed to launch in time

Elapsed total CPU time (seconds): 20.030 (user 17.830, system 2.200), 100% CPU Elapsed application CPU time (seconds): 0.000, 0% CPU

Backtrace not available

Unknown thread crashed with unknown flavor: 5, state_count: 1

Binary Images: 0x2fe00000 - 0x2fe25fff dyld armv7 /usr/lib/dyld

7 Answers 7

31

I was having the same error "-- failed to send the qLaunchSuccess packet"

I was able to fix by setting the Code Signing Entitlements to "iPhone Developer" (I was using distribution by mistake)

3
  • 1
    This is the best solution. Per Apple Tech note QA1682: Distribution profiles don't have a get-task-allow entitlement property, which is needed for debugging iPhone applications. However, this property is available and enabled for Development Provisioning profiles. So, use your Development profile rather than your Distribution profile when debugging your iPhone application on the device.
    – phatblat
    May 3, 2012 at 21:18
  • 1
    I had the same problem, I was trying to debug with a release certificate. Changed it to a development certificate and everything was good. Jun 2, 2012 at 20:13
  • 1
    how can i check push notification with distribution certificates?
    – Bharathi D
    Aug 24, 2012 at 8:54
3

Restart the device. Worked for me.

3

By accident I found a real simple and always working solution for this issue that happens constantly.

First thing to know is that it happens when I run the code on the real device while in debugging mode, then make some changes to the code in XCode while still running the app with some breakpoints, stop the running application and immediatly(!) start debugging the edited code on the iOS device. Don't do that! Instead give XCode some time (a few seconds) to quit the app properly.

If it is has been occurred already stop the debbuger from running. Wait for the app to quit properly on the device, this may take some seconds. On the device double-press the home button and quit the app in the task bar by tapping the red (-). Then run the debugger, stop it immediatly without finishing the compilation and wait for XCode to stop all tasks (you may omit this step). Then everything should be fine and you can start debbuging on the device without the need for a restart. It seems that it is essential for XCode to cleanup everything after it has been stopped while debugging with breakpoints so always give it a few seconds to finish properly. Maybe it sounds like some sort of magic trick but until now it always works for me without the need for a restart.

0
2

Go to your Target's info, and at the bottom, remove the checkmark for "Entitlement". Worked for me.

2

I see this error all the time IF I was stopped due to a breakpoint and I just hit the run button (not the debugger's resume button). If I remember to hit stop before rerunning, I don't get the error. I can't turn off entitlement as the app I'm developing is one that will be using iCloud. Also, I can prevent the problem by resuming the app so that whatever Run does to stop an executing program handles it cleanly.

2

I solved it by

  1. remove derived data,
  2. quit Xcode,
  3. kill app on device,
  4. start Xcode again.

However this problem continues to happen for me, 0-4 times per week. A permanent solution to this problem would be nice.

0

my application was not getting launched on iPad but working normally on iPhone. I enabled entitlements and specified code signing entitlements as "iPhone Developer", then cleaned, restarted iPad and installed thru Xcode/cable directly on iPad and now its working as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.