Xcode 10 \\ Mojave could not attach to pid every third build

Hello,


Since i updated to Xcode 10 and Mojave, every third build giving me error:

Could not attach to pid : “..........”

Ensure “UnitTests” is not already running, and xxxx has permission to debug it.



Thta's happening really frequesnt and become such a pain, cleaning derived data, switching to old build system, adding extra spaces/new lines and compiling again, resetting all data on simulator didn't really help.


I would really appreciate if somebody nailed it yet.

Thanks.


Replies

We are experiencing the same issue. I personally have this happening on two different MacBook's and so far nothing I have tried has allowed me to run Unit Tests from Xcode. This is affecting a MacBook with Mojave and Xcode 9.4.1 and the other MacBook with Mojave and Xcode 10.0.0.


It would appear to be a SIPS violation as Xcode is trying to take over another process (the Simulator) - but as Xcode launched the Simulator it is unclear why it does not have permission to manage it. I also encountered this issue on High Sierra of late, however it was at least prompting the user for 'Admin' credentials, which then allowed Xcode to run the unit tests. On Mojave, no such prompt is appearing.


@Apple - it appears this should be a widespread issue, given the uniformity of the platform and software involved?


EDIT: Found a Radar which dismisses the issue: http://openradar.appspot.com/44945549?_sm_au_=iVVtRsGQkVfRsD6J


EDIT: After seeing the above Radar, I tried Xcode 10 again on Mojave. So far it is running Unit Tests without issue... but will monitor. However, as a developer I am required to still develop using Xcode 9.4.1 for legacy products, so the issue as reported is still blocking development.

Have the same problem.

The same issue.

I installed Mojave, XCode 10 and kept XCode 9.4.1

And now I'm getting "could not attach to pid" error on XCode 9.4.1 simulator

All of the sudden today I am now experiencing the "Error Code 1" variant of this error. I've tried everything I can.

sudo /usr/sbin/DevToolsSecurity -enable