Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

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:
    160
    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:
    39,015
    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:
    160
    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:
    39,015
    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:
    160
    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,194
    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:
    6
    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. xmosgames

    xmosgames

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

    Aresboss

    Joined:
    Jun 26, 2019
    Posts:
    1
    I deleted the Bee Folder, and it solved the issue. Before that, I could only open the project in safe mode with this error. I knew that if I deleted the Bee Folder, it would redownload itself when I opened the project again. I tried it, and it worked ^^
     
    SkullShifter likes this.
  21. Bassem102

    Bassem102

    Joined:
    Oct 11, 2017
    Posts:
    6
    I just set the "Camera Usage Description" and it worked thanks a lot ;)
     
  22. SkullShifter

    SkullShifter

    Joined:
    Sep 15, 2023
    Posts:
    1
    Yeah so far this is the only way I am able to get around these MacOS errors.
     
  23. meritt

    meritt

    Joined:
    Jul 10, 2017
    Posts:
    4
    Esto ayudo, muchas gracis
     
  24. irontal

    irontal

    Joined:
    Aug 23, 2017
    Posts:
    10
    I solved this problem just now-
    I had no bee folder I could find. I read into the error and found it's related to UnityARKitPlugin and UnityARInterface
    which might be deprecated. I backed up my entire project, deleted these folders, deleted the entire library folder, waited for hours (as my project is hideously huge)for Unity to rebuild it, and.. Build!
     
  25. SonSep

    SonSep

    Joined:
    Dec 29, 2018
    Posts:
    7
    Jesus Christ.. Thank you so much!!
    it worked for me too. this solution still works!!

    In my case, I had some errors when build project with jenkins below
    especially iOS.

    Player Settings -> search microphone or description -> input anything you want in camera, microphone usage description* was solution!


    Microphone class is used but Microphone Usage Description is empty in Player Settings.
    System.Exception: Microphone class is used but Microphone Usage Description is empty in Player Settings.
    at PlayerBuildProgramLibrary.FeatureExtractor.Run(CSharpActionContext ctx, Data data) in /Users/bokken/build/output/unity/unity/Editor/IncrementalBuildPipeline/PlayerBuildProgramLibrary/FeatureExtractor.cs:line 38
    *** Tundra build failed (8.57 seconds), 3421 items updated, 3688 evaluated
    ExitCode: 3 Duration: 8s596ms



    BuildFailedException: Player build failed: 15 errors
    at UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00213] in /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/BeeBuildPostprocessor.cs:718
    at UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x002a2] in <cefdead0678a425ab2e0c2483a1910f2>:0
    UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, Int32, BuildOptions, String[], Boolean)
    UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, Int32, BuildOptions, String[]) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline.bindings.cs:507)
    UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, Int32, BuildOptions, String[]) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline.bindings.cs:372)
    UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline.bindings.cs:336)
    ProjectBuilder:BuildIos(Int32, String) (at Assets/Editor/Build/ProjectBuilder.cs:304)
    ProjectBuilder:BuildIOS_Dev() (at Assets/Editor/Build/ProjectBuilder.cs:233)

    (Filename: /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/BeeBuildPostprocessor.cs Line: 718)