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

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:

Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/Assembly-CSharp-firstpass-FeaturesChecked.txt failed with output:
Failed because this command failed to write the following output files:
Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/Assembly-CSharp-firstpass-FeaturesChecked.txt
UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
UnityEditor.Modules.BeeBuildPostprocessor:smile:efaultResultProcessor (Bee.BeeDriver.NodeResult,bool,bool) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:442)
UnityEditor.Modules.BeeBuildPostprocessor:ReportBuildResults (Bee.BeeDriver.BeeDriverResult) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:453)
UnityEditor.Modules.BeeBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:543)
UnityEditor.OSXStandalone.OSXDesktopStandalonePostProcessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs) (at /Users/bokken/buildslave/unity/build/PlatformDependent/OSXPlayer/Extensions/Managed/OSXDesktopStandalonePostProcessor.cs:117)
UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:28)
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)
UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:169)
UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94)
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)
UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:1017)
UnityEditor.BuildPlayerWindow:OnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:517)
UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/HostView.cs:448)
UnityEditor.DockArea:smile:rawView (UnityEngine.Rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:387)
UnityEditor.DockArea:OldOnGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:378)
UnityEngine.UIElements.IMGUIContainer:smile:oOnGUI (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)
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)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:659)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:652)
UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:618)
UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:607)
UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:535)
UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/EventHandler.cs:151)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy:smile:ispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Events/MouseCaptureDispatchingStrategy.cs:88)
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)
UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:344)
UnityEngine.UIElements.EventDispatcher:ProcessEventQueue () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:306)
UnityEngine.UIElements.EventDispatcher:OpenGate () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:270)
UnityEngine.UIElements.EventDispatcherGate:smile:ispose () (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:75)
UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:372)
UnityEngine.UIElements.EventDispatcher:smile:ispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/EventDispatcher.cs:222)
UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/Panel.cs:417)
UnityEngine.UIElements.UIElementsUtility:smile:oDispatch (UnityEngine.UIElements.BaseVisualElementPanel) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:468)
UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:211)
UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74)
UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28)
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?

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.

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.

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.

I finally narrowed it down to the MegaFiers asset. I’ll just submit a bug report to them in that case, thanks!

1 Like

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

21 Likes

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!

3 Likes

Thank you!

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…

1 Like

This fixed this nasty problem, a BIG thank you.

Thank you! This solved my issue!

Massive thanks! Several hours I’ll never get back due to that one…

[quote=“hanneskoecher, post:6, topic: 871553, username:hanneskoecher”]
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
[/quote]
What do I set the description to? I’m new to this, so I don’t know what to type in the box.

As it is a description, doesn’t matter write what, just write something there.
I put text like following image, and it is working :slight_smile:

8598483--1153368--Screen Shot 2022-11-19 at 7.16.59 AM.png

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.
retro bowl

I can’t find those settings anywhere

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?

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).

1 Like

Where do I find it though?

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 ^^

1 Like