- Home /
I get an error when I try to export my game to WebGl
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/me/Desktop/development/unity_projects/unity5/shapeClicker/Shape Clicker/Assets/../Temp/emcc_arguments.resp"
stdout: WARNING: sanity check failed to run [Errno 13] Permission denied: 'C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/emscripten.config_sanity' WARNING: sanity check failed to run [Errno 13] Permission denied: 'C:\Program ...
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)
It happens after native compile to JS.
I've tried with the memory limit at 256 and 512.
I am using Unity 5.1.1f1.
I am using a 64 bit windows machine.
I have tried it in slow and fastest mode.
I found these. http://answers.unity3d.com/questions/952308/failed-build-webgl.html http://forum.unity3d.com/threads/failed-building-webgl-player.321433/
The second one seems like there is a bug in Unity. I tried to comment but apparently I don't have the privileges. I installed cmake but it didn't work. I also use Visual Studio to write my code.
Anybody have any experience with this bug and know more about it? Thanks.
Answer by Ricna · Feb 20, 2018 at 10:00 AM
Close the Unity.
Remove the Library folder of you project to re-import and generate all those files again.
Edit the file C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\emscripten.config
Change the value --stack_size to 2048
Open your project and Build.
Under NO CIRCU$$anonymous$$STANCES do this to your project as this advice has broken my entire project. Luckily I didn't SHIFT + delete the Library folder so I was able restore it from the Recycle bin to get the project to my final working state.
Answer by vdwtanner · Jul 09, 2015 at 04:17 PM
Hi, I don't know too much about it, but from what I have found it seems like it is possible to revert back to a 5.0.2 and export at Fast (but not fastest). Haven't personally tried this yet, but from what I've read this sounds like a viable option until the next release.
EDIT: I was able to export just now in 5.1.0f3 64bit. Had to install CMake and run as administrator. Haven't tried building at Fast or Fastest optimizations yet, but will comment when I have results.
Did you have to do anything beyond starting cmake, like configure it or link it to unity? Or did you just start it and somehow unity knows its there.
Hi, sorry for not replying, I was out of the country for a bit and away from my PC. Once I installed C$$anonymous$$ake I ran Unity as Ad$$anonymous$$istrator. Should have specified in my first post, sorry about the confusion. Did you ever get this figured out?
Running as ad$$anonymous$$istrator solved the problem to me also (without installing anything else).
Answer by halconf20 · Oct 22, 2015 at 03:29 PM
Thank from Colombia, I run unity as Adminitrator and solved the problem all worked out great Edy
Answer by nikola82 · Aug 02, 2015 at 06:18 PM
It is possible that this bug is a file access or creating and saving new . How about using XML and filming data in a temp folder . There is no support in browsers for the operation. Maybe unity does not represent a problem but when compiling arises insurmountable error .
Do you use maybe the FUNCTION :
System.IO.File.WriteAllBytes ? or Directory.CreateDirectory ( Application.persistentDataPath ...
Hi, I used the wri$$anonymous$$llbytes function. is that the cause? how do I solve it?