Error building reference-project with docker
- Dominant language
- Dockerfile
- Stars
- 470
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Description
**Bug description**
When using the docker image "unityci/editor:windows-2021.3.1f1-windows-il2cpp-1.0.1", to build reference-project, the produced application only displays a white screen.
**How to reproduce**
The following instructions are performed on Windows 10 using powershell.
Create a docker image and use it to build reference-project. Substitute with your values for UNITY_USERNAME, UNITY_PASSWORD and UNITY_SERIAL.
```
git clone https://github.com/game-ci/docker.git docker-game-ci;
"ARG UNITY_VERSION='2021.3.1f1' `
ARG UNITY_IMAGE_VERSION='1.0.1' `
FROM unityci/editor:windows-${UNITY_VERSION}-windows-il2cpp-${UNITY_IMAGE_VERSION} `
RUN choco install visualstudio2022-workload-vctools --no-progress -y `
USER ContainerUser" > Dockerfile
docker build -t unity-test:latest -m 6GB . --network "Default Switch"
docker run --rm -it -w C:/docker-game-ci `
-v $pwd/docker-game-ci:C:/docker-game-ci `
-e "UNITY_USERNAME=username@example.com" `
-e "UNITY_PASSWORD=example_password" `
-e "UNITY_SERIAL=AN-EXAM-PLE-SERIA-LKEY-1234" `
-e "UNITY_EDITOR=C:\Program Files\Unity\Hub\Editor\2021.3.1f1\Editor\Unity.exe" `
unity-test:latest powershell -Command 'try { `
Start-Process -FilePath $env:UNITY_EDITOR -Wait -ArgumentList @(`
"-quit", "-nographics", "-batchmode", "-projectPath ./reference-project/", `
"-buildWindows64Player ./bin/app.exe", "-logFile ./Build.log", `
"-username ""$env:UNITY_USERNAME""", "-password ""$env:UNITY_PASSWORD""", `
"-serial ""$env:UNITY_SERIAL""") `
} `
finally { `
Start-Process -FilePath $env:UNITY_EDITOR -Wait -ArgumentList @(`
"-quit", "-nographics", "-batchmode", "-logFile ./Release.log", `
"-username ""$env:UNITY_USERNAME""", "-password ""$env:UNITY_PASSWORD""", `
"-returnlicense") `
} ';
```
When launching the application, the display is all white.
In the log file, this line The following line occurs 11 times in the log file:
```
Initializing Microsoft Media Foundation failed. It seems that the Microsoft Media Foundation is not installed on this machine or a newer version of Microsoft Media Foundation is required. To install the necessary libraries please install the Media Feature Pack from https://www.microsoft.com/en-us/search/result.aspx?q=Media+Feature+Pack for your version of Windows.
```
Around line 7127 and 7182, the following stack trace is shown:
```
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.Rendering.Universal.UniversalRenderPipelineGlobalSettings:Create (string,UnityEngine.Rendering.Universal.UniversalRenderPipelineGlobalSettings) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/UniversalRenderPipelineGlobalSettings.cs:145)
UnityEngine.Rendering.Universal.UniversalRenderPipelineGlobalSettings:Ensure (string,bool) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/UniversalRenderPipelineGlobalSettings.cs:116)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:.ctor (UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/UniversalRenderPipeline.cs:147)
UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset:CreatePipeline () (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/Data/UniversalRenderPipelineAsset.cs:401)
UnityEngine.Rendering.RenderPipelineAsset:InternalCreatePipeline ()
UnityEngine.Rendering.RenderPipelineManager:PrepareRenderPipeline (UnityEngine.Rendering.RenderPipelineAsset)
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,System.Collections.Generic.List`1,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle)
[C:\buildslave\unity\build\Modules\Video\Public\Media\WindowsMedia\WindowsVideoMedia.cpp line 1124]
```
**Expected behavior**
The image "${UNITY_VERSION}-windows-il2cpp-${UNITY_IMAGE_VERSION}" should correctly build reference-project as it is.
There should not be any exceptions on "WindowsVideoMedia.cpp" in the log file.
**Additional details**
In the log file, the following exception is observed multiple times. It does not appear to be a problem, as when building the project outside of the docker image, i.e. using the unity editor installed on my computer, they are present but the produced application displays the scene correctly.
```
RenderTexture.Create with shadow sampling failed: Hardware does not support shadow compare sampling.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.RenderTexture:GetTemporary_Internal (UnityEngine.RenderTextureDescriptor)
UnityEngine.RenderTexture:GetTemporary (UnityEngine.RenderTextureDescriptor)
UnityEngine.Rendering.Universal.ShadowUtils:GetTemporaryShadowTexture (int,int,int) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/ShadowUtils.cs:268)
UnityEngine.Rendering.Universal.Internal.MainLightShadowCasterPass:Setup (UnityEngine.Rendering.Universal.RenderingData&) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/Passes/MainLightShadowCasterPass.cs:114)
UnityEngine.Rendering.Universal.UniversalRenderer:Setup (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Rendering.Universal.RenderingData&) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/UniversalRenderer.cs:455)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Rendering.Universal.CameraData,bool) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/UniversalRenderPipeline.cs:411)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/UniversalRenderPipeline.cs:324)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.6/Runtime/UniversalRenderPipeline.cs:279)
UnityEngine.Rendering.RenderPipeline:InternalRender (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1)
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,System.Collections.Generic.List`1,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle)
UnityEditor.Experimental.Rendering.BuiltinBakedReflectionSystem:Internal_Tick (UnityEditor.Experimental.Rendering.SceneStateHash)
UnityEditor.Experimental.Rendering.BuiltinBakedReflectionSystem:Tick (UnityEditor.Experimental.Rendering.SceneStateHash,UnityEditor.Experimental.Rendering.IScriptableBakedReflectionSystemStageNotifier)
UnityEditor.Experimental.Rendering.ScriptableBakedReflectionSystemWrapper:Internal_ScriptableBakedReflectionSystemWrapper_Tick (UnityEditor.Experimental.Rendering.SceneStateHash)
[C:\buildslave\unity\build\Runtime\Graphics\RenderTexture.cpp line 679]
```
The full log file: [Build.log](https://github.com/game-ci/docker/files/10678213/Build.log)
Contributor guide
Assessment
This issue has not been assessed yet.