How can i fix this warning: CoreSimulator is attempting to unload a stale CoreSimulatorService job

流过昼夜 提交于 2019-12-03 08:35:33

问题


I have a warning in my build log in teamcity. I've updated Xcode on my CI-Server from 7.3.1 to 8. The step run successfully but I have this:

[Step 3/3] Starting: /Users/teamcity/local/teamcity-build-agent/temp/agentTmp/custom_scriptxxxxxxx
[Step 3/3] in directory: /Users/teamcity/local/teamcity-build-agent/work/yyyy
[Step 3/3] 2016-10-11 09:04:41.706 xcodebuild[18180:5010256] CoreSimulator is attempting to unload a stale CoreSimulatorService job.  Detected Xcode.app relocation or CoreSimulatorService version change.  Framework path (/Applications/Xcodes/Xcode_8.0.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (303.8) does not match existing job path (/Applications/Xcodes/Xcode-7.3.1.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc) and version (209.19).
[Step 3/3] 2016-10-11 09:04:41.961 xcodebuild[18180:5010256] Failed to locate a valid instance of CoreSimulatorService in the bootstrap.  Adding it now.

How can i fix this warning?


回答1:


I had the same issue. I've to run both Xcode 7 (to build old version) and Xcode 8 (to build current develop branch) in my Jenkins server and I was having the issue all the time.

Solution:

launchctl remove com.apple.CoreSimulator.CoreSimulatorService || true

This happens because, even if you quit the simulator app, the service is still running. The above command is needed to remove the service called com.apple.CoreSimulator.CoreSimulatorService. The || true is to avoid failure when that service is not running.




回答2:


Encountered the same issue and solved with the following steps:

  1. Copy Xcode from the Applications folder to another location
  2. Delete the copy left in Applications & make sure no copies of Xcode remain
  3. Move the copy from step 1 back to the Applications folder
  4. Restarted machine

It appears that some value is not being set, since Xcode is not being installed through the App store.



来源:https://stackoverflow.com/questions/39972105/how-can-i-fix-this-warning-coresimulator-is-attempting-to-unload-a-stale-coresi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!