Search Unity

Failed to build WebGL game

Discussion in 'Getting Started' started by Enderlook, Dec 5, 2018.

  1. Enderlook

    Enderlook

    Joined:
    Dec 4, 2018
    Posts:
    52
    I am new in this and I was trying to understand how worked the built so I did the following:

    1. Make a new project, 3D.
    2. Switch platform to WebGL.
    3. Build and select a new folder for the build.

    After a while, I got this:

    Code (Log):
    1. 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:\Users\MYUSER\DOCUME~1\PROGRA~1\Unity\THELAS~1\Assets\..\Temp\emcc_arguments.resp"
    2.  
    3.     stdout:
    4.     stderr:ERROR:root:C:\Users\MYUSER\Documents\Programación\Unity\The Last Tower\Temp\StagingArea\Data\Native\build.bc: No such file or directory ("C:\Users\MYUSER\Documents\Programación\Unity\The Last Tower\Temp\StagingArea\Data\Native\build.bc" was expected to be an input file, based on the commandline arguments provided)
    5.     UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Then this:

    Code (Log):
    1. Exception: Failed building WebGL Player.
    2.     UnityEditor.WebGL.ProgramUtils.StartProgramChecked (System.Diagnostics.ProcessStartInfo p) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/ProgramUtils.cs:48)
    3.     UnityEditor.WebGL.WebGlBuildPostprocessor.EmscriptenLink (BuildPostProcessArgs args, Boolean wasmBuild, System.String sourceFiles, System.String sourceFilesHash) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:425)
    4.     UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:474)
    5.     UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:937)
    6.     UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
    7.     UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:287)
    8.     UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    And finally, which is the most strange, I got this:

    Code (Log):
    1.     Build completed with a result of 'Succeeded'
    2.     UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    But the output folder is empty, and just to be sure, the project folder doesn't have any new file. So... nothing happens, What I am missing? How can I fix the error?

    It's my first time using Unity so maybe I had forgotten to do something, but no idea. If I try with another option (like PC), it works.

    My project was empty, I mean, I tried to build an empty project to know how much sized (mb) the base of any project and I found that it produces an error. I also tried to export it but first adding a few cubes (nothing of scripts, just cubes) but also didn't work.

    PS: I wasn't sure where to post this, it's also my first time in the Unity forums :)
     
  2. Enderlook

    Enderlook

    Joined:
    Dec 4, 2018
    Posts:
    52
    I've just discovered that Unity doesn't support special characters as `ó` so I change that to `o` in my project folder.