Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Failed building WebGL player - ongoing

Discussion in 'WebGL' started by arumiat, May 16, 2015.

  1. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    I initially posted a bug report (692417) about this issue where the webGL player is failing to build
    Failed running "C:\Program Files\Unity 5.1.0b3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity 5.1.0b3\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" @"C:/Users/*******/Documents/2. WORK/1. CURRENT PROJECTS/Unity/UN dog chest NEW/Assets/../Temp/emcc_arguments.resp"

    stdout:
    WARNING: sanity check failed to run [Errno 13] Permission denied: 'C:\\Program Files\\Unity 5.1.0b3\\Editor\\Data\\PlaybackEngines\\webglsupport/BuildTools/emscripten.config_sanity'

    ---------------------------------------------------------------------------------------------------------------

    Exception: Failed building WebGL Player.
    UnityEditor.WebGL.ProgramUtils.StartProgramChecked (UnityEditor.Utils.Program p)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    UnityEditor.HostView:OnGUI()

    Apparently a workaround was to install Visual Studio and CMake. I installed both of these and added CMake to my Windows environment path but this still didn't fix the error.

    Unity bugs contacted me and advised that this would be fixed in 5.1b5.

    I installed 5.1b5 and unfortunately got this error
    Failed running "C:\Unity_51b5\Editor\Data\
    PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" @"C:/Users/arumiat/Documents/2. WORK/1. CURRENT PROJECTS/Unity/UN dog chest NEW/Assets/../Temp/emcc_arguments.resp"

    stdout:
    stderr:
    WARNING root: emcc: link command line is very long, even with response file -- use paths with no spaces
    Traceback (most recent call last):
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc", line 1216, in <module>
    extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, in_temp, stdout, stderr, forced=forced_stdlibs)
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 749, in calculate
    libfile = shared.Cache.get(name, create)
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\cache.py", line 36, in get
    temp = creator()
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 586, in create_libcextra
    return build_libc('libcextra.bc', libcextra_files, ['-O2'])
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 69, in build_libc
    shared.Building.link(o_s, in_temp(lib_filename))
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\shared.py", line 1390, in link
    output = Popen(link_cmd, stdout=PIPE).communicate()[0]
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
    File "C:\Unity_51b5\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
    WindowsError: [Error 87] The parameter is incorrect

    UnityEditor.HostView:OnGUI()

    I let Unity bugs know and they replied that they couldn't reproduce the error on my project at their end. They advised to try deleting my .emscripten file and emscripten_cache from my (C:/Users/username). I replied that I couldn't find these files to try deleting them but I didn't hear a response to this query.

    Bugs then suggested I try installing 5.1b6, but this hasn't helped either, I get this error.
    Exception: Failed building WebGL Player.
    UnityEditor.WebGL.
    ProgramUtils.StartProgramChecked (UnityEditor.Utils.Program p)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    UnityEditor.HostView:OnGUI()

    Failed running "C:\Unity_51b6\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Unity_51b6\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" @"C:/Users/arumiat/Documents/2. WORK/1. CURRENT PROJECTS/Unity/UN dog chest NEW/Assets/../Temp/emcc_arguments.resp"

    stdout:
    stderr:
    WARNING root: emcc: link command line is very long, even with response file -- use paths with no spaces
    Traceback (most recent call last): File "C:\Unity_51b6\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc", line 1216, in <module>
    extra_files_to_link += system_libs.calculat

    If this didn't work they suggested that 'it might be caused by llvm-linker failing to execute. Could you go to your Unity/Editor/Data/
    PlaybackEngines/webglsupport/BuildTools/Emscripten_FastComp_Win/ directory from command line and run llvm-link.exe and show us what does it print out? It would help us in investigating this.'


    If I run the program from the command line a terminal window shows up for a split second and then exits before I can get any useful information from it. I tried creating a .bat file to pause this window before closing but this didn't help. Is there a way to catch what's running somehow?

    I haven't heard back from bugs since, I was wondering if anyone had any ideas or whether you could take a look at this Jonas, this is of course a showstopper for me.



    EDIT: I have tried with 5.1b.0f1 and get this error
    Failed running "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" @"C:/Users/arumiat/Documents/2. WORK/1. CURRENT PROJECTS/Unity/UN dog chest NEW/Assets/../Temp/emcc_arguments.resp"

    stdout:
    stderr:
    WARNING root: emcc: link command line is very long, even with response file -- use paths with no spaces
    Traceback (most recent call last):
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc", line 1216, in <module>
    extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, in_temp, stdout, stderr, forced=forced_stdlibs)
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 749, in calculate
    libfile = shared.Cache.get(name, create)
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\cache.py", line 36, in get
    temp = creator()
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 586, in create_libcextra
    return build_libc('libcextra.bc', libcextra_files, ['-O2'])
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 69, in build_libc
    shared.Building.link(o_s, in_temp(lib_filename))
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\shared.py", line 1390, in link
    output = Popen(link_cmd, stdout=PIPE).communicate()[0]
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
    File "C:\Unity_5_1_0f1\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
    WindowsError: [Error 87] The parameter is incorrect

    UnityEditor.HostView:OnGUI()

    --------------------------------
    Exception: Failed building WebGL Player.
    UnityEditor.WebGL.ProgramUtils.StartProgramChecked (UnityEditor.Utils.Program p)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    UnityEditor.HostView:OnGUI()
     
    Last edited: May 16, 2015
  2. tinyanimations

    tinyanimations

    Joined:
    Jul 16, 2013
    Posts:
    4
    Afternoon, this is my first attempt at building for WebGL, i have basically an empty scene, Im using 5.1.0.f2 and i am receiving the same error as spoiler four in the above post. has anyone got any ideas? i have installed emsdk.
     
  3. abryden

    abryden

    Joined:
    Sep 29, 2014
    Posts:
    24
    I'm getting similar errors with 5.01f3

    Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" @"C:<MYPROJECTPATH>/Assets/../Temp/emcc_arguments.resp"

    stdout:
    stderr:
    WARNING root: emcc: link command line is very long, even with response file -- use paths with no spaces
    Traceback (most recent call last):
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc", line 1216, in <module>
    extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, in_temp, stdout, stderr, forced=forced_stdlibs)
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 749, in calculate
    libfile = shared.Cache.get(name, create)
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\cache.py", line 36, in get
    temp = creator()
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 586, in create_libcextra
    return build_libc('libcextra.bc', libcextra_files, ['-O2'])
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\system_libs.py", line 69, in build_libc
    shared.Building.link(o_s, in_temp(lib_filename))
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten\tools\shared.py", line 1390, in link
    output = Popen(link_cmd, stdout=PIPE).communicate()[0]
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
    WindowsError: [Error 87] The parameter is incorrect

    UnityEditor.HostView:OnGUI()
     
  4. abryden

    abryden

    Joined:
    Sep 29, 2014
    Posts:
    24
    I did what they asked of you and the output appears normal.
    I did not get a terminal window so you might be doing something differently or something different could be wrong on your system. I get the same output (and the same error trying to build) on both my main development machine and on a machine that does nothing but continuously build webgl for me because it takes so long.
     
  5. abryden

    abryden

    Joined:
    Sep 29, 2014
    Posts:
    24
    Can you link to the issue directly. I can't find it to vote for it. If anyone is reading this I should add that the build machine I'm experiencing this error on is a fresh install of Windows 8.1 with node, github, python, visual studio community 2013 (workaround for the other issue), and unity3d on and not much else. I'm going to try on a fresh VM with only unity3d and visual studio 2013 and see if I can still reproduce.

    Edit: I cannot reproduce on an empty unity project on a fresh VM. I also cannot reproduce on an empty project on my other machines. Performing further experimentation currently. It would be nice if webgl compilation didn't take extremely long.
     
    Last edited: Jun 10, 2015
  6. abryden

    abryden

    Joined:
    Sep 29, 2014
    Posts:
    24
    I finally got 5.1 to build WebGL projects. I still don't know what the problem was but here is what I did - it should work for you.

    I created an entirely new project and re-imported all the assets into the new project, set the build options and built it. I assume that the build options or some other stored property that was affecting the build somehow got left with a bad value in them that was causing the build to fail.

    Good luck. If anyone from the Unity3d team wants a list of changed files between a non-working and working project let me know and I'd be happy to help ( I deleted the old project and renamed the new).

    edit: Aagh it works on the build machine but not my main machine. I tried repeating the whole procedure on my dev machine but it doesn't work. If anyone figures this out any better than "play with it for a long time and get lucky" I would be interested to know.
     
    Last edited: Jun 10, 2015
  7. dnaloco

    dnaloco

    Joined:
    Mar 31, 2018
    Posts:
    2
    AVOID FOLDER WITH ACCENT AND SPECIAL CHARACTERS. It works for me!
     
  8. Danilooliver

    Danilooliver

    Joined:
    Oct 2, 2018
    Posts:
    5
    Any solution? I am having this problem and I have not seen a solution to it so far.
     
  9. parazolik

    parazolik

    Joined:
    Apr 7, 2021
    Posts:
    1
    Hi!
    When create a new project you should try to set the path to your Unity Projects folder in the Unity Hub like C:\Your Name of Folder.
     
  10. Puhal

    Puhal

    Joined:
    Jun 17, 2022
    Posts:
    1
    I upgraded my editor to Unity 2022.1 and it worked. My editor version was previous 2021.3.