Another condition for this error message occurring repeatedly is when multiple Unity builds are running at the same time on Jenkins.
One possible workaround solution for this is to reduce the # of executors in Jenkins to 1 (from 2 in my case) so that only 1 Unity build can occur at a time.
- I have Unity 2017.3 installed, and I did not have this issue with Unity 5.6.
- To find the option, see
Manage Jenkins -> Configure System -> # of executors in the Jenkins interface.)
Here is the error message with stack trace
Failed to get socket connection from UnityShaderCompiler.exe shader compiler! C:/Program Files/Unity/Editor/Data/Tools/UnityShaderCompiler.exe
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String, String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String, String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\artifacts\generated\common\editor\BuildPipelineBindings.gen.cs:337)
UnityEditor.BuildPipeline:BuildPlayer(String, String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\artifacts\generated\common\editor\BuildPipelineBindings.gen.cs:234)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\artifacts\generated\common\editor\BuildPipelineBindings.gen.cs:212)
[+ call stack from my build script]