- Home /
How do I fix a webgl build python error unity 2018
Here are the interesting parts of the error log
Failed running python "/Applications/Unity2018/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc" @"/Users/dan/apps2018/Assets/../Temp/emcc_arguments.resp"
/Applications/Unity2018/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/src/library_pthread_stub.js'] to finish with return code 0, but it returned with code 1 instead! Output: // The Module object: Our interface to the outside world. We import// and export values on it, and do the work to get that through// closure compiler if necessary. There are various ways Module can be used:// 1. Not defined. We create it here// 2. A function parameter, function(Module) { ..gener UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:182 at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:89 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Answer by fwalkerCirca · Aug 27, 2018 at 06:31 PM
Did you ever figure this out?? We are in the same boat !
Answer by gaz1234 · Aug 30, 2018 at 11:21 AM
I have a similar problem with webgl builds on a PC with python3.6 installed.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: File "C:\Users\gareth\AppData\Local\Programs\Python\Python36\lib\site.py", line 177 file=sys.stderr) ^ SyntaxError: invalid syntax
Answer by Rouddem · Mar 22, 2021 at 01:11 PM
I've got the same issue.
My context:
I'm building the application from Jenkins.
Jenkins runs a python script (thanks to shiningpanda plugin), specifying 3.6 (local installed) version
My python script calls Unity, with the command line "Unity.exe -batchmode ..."
Unity builds the app with the module UnityWebGL. UnityWebGL also builds at some point with Python (in my case 2.7). You can find the location here : "{Unity_install_path}\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python..."
This part does its stuff, but instead of staying with 2.7 libs, mixes up with some 3.6 libs
I figured out Jenkins was setting up an Python 3.6 "context", and UnityWebGL command is a bit lost between the two versions. You are probably is the same situation where something creates this python "context".
To fix it, I stopped using the Jenkins' Python plugin and run my python script directly from a batch commandline. In my case, removing "Environment variables" had not effect. Probably it can be a lead for yours :)
Your answer
Follow this Question
Related Questions
Error 127 on loading game in browser 1 Answer
WebGL and I/O 1 Answer
Capture Screenshot not working in WebGL 1 Answer
Chrome 56 WebGL error 1 Answer
WebGL compilation Error 2 Answers