11

I'm trying to get my App to work again on the simulator as well as on my device. Before I got this error, I went through an odyssee of XCode signing errors, but right know it seems like I'm really stuck.

The error:

When I try to launch the App on a device, it builds without any errors, but after installing the app I get the error message:

Could not launch "APP_X_Y" - 'A' packet returned an error: -1

Unfortunately I cannot use the Simulator either - it gets stuck at "Attaching to APP_X_Y". You can also take a look at the simulator problem over here - but there is no final solution out there.

What I've done so far:

After different XCode Errors I went through the following Stackoverflow questions, each helping me out with to get to the next level.

  1. Xcode: failed to get the task for process
  2. Profile bug (Error launching remote program: failed to get the task for process XXX.)
  3. Code Sign error: Provisioning profile can't be found
  4. Provisioning Profile "Team" is "Unknown"

In the last step, however I think things got really screwed up: XCode wasn't able to find the provisioning profile anymore, that's why I've deleted my provisioning profile string in my project file, like it is recommended over here: Codesign error: Provisioning profile cannot be found after deleting expired profile

Know I'm struggling with the packet returned -1 error and I cannot find any input out here. Has anyone an idea how to get this to work again?

4 Answers 4

18

Got the same error when attempting to deploy an application to the third of three connected devices.

All I had to do was quit XCode and restart it and then it worked fine again.

Sign up to request clarification or add additional context in comments.

Comments

7

Had the same error. Cleaned build folder, emptied derived data folder, deleted app from device, restarted xcode and it worked again.

1 Comment

Worked for me too. Much easier than recreating the project.
2
+50

If you create a new project from scratch, can this new project connect to the simulator? In that case I suggest just moving over the existing code and settings to a fresh project. I've had to resort to this at least once that I can remember because something fishy had gone wrong with the XCode project file.

2 Comments

Not exactly what I was looking for, but it works... Another way to solve this issue would be a roll back to an older working project file.
Yea well, I agree it's not a pretty solution, but it's at least pretty simple and you get the bonus of knowing your project isn't filled up with gunk from previous versions...
0

None of the other answers helped me.. I wasn't able to launch ANY apps in Xcode 5 until I uncluttered my /etc/hosts file - leaving just the basics...

::1 localhost 127.0.0.1 localhost 255.255.255.255 broadcasthost fe80::1%lo0 localhost 10.0.1.100 XYZ.com 2001:470:XXXX::100 XYZ.com 

You must edit the file as root, btw... sudo nano /etc/hosts

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.