{"record":{"id":"93f4abaa392031f2","repo":"Unity-Technologies/UnityCsReference","slug":"player-build-failed-args-report-summarizeerrors","errorCode":null,"errorMessage":"Player build failed: {args.report.SummarizeErrors()}","messagePattern":"Player build failed: (.+?)","errorType":"exception","errorClass":"BuildFailedException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/Modules/BeeBuildPostprocessor.cs","lineNumber":920,"sourceCode":"                    BeeDriverResult = activeBuild.TaskObject.Result;\n\n                    UnityBeeDriverProfilerSession.AddTaskToWaitForBeforeFinishing(BeeDriverResult.ProfileOutputWritingTask);\n\n                    if (BeeDriverResult.Success)\n                    {\n                        PostProcessCompletedBuild(args);\n                    }\n                    ReportBuildResults();\n\n                    UnityBeeDriver.RunCleanBeeCache();\n\n                    if (BeeDriverResult.Success)\n                    {\n                        buildStep = args.report.BeginBuildStep(\"Report output files\");\n                        ReportBuildOutputFiles(args);\n                        args.report.EndBuildStep(buildStep);\n                    } else\n                        throw new BuildFailedException($\"Player build failed: {args.report.SummarizeErrors()}\", silent: true);\n                }\n            }\n            catch (OperationCanceledException)\n            {\n                throw;\n            }\n            catch (BuildFailedException)\n            {\n                throw;\n            }\n            catch (AggregateException e)\n            {\n                if (e.InnerException is OperationCanceledException or BuildFailedException)\n                    throw e.InnerException;\n\n                throw new BuildFailedException(e);\n            }\n            catch (Exception e)","sourceCodeStart":902,"sourceCodeEnd":938,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/Modules/BeeBuildPostprocessor.cs#L902-L938","documentation":"Thrown as a BuildFailedException (silent:true) by the Bee build postprocessor after a player build has completed but BeeDriverResult.Success is false. The message embeds args.report.SummarizeErrors(), aggregating all individual build errors from the build report. The 'silent' flag suppresses extra editor noise, surfacing only the summarized root causes.","triggerScenarios":"Calling PostProcessCompletedBuild followed by UnityBeeDriver.RunCleanBeeCache where the Bee driver returns a non-success result. Occurs during player export/build pipeline when Bee (Unity's native build system) fails a compilation, linking, or post-processing step.","commonSituations":"Bee cache corruption, missing native toolchain/SDK, incompatible script assemblies, out-of-disk-space during build, platform module not installed, or a prior build step logged errors into the build report that SummarizeErrors now reports.","solutions":["Run UnityBeeDriver.RunCleanBeeCache manually (or delete Library/Bee and Library/BeeArtifacts) and rebuild to eliminate stale cache.","Read the full Editor.log / build report for the individual errors SummarizeErrors aggregated — the real cause is upstream, not this throw site.","Verify the target platform's Build Tools / SDK / NDK are installed and the Unity editor version matches the module version.","Disable 'Compress assets in the build' or switch compression format if the failure is asset-pipeline related."],"exampleFix":"// before: build keeps failing on stale Bee artifacts\n// after: clean Bee cache then rebuild\nUnityBeeDriver.RunCleanBeeCache();\n// or from command line: delete Library/Bee, Library/BeeArtifacts, then re-run the build","handlingStrategy":"try-catch","validationCode":"// No pre-check possible; inspect build report after RunCleanBeeCache.\nif (!UnityBeeDriver.RunCleanBeeCache())\n    Debug.LogError(\"Bee driver reported failure before throw.\");","typeGuard":null,"tryCatchPattern":"try { /* invoke player build */ }\ncatch (BuildFailedException ex) when (ex.Message.StartsWith(\"Player build failed\"))\n{\n    // ex is silent:true; surface the aggregated report errors to the user/log\n    Debug.LogError(ex.Message);\n}","preventionTips":["Clean Library/Bee and Library/BeeArtifacts before CI builds.","Pin a single Unity editor + module version per CI image.","Capture Editor.log to inspect SummarizeErrors output when this fires."],"tags":["unity","bee-build","build-pipeline","native"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}