Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnauthorizedAccessException during compilation with 2021.2.0 #128

Open
KuraiAndras opened this issue Nov 2, 2021 · 6 comments
Open

UnauthorizedAccessException during compilation with 2021.2.0 #128

KuraiAndras opened this issue Nov 2, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@KuraiAndras
Copy link

Bug description

I upgraded one of my projects to 2021.2.0. Everything works in the editor, but the CI build fails

How to reproduce

  • Create a unity build with 2021.2.0

Expected behavior

Project builds without error

Additional details

I'm using the image: unityci/editor:2021.2.0f1-windows-mono-0.15.0

When running the build on Windows and installing Unity via chocolatey, everything works as expected

Logs
Registering precompiled user dll's ...
Registered in 0.033312 seconds.
IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.LoadingAssemblyDefinition.SetAllCustomScriptAssemblyJsonContents (System.String[] paths, System.String[] contents, System.String[] guids) [0x00132] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/LoadingAssemblyDefinition.cs:90 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionsAsErrors(Exception[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:42)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:SetAllCustomScriptAssemblyJsonContents(String[], String[], String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:140)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)
IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.LoadingAssemblyDefinition.SetAllCustomScriptAssemblyJsonContents (System.String[] paths, System.String[] contents, System.String[] guids) [0x00132] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/LoadingAssemblyDefinition.cs:90 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionsAsErrors(Exception[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:42)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:SetAllCustomScriptAssemblyJsonContents(String[], String[], String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:140)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)
[ScriptCompilation] Requested script compilation because: InitialRefresh: Force Refresh Recompile flag enabled
[API Updater] Processing imported assemblies took 97 ms (0/0 assembly(ies)).
Assembly Updater Post Process Assets time: 0.113042s
IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.LoadingAssemblyDefinition.SetAllCustomScriptAssemblyJsonContents (System.String[] paths, System.String[] contents, System.String[] guids) [0x00132] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/LoadingAssemblyDefinition.cs:90 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionsAsErrors(Exception[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:42)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:SetAllCustomScriptAssemblyJsonContents(String[], String[], String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:140)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)
[ScriptCompilation] Requested script compilation because: Assembly Definition File(s) changed
[ScriptCompilation] Requested script compilation because: Assetdatabase observed changes in script compilation related files
IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <75405ec2242e43c49aa0483c7c7d5ed0>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.AddScriptAssemblyReferences (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly& scriptAssembly, UnityEditor.Scripting.ScriptCompilation.TargetAssembly targetAssembly, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, System.Collections.Generic.IDictionary`2[TKey,TValue] targetToScriptAssembly, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x0036d] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:457 
  at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.ToScriptAssemblies (System.Collections.Generic.IDictionary`2[TKey,TValue] targetAssemblies, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink, UnityEditor.Scripting.ScriptCompilation.ISafeModeInfo safeModeInfo) [0x002b4] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:298 
  at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.GetAllScriptAssemblies (System.Collections.Generic.Dictionary`2[TKey,TValue] allSourceFiles, System.String projectDirectory, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, UnityEditor.Scripting.ScriptCompilation.ISafeModeInfo safeModeInfo, UnityEditor.Scripting.ScriptCompilation.TargetAssemblyType onlyIncludeType, System.Func`2[T,TResult] targetAssemblyCondition, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x00116] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:191 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.GetAllScriptAssembliesOfType (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.TargetAssemblyType type, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x0009f] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:1593 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScriptsWithSettings (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings) [0x00085] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:922 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions editorScriptCompilationOptions, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.Int32 subtarget, System.String[] extraScriptingDefines) [0x0003a] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:791 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface+<>c__DisplayClass21_0.<CompileScripts>b__0 () [0x00000] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:184 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.EmitExceptionAsError[T] (System.Func`1[TResult] func, T returnValue) [0x00002] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:49 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionAsError(Func`1, CompileStatus) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:53)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScripts(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, Int32, String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:184)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)
@KuraiAndras KuraiAndras added the bug Something isn't working label Nov 2, 2021
@davidmfinol
Copy link
Member

@KuraiAndras Are you still facing this issue? If you are, I'd recommend trying to build on a Linux PC or VM to see if that works.

@KuraiAndras
Copy link
Author

I think it was present until 2021.2.2, but I am not sure. I switched to building on windows, and installing unity using chocolatey. I will try it again soon.

@KuraiAndras
Copy link
Author

Yup, I just tried it with 2021.2.4

Logs
IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.LoadingAssemblyDefinition.SetAllCustomScriptAssemblyJsonContents (System.String[] paths, System.String[] contents, System.String[] guids) [0x00132] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/LoadingAssemblyDefinition.cs:90 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionsAsErrors(Exception[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:42)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:SetAllCustomScriptAssemblyJsonContents(String[], String[], String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:140)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)

IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.LoadingAssemblyDefinition.SetAllCustomScriptAssemblyJsonContents (System.String[] paths, System.String[] contents, System.String[] guids) [0x00132] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/LoadingAssemblyDefinition.cs:90 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionsAsErrors(Exception[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:42)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:SetAllCustomScriptAssemblyJsonContents(String[], String[], String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:140)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)

[ScriptCompilation] Requested script compilation because: InitialRefresh: Force Refresh Recompile flag enabled
[API Updater] Processing imported assemblies took 119 ms (0/0 assembly(ies)).
Assembly Updater Post Process Assets time: 0.142041s
IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.LoadingAssemblyDefinition.SetAllCustomScriptAssemblyJsonContents (System.String[] paths, System.String[] contents, System.String[] guids) [0x00132] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/LoadingAssemblyDefinition.cs:90 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionsAsErrors(Exception[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:42)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:SetAllCustomScriptAssemblyJsonContents(String[], String[], String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:140)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)

[ScriptCompilation] Requested script compilation because: Assembly Definition File(s) changed
[ScriptCompilation] Requested script compilation because: Assetdatabase observed changes in script compilation related files
IOException: Permission denied
Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <5885891d38de43a9bd101048f53e4fd2>:0 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00083] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:21 
  at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.AddScriptAssemblyReferences (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly& scriptAssembly, UnityEditor.Scripting.ScriptCompilation.TargetAssembly targetAssembly, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, System.Collections.Generic.IDictionary`2[TKey,TValue] targetToScriptAssembly, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x0036d] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:457 
  at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.ToScriptAssemblies (System.Collections.Generic.IDictionary`2[TKey,TValue] targetAssemblies, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink, UnityEditor.Scripting.ScriptCompilation.ISafeModeInfo safeModeInfo) [0x002b4] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:298 
  at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.GetAllScriptAssemblies (System.Collections.Generic.Dictionary`2[TKey,TValue] allSourceFiles, System.String projectDirectory, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, UnityEditor.Scripting.ScriptCompilation.ISafeModeInfo safeModeInfo, UnityEditor.Scripting.ScriptCompilation.TargetAssemblyType onlyIncludeType, System.Func`2[T,TResult] targetAssemblyCondition, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x00116] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:191 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.GetAllScriptAssembliesOfType (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.TargetAssemblyType type, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x0009f] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:1593 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScriptsWithSettings (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings) [0x00085] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:922 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions editorScriptCompilationOptions, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.Int32 subtarget, System.String[] extraScriptingDefines) [0x0003a] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:791 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface+<>c__DisplayClass21_0.<CompileScripts>b__0 () [0x00000] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:184 
  at UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.EmitExceptionAsError[T] (System.Func`1[TResult] func, T returnValue) [0x00002] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:49 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionAsError(Func`1, CompileStatus) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:53)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScripts(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, Int32, String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:184)

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)

AssetDatabase: script compilation time: 0.522176s

Aborting batchmode due to failure:
Scripts have compiler errors.

##[error]Scripts have compiler errors.
/home/bokken/buildslave/unity/build/External/baselib/builds/Include/C/Internal/Baselib_Semaphore_FutexBased.inl.h(151): Assertion failed (count >= 0) - Destruction is not allowed when there are still threads waiting on the semaphore.
Caught fatal signal - signo:5 code:128 errno:0 addr:(nil)
Obtained 12 stack frames.
#0  0x0055ebbebe35fc in RegisterRuntimeInitializeAndCleanup::ExecuteCleanup()
#1  0x0055ebbea54e40 in RuntimeCleanup()
#2  0x0055ebbff96463 in DoQuitEditorWithExitCode(int)
#3  0x0055ebbebdae62 in CheckBatchModeErrorString(core::basic_string<char, core::StringStorageDefault<char> > const&)
#4  0x0055ebc0348991 in RefreshInternalV2(AssetDatabase::UpdateAssetOptions, ScanFilter const&, InternalRefreshFlagsV2)
#5  0x0055ebc032045a in StopAssetImportingV2Internal(AssetDatabase::UpdateAssetOptions, InternalRefreshFlagsV2, ScanFilter const*, char const*)
#6  0x0055ebc0322b79 in InitialRefreshV2(bool)
#7  0x0055ebbfef0890 in Application::InitializeProject()
#8  0x0055ebbff9777d in InitializeUnity(void*)
#9  0x0055ebbff96e04 in main
#10 0x007f6075d32bf7 in __libc_start_main
#11 0x0055ebbe1c0029 in _start
##[error]Process 'Unity' exited with code 133. Verify the invocation.

@davidmfinol
Copy link
Member

