6
votes

I have a Mac OSX app that I have previously been able to test - however when I run tests now - it will work once and then fail with the error below in the console. I need to do some drastic things to get it working:

If I

  1. change the location of my Derived Data folder
  2. and clean build folder - then it will usually work again once or twice before but when I run tests again it will happen again.

Any ideas of what I can do to fix it permanently - below is pretty much Greek to me..

I have tried the following:

  1. moving the derived data into Documents
  2. installing new Xcode from Appstore.
  3. Deleting and re-adding Certificates and profiles

2017-01-15 16:41:51.247064 XXXXXX[51736:892136] Unable to load configuration data from specified path /var/folders/59/7ylv57053bv3c0rbbcc1mcg40000gp/T/com.apple.dt.XCTest/FDF2A461-45D7-4E64-B650-602DF0725CA7/remote-container/tmp/XXXXXXTests-FDF2A461-45D7-4E64-B650-602DF0725CA7.xctestconfiguration; error: You don’t have permission. 2017-01-15 16:41:51.247221 XXXXXX[51736:892136] IDEBundleInjection Arguments: ( "/Users/XXXXXX/XXXXXX/XXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug/XXXXXX.app/Contents/MacOS/XXXXXX", "-NSTreatUnknownArgumentsAsOpen", NO, "-ApplePersistenceIgnoreState", YES ) 2017-01-15 16:41:51.248336 XXXXXX[51736:892136] IDEBundleInjection Environment: { "APP_SANDBOX_CONTAINER_ID" = "com.XXXXXX.XXXXXX"; "Apple_PubSub_Socket_Render" = "/private/tmp/com.apple.launchd.hKPiBBDAAG/Render"; "CFFIXED_USER_HOME" = "/Users/XXXXX/Library/Containers/com.XXXXXX.XXXXXX/Data"; "DTX_CONNECTION_SERVICES_PATH" = "/Applications/Xcode.app/Contents/SharedFrameworks/DTXConnectionServices.framework"; "DYLD_FRAMEWORK_PATH" = "/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug:/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks"; "DYLD_INSERT_LIBRARIES" = ""; "DYLD_LIBRARY_PATH" = "/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug:/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks"; HOME = "/Users/XXXXX/Library/Containers/com.grant.XXXXXX/Data"; LOGNAME = XXXXX; MallocNanoZone = 1; NSUnbufferedIO = YES; "OS_ACTIVITY_DT_MODE" = YES; PATH = "/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"; PWD = "/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug"; SHELL = "/bin/bash"; "SSH_AUTH_SOCK" = "/private/tmp/com.apple.launchd.dNK7oacOAX/Listeners"; TMPDIR = "/var/folders/59/7ylv57053bv3c0rbbcc1mcg40000gp/T/com.grant.XXXXXX/"; USER = XXXXX; XCInjectBundleInto = "/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug/XXXXXX.app/Contents/MacOS/XXXXXX"; "XCODE_DBG_XPC_EXCLUSIONS" = "com.apple.dt.xctestSymbolicator"; XCTestConfigurationFilePath = "/var/folders/59/7ylv57053bv3c0rbbcc1mcg40000gp/T/com.apple.dt.XCTest/FDF2A461-45D7-4E64-B650-602DF0725CA7/remote-container/tmp/XXXXXXTests-FDF2A461-45D7-4E64-B650-602DF0725CA7.xctestconfiguration"; "XPC_FLAGS" = 0x0; "XPC_SERVICE_NAME" = "com.apple.dt.Xcode.23100"; "__CF_USER_TEXT_ENCODING" = "0x1F6:0x0:0x2"; "__XCODE_BUILT_PRODUCTS_DIR_PATHS" = "/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug"; "__XPC_DYLD_FRAMEWORK_PATH" = "/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug"; "__XPC_DYLD_LIBRARY_PATH" = "/Users/XXXXX/XXX/XXXXXXX/XXXXXX-eghnritsumpbbqgylbzrxqfximew/Build/Products/Debug"; }

3
Are you admin on your computer? Or do you have any sort of security/management software running e.g. corporate machine management? - Oletha
I am an admin -I don't have any corporate machine management software - UKDataGeek

3 Answers

2
votes

In Xcode 9 I found a solution, that worked for me.

Go to Xcode > File > Project Settings... (or Workspace Settings...)
Select New Build System (Preview) as Build System under Shared Settings.

Make sure to select Use Shared Setting under Per-User Project Settings.

0
votes

I too logged a bug with Apple. Experienced it on Xcode 9. However, I then played with it some more and found that by changing the Derived Data Folder to Custom and disabling code coverage in my Test config for my scheme, the error went away. It seems that some combination of these two caused the issue.

0
votes

I have logged a bug with Apple as it appears that no one else is getting this error.

Edit: Elise has filed bug Apple #34737491, if you are experiencing it - then please raise a bug and reference that ticket so Apple can see how big the impact is.