I am getting the following error after migrating from one mac to another using time machine.
Could not attach to pid
Ensure "project title" is not already running, and "system username" has permission to debug it.
The error occurs only when running the unit tests for (any) Framework project. Running an application on simulator and device works fine.
Running unit tests for an application works, but running it for any framework can't be launched due to this error. I am getting this error even with Alamofire or PromiseKit unit tests.
I tested the solutions suggested on similar questions on Stackoverflow (I deleted derived data, cleaned everything, reinstalled Xcode, restarted the mac ..) nothing solved the issue till now.
I am using Xcode 9.3 and tested this with Xcode 9.4-beta also.
I am running on Mac OS High Sierra - 10.13.4 (17E199)
Any help / suggestion is welcome!
After opening a bug report to Apple, they suggested me to:
groups
command. it was the case. Use this command:dscacheutil -q group
sudo /usr/sbin/DevToolsSecurity -status
. The status was unknown for me.sudo /usr/sbin/DevToolsSecurity -enable
. This solved finally my issue!Haven't seen this exact error, but I've found removing the derived data helps fix some transient errors that pop up after updates etc.
You can find the location of your derived data folder in Xcode.
Open preferences/locations and click the arrow.
Once in derived data you can remove all the folders. FYI after deleting the derived data folder all your projects will need to be rebuilt.
Hope this helps!
You can do this following steps -
Kill your simulator and then run it again from Xcode.
If you are trying to build too fast after a build has started. Try stopping and running the project again.
This can be a issue with the untrusted certificates in key-chain access, please remove such a type of certificates and re-build again.
Finally, you can do is recheck the Keychain certificates. Delete the exiting ones by right clicking (they'd passed expiration) and unchecked
"automatically manage signing"
inTargets->General
Hope above steps will solve your problem.
I was able to resolve this issue by:
Single View App
target (I named itHostApp
)HostApp
target as a host application for test targetYou can try some following steps -
Keychain certificates
and delete the existing ones which are expired.automatically manage sign in
from Xcode project settings.cmd+k
Restart
the project and Run...I hope it will work.
If you have
Mojave
OS then:1) Open your target scheme
2) Uncheck this one
3) Select this scheme while testing this target (ex. Testing "TestApiTarget" - select "TestApiTarget" in schemes on tests).
Its temporary solution from bug report