WebGL Build Error with "Bee" in WebGLPlayer.SetupCompression

WebGL fails to build in 2021.2.0b14.3506.1 resulting in this error:

nternal build system error. BuildProgram exited with code -532462766.
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.ArgumentException: You're trying to copy to C:/Build/Build/Build.framework.js more than once. Previously from Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.framework.js and now from Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.worker.framework.js
   at Bee.Core.CopyTool.Setup(NPath target, NPath from)
   at WebGLPlayerBuildProgram.WebGLPlayer.SetupCompression(NPath input, NPath output)
   at WebGLPlayerBuildProgram.WebGLPlayer.SetupPostProcessBuildFile(NPath path)
   at WebGLPlayerBuildProgram.WebGLPlayer.SetupPlayerExecutable()+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.SparseArrayBuilder`1.ReserveOrAdd(IEnumerable`1 items)
   at System.Linq.Enumerable.ConcatNIterator`1.LazyToArray()
   at System.Linq.Enumerable.ConcatNIterator`1.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram()
   at PlayerBuildProgramTypeWrapper.Run(String[] args)
   at Program.Main(String[] args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I have tried different configuration and different project and build paths. Seems to fail in ā€œRunBuildProgramPhaseā€

Could you send us a bug report with the repro project? Thatā€™d be super nice.

Hello,

I got same error when use unity 2022.1.0b10 beta
Everyone have solution for this?

I hit this problem in 2021.2.12f and discovered that it was because I had webGLThreadsSupport: 1 in my ProjectSettings.asset file (from a long-forgotten change). I changed this to 0, then loaded up unity and it worked ok.

1 Like

Any clue why this doesnā€™t work? Iā€™m experimenting with webGLThreadsSupport and would like to know if support for WebGL threading is concretized. If not, any idea about its roadmap?

I have the same error, did anyone find a fix for this error?
unity version 2021.3.11f

same bee error comes for an empty project

Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
emcc: error: ā€˜ā€œC:/Program Files/Unity/Hub/Editor/2022.3.4f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/binaryen\bin\wasm-optā€ --strip-dwarf --post-emscripten -O2 --low-memory-unused --zero-filled-memory --strip-debug --strip-producers Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm -o Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm --mvp-featuresā€™ failed (returned 3221225725)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I have the exact same issue with any 2021.3 project even empty, has this bug been reported?