Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Build failing with "command failed to write the following output file"

Discussion in 'Editor & General Support' started by GoldFireStudios, Feb 11, 2022.

  1. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    150
    I've never had any issues with builds until upgrading to 2021.2.10 and 2021.2.11 this week. I don't know if this issue is caused by the version bump or something else, but I'm unable to downgrade back to 2021.2.7 because there apparently isn't any way to install Apple Silicon archive versions with the hub, and using the Unity installer won't allow installing the IL2CPP build option.

    Either way, the error that I'm getting isn't much help:

    Code (CSharp):
    1. Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/Assembly-CSharp-firstpass-FeaturesChecked.txt failed with output:
    2. Failed because this command failed to write the following output files:
    3. Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/Assembly-CSharp-firstpass-FeaturesChecked.txt
    4. UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
    5. UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    6. UnityEngine.Logger:Log (UnityEngine.LogType,object)
    7. UnityEngine.Debug:LogError (object)
    8. UnityEditor.Modules.BeeBuildPostprocessor:DefaultResultProcessor (Bee.BeeDriver.NodeResult,bool,bool) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:442)
    9. UnityEditor.Modules.BeeBuildPostprocessor:ReportBuildResults (Bee.BeeDriver.BeeDriverResult) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:453)
    10. UnityEditor.Modules.BeeBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:543)
    11. UnityEditor.OSXStandalone.OSXDesktopStandalonePostProcessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs) (at /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/OSXDesktopStandalonePostProcessor.cs:117)
    12. UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:28)
    13. UnityEditor.PostprocessBuildPlayer:Postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:370)
    14. UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:169)
    15. UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94)
    16. UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:1164)
    17. UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:1017)
    18. UnityEditor.BuildPlayerWindow:OnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:517)
    19. UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/HostView.cs:448)
    20. UnityEditor.DockArea:DrawView (UnityEngine.Rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:387)
    21. UnityEditor.DockArea:OldOnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:378)
    22. UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:351)
    23. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:687)
    24. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:659)
    25. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:652)
    26. UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:618)
    27. UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:607)
    28. UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:535)
    29. UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/EventHandler.cs:151)
    30. UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/MouseCaptureDispatchingStrategy.cs:88)
    31. UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:381)
    32. UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:344)
    33. UnityEngine.UIElements.EventDispatcher:ProcessEventQueue () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:306)
    34. UnityEngine.UIElements.EventDispatcher:OpenGate () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:270)
    35. UnityEngine.UIElements.EventDispatcherGate:Dispose () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:75)
    36. UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:372)
    37. UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:222)
    38. UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Panel.cs:417)
    39. UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:468)
    40. UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:211)
    41. UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
    42. UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
    43. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    I've reinstalled Unity and deleted everything but the assets and re-imported. Nothing seems to get building working again with this same error. Is this a known issue?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    33,727
    Can you build an empty blank project with just an empty scene?

    That would isolate if it is your code or if the installation is borkled.
     
  3. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    150
    An empty project builds successfully, but I don't see how it could be my code when the only error is seemingly pointing to the build process itself. It was also building fine before updating the Unity version. I'm not really sure how to even debug this issue at this point.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    33,727
    Yuck. I'm with you... the first stuff I'd suspect is anything like threading or networking or really any third party library.

    Assuming you're using source control, the approach I do is just start deleting stuff, papering over the bleeding, and eliminating systems one at a time. Doesn't matter if the build won't run; you just wanna see it build and find where the issue is.

    The first thing you could do is always delete ALL code, just build the assets to narrow it down to code, know that it's not some other asset thing.
     
  5. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    150
    I finally narrowed it down to the MegaFiers asset. I'll just submit a bug report to them in that case, thanks!
     
    Kurt-Dekker likes this.
  6. hanneskoecher

    hanneskoecher

    Joined:
    May 30, 2017
    Posts:
    2
    If anyone else is having issues with the build due to
    "Failed because this command failed to write the following output files: Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/ .."
    I was able to solve this issue by setting the "Camera Usage Description" and the "Microphone Usage Description" in Project Settings -> Player

    In the subfolder of your Unity Project "Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/" there is a texfile "FeatureCheckList.txt", in my case it contained a note that the webcamtexture is used but the usage description not set - might be that there is something else in here in your case
     
  7. adriaanwormgoor

    adriaanwormgoor

    Joined:
    Nov 14, 2013
    Posts:
    8
    YOU SAINT! Facepalming myself as well because the error quite explicitly points us to the smoking gun, but I appreciate you pointing me in the right direction!

     
  8. RohithV

    RohithV

    Joined:
    Dec 20, 2017
    Posts:
    1
    Thank you!
     
  9. ajturner

    ajturner

    Joined:
    Oct 3, 2020
    Posts:
    1
    This fixed my problem as well! I had added LocationService but forgot to add this text.

    Hopefully Unity team can add a better Error message and warnings at pre-compile time..

     
    hughperkins likes this.
  10. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,081
    This fixed this nasty problem, a BIG thank you.
     
  11. antkmk

    antkmk

    Joined:
    Jun 13, 2022
    Posts:
    1
    Thank you! This solved my issue!
     
  12. cdeegz

    cdeegz

    Joined:
    Mar 29, 2020
    Posts:
    1
    Massive thanks! Several hours I'll never get back due to that one...
     
  13. AmbitiousRobR

    AmbitiousRobR

    Joined:
    Oct 31, 2022
    Posts:
    1
    What do I set the description to? I'm new to this, so I don't know what to type in the box.
     
  14. znbmir

    znbmir

    Joined:
    Sep 10, 2018
    Posts:
    4
    As it is a description, doesn't matter write what, just write something there.
    I put text like following image, and it is working :)
     

    Attached Files:

  15. redcurrantsjam

    redcurrantsjam

    Joined:
    Nov 21, 2022
    Posts:
    4
    In order to narrow the problem down to code and ensure that it is not an issue with another asset, you should always delete ALL code and only build the assets.
     
  16. eternaldb

    eternaldb

    Joined:
    Jul 11, 2019
    Posts:
    1
    I can't find those settings anywhere
     
  17. Y8shi

    Y8shi

    Joined:
    Mar 13, 2022
    Posts:
    2
    Hello,

    I have the same problem with version 2021.3.16f.
    I have created an empty new project (3d core) without any assets or imports, the error appears immediately. I have tried the solutions above, it changes nothing.
    Do you have any tips or maybe I should upgrade to the 18 version?
     
  18. verny2verny

    verny2verny

    Joined:
    Nov 11, 2016
    Posts:
    5
    Adding text descriptions to the three entries (Camera Usage, Microphone Usage, Location Usage) in Player settings got me working. It seems these are required fields (marked with asterisks).
     
    amitron5 likes this.
  19. artistx_2009

    artistx_2009

    Joined:
    Feb 10, 2022
    Posts:
    1
    Where do I find it though?