com.unity.perception icon indicating copy to clipboard operation
com.unity.perception copied to clipboard

Unable to build MacOS player from a Linux machine

Open robin-moss opened this issue 4 years ago • 1 comments

When trying to create a MacOS build from Ubuntu and using a perception camera we get the following exception:

IOException: Failed to Copy File / Directory from 'Temp/StagingArea/robo-sim.app/Contents/Plugins_tempRename~' to 'Temp/StagingArea/robo-sim.app/Contents/PlugIns': destination path already exists.
  at UnityEditor.FileUtil.MoveFileOrDirectory (System.String source, System.String dest) [0x00014] in /home/bokken/buildslave/unity/build/Editor/Mono/FileUtil.bindings.cs:71 
  at UnityEditor.OSXStandalone.OSXDesktopStandalonePostProcessor.FixAppFolderName (System.String directoryPath, System.String directoryName, System.String machoSpecialDirectoryName) [0x00049] in /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/OSXDesktopStandalonePostProcessor.cs:275 
  at UnityEditor.OSXStandalone.OSXDesktopStandalonePostProcessor.RenameFilesInStagingArea (UnityEditor.Modules.BuildPostProcessArgs args) [0x001dd] in /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/OSXDesktopStandalonePostProcessor.cs:244 
  at DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) [0x0010a] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:250 
  at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00015] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:42 
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
  at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x0006a] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:60 
  at UnityEditor.OSXStandalone.OSXDesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00009] in /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/OSXDesktopStandalonePostProcessor.cs:660 
  at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00001] in /home/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:29 
  at UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x000dc] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337 

(Filename: /home/bokken/buildslave/unity/build/Editor/Mono/FileUtil.bindings.cs Line: 71)

This is caused by this package creating a folder called PlugIns, which is the correct folder name, but the UnityEditor creates a folder called Plugins (note the lower case I), then the OSXDesktopStandalonePostProcessor tries to rename all the folders in the staging area to the correct case names. In this case, it tried to rename Plugins to temporary name then to PlugIns but there is a check that causes the build to fail if the target folder already exists.

I am currently talking with Unity support directly as well, but because the bug is triggered by a preview package they're saying they will not fix the bug. Not sure if you can access the ticket but if you can here is the link with more results from me debugging the UnityEditor

robin-moss avatar Feb 15 '22 09:02 robin-moss

Hi @robin-moss. Thanks for the detailed bug report! We are currently looking into this and will update you in this thread 😁

Best, Aryan

aryan-mann avatar Feb 16 '22 22:02 aryan-mann