Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL Build Error with "Bee" in WebGLPlayer.SetupCompression

Discussion in '2021.2 Beta' started by Glader, Oct 8, 2021.

  1. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    456
    WebGL fails to build in 2021.2.0b14.3506.1 resulting in this error:

    Code (CSharp):
    1. nternal build system error. BuildProgram exited with code -532462766.
    2. Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    3. ---> 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
    4.   at Bee.Core.CopyTool.Setup(NPath target, NPath from)
    5.   at WebGLPlayerBuildProgram.WebGLPlayer.SetupCompression(NPath input, NPath output)
    6.   at WebGLPlayerBuildProgram.WebGLPlayer.SetupPostProcessBuildFile(NPath path)
    7.   at WebGLPlayerBuildProgram.WebGLPlayer.SetupPlayerExecutable()+MoveNext()
    8.   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
    9.   at System.Collections.Generic.SparseArrayBuilder`1.ReserveOrAdd(IEnumerable`1 items)
    10.   at System.Linq.Enumerable.ConcatNIterator`1.LazyToArray()
    11.   at System.Linq.Enumerable.ConcatNIterator`1.ToArray()
    12.   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    13.   at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram()
    14.   at PlayerBuildProgramTypeWrapper.Run(String[] args)
    15.   at Program.Main(String[] args)
    16.   --- End of inner exception stack trace ---
    17.   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
    18.   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    19.   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
    20.   at Program.Main(String[] args)
    21. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    I have tried different configuration and different project and build paths. Seems to fail in "RunBuildProgramPhase"
     
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    Could you send us a bug report with the repro project? That'd be super nice.
     
  3. unity_63CF76E4D78A9D5E5DEC

    unity_63CF76E4D78A9D5E5DEC

    Joined:
    Nov 21, 2021
    Posts:
    1
    Hello,

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

    gilesrwood

    Joined:
    Jun 23, 2018
    Posts:
    3
    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.
     
    xucian likes this.
  5. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    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?
     
  6. unity_0B525965C7C30A5E6FC6

    unity_0B525965C7C30A5E6FC6

    Joined:
    Sep 30, 2022
    Posts:
    1
    I have the same error, did anyone find a fix for this error?
    unity version 2021.3.11f
     
  7. zbalai

    zbalai

    Joined:
    May 28, 2012
    Posts:
    21
    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&)
     
  8. jackcrosa

    jackcrosa

    Joined:
    Oct 16, 2012
    Posts:
    22
    I have the exact same issue with any 2021.3 project even empty, has this bug been reported?