@KuraiAndras I have seen other users able to build with 2021.2 now, so I'm wondering again if this is still an issue for you?
If so, can you share more details about your project (preferably a minimum, complete, verifiable example) to see if we can identity what is wrong?

@davidmfinol davidmfinol self-assigned this Feb 25, 2022
@davidmfinol davidmfinol removed their assignment Feb 25, 2022
@davidmfinol
Copy link
Member

Closing due to lack of steps to reproduce; please re-open if MCVE is provided.

@vaind
Copy link

vaind commented Oct 19, 2022

This is reproducible if you run a docker image on Linux GHA as a non-root user. E.g. here: https://github.com/getsentry/sentry-unity/actions/runs/3283416099/jobs/5408100927

docker run -td --name unity --user $(id -u):$(id -g) .... unityci/editor:ubuntu-2021.3.11f1-base-1.0.1
docker exec unity dotnet msbuild /t:UnityConfigureSentryOptions /p:Configuration=Release /p:OutDir=other src/Sentry.Unity
  16:48:45.794 | IOException: Permission denied
  16:48:45.795 | Rethrow as UnauthorizedAccessException: Access to the path '/opt/unity/Editor/Data/UnityReferenceAssemblies/unity-4.8-api/Facades' is denied.
  16:48:45.797 |   at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.799 |   at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.800 |   at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.802 |   at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.803 |   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.805 |   at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0003c] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.806 |   at System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.808 |   at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00007] in <12d27ebfb46146b18b40876234894c77>:0 
  16:48:45.809 |   at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetCachedSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x0008e] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:57 
  16:48:45.810 |   at UnityEditor.Scripting.ScriptCompilation.MonoLibraryHelpers.GetSystemLibraryReferences (UnityEditor.ApiCompatibilityLevel apiCompatibilityLevel) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs:23 
  16:48:45.812 |   at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.AddScriptAssemblyReferences (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly& scriptAssembly, UnityEditor.Scripting.ScriptCompilation.TargetAssembly targetAssembly, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, System.Collections.Generic.IDictionary`2[TKey,TValue] targetToScriptAssembly, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x0036d] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:467 
  16:48:45.814 |   at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.ToScriptAssemblies (System.Collections.Generic.IDictionary`2[TKey,TValue] targetAssemblies, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink, UnityEditor.Scripting.ScriptCompilation.ISafeModeInfo safeModeInfo) [0x002c7] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:299 
  16:48:45.817 |   at UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.GetAllScriptAssemblies (System.Collections.Generic.Dictionary`2[TKey,TValue] allSourceFiles, System.String projectDirectory, UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.EditorBuildRules+CompilationAssemblies assemblies, UnityEditor.Scripting.ScriptCompilation.ISafeModeInfo safeModeInfo, UnityEditor.Scripting.ScriptCompilation.TargetAssemblyType onlyIncludeType, System.Func`2[T,TResult] targetAssemblyCondition, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x00116] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:191 
  16:48:45.819 |   at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.GetAllScriptAssembliesOfType (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings settings, UnityEditor.Scripting.ScriptCompilation.TargetAssemblyType type, UnityEditor.Scripting.ScriptCompilation.ICompilationSetupWarningTracker warningSink) [0x0009f] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:1472 
  16:48:45.821 |   at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScriptsWithSettings (UnityEditor.Scripting.ScriptCompilation.ScriptAssemblySettings scriptAssemblySettings) [0x0006c] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:814 
  16:48:45.823 |   at UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions editorScriptCompilationOptions, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.Int32 subtarget, System.String[] extraScriptingDefines) [0x0003a] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:693 
  16:48:45.825 |   at UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface+<>c__DisplayClass21_0.<CompileScripts>b__0 () [0x00000] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:184 
  16:48:45.827 |   at UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.EmitExceptionAsError[T] (System.Func`1[TResult] func, T returnValue) [0x00002] in /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:49 
  16:48:45.829 | UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
  16:48:45.830 | UnityEngine.DebugLogHandler:LogException(Exception, Object)
  16:48:45.831 | UnityEngine.Logger:LogException(Exception, Object)
  16:48:45.832 | UnityEngine.Debug:LogException(Exception)
  16:48:45.834 | UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:LogException(Exception) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:33)
  16:48:45.835 | UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionAsError(Func`1, CompileStatus) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:53)
  16:48:45.837 | UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScripts(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, Int32, String[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:184)
  16:48:45.838 | 
  16:48:45.839 | (Filename: /home/bokken/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/MonoLibraryHelpers.cs Line: 57)

Adding docker exec --user root unity chmod -R 755 /opt/unity/Editor/Data/UnityReferenceAssemblies/ works around the issue - I guess it could be added to the docker build itself?

This applies to Unity 2021(.3.11) & 2022(.1.20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants