Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Dragoan · Apr 10, 2017 at 08:28 AM · webglfacebookbuild errorpython

WebGL build error in 5.6 problem with python script

Unity recently added official Facebook WebGL and gameroom support, which is something that is greatly appreciated. I updated my project and built a WebGL build (which previously built just fine normally) to find it spit out an error and not make any files because the build failed. I've read around and apparently back in 2015 people were getting a similar error, so I've been trying every fix I can find in the book.

I've moved my project folder, messed with my environment variables, ran as administrator, downloaded the beta versions and tried them, installed python files, deleted python files, nothing seems to work. My game used to build to WebGL just fine because my team has been looking to focus on web development, and this has really just thrown a wrench in our plans. If anybody can decipher or send me a link to a thread where this was solved I would be very grateful, I've been googling for days.

Here's the two errors I get in the unity window when it finishes building:

 Exception: Failed building WebGL Player.
 UnityEditor.WebGL.ProgramUtils.StartProgramChecked (System.Diagnostics.ProcessStartInfo p) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/ProgramUtils.cs:48)
 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:394)
 UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:437)
 UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:872)
 UnityEditor.Facebook.BuildProcessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/Facebook/Extensions/Managed/BuildProcessor.cs:117)
 UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, 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, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
 UnityEditor.HostView:OnGUI()

and the second:

 Failed running "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc" @"D:\GrenadeTree\DuckDodge\Duck n' Dodge\Assets\..\Temp\emcc_arguments.resp"
 
 stdout:
 stderr:WARNING:root:--separate-asm works best when compiling to HTML. otherwise, you must yourself load the '.asm.js' file that is emitted separately, and must do so before loading the main '.js` file
 error: failure to execute js library "D:\GrenadeTree\DuckDodge\Duck n' Dodge\Assets\Plugins\WebGL\HandleIO.jslib": SyntaxError: Unexpected token {,,SyntaxError: Unexpected token {    at Object.LibraryManager.load (eval at globalEval (D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:105:8), <anonymous>:173:14)    at JSify (eval at globalEval (D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:105:8), <anonymous>:59:20)    at D:\GrenadeTree\DuckDodge\Duck n' Dodge\Assets\Plugins\WebGL\HandleIO.jslib (D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:208:3)    at Module._compile (module.js:460:26)    at Object.Module._extensions..js (module.js:478:10)    at Module.load (module.js:355:32)    at Function.Module._load (module.js:310:12)    at Function.Module.runMain (module.js:501:10)    at startup (node.js:129:16)    at node.js:814:3preprocessed source (you can run a js engine on this to get a clearer error message sometimes):=============var HandleIO = {    SyncFiles : Function () {        FS.syncfs(false, function (err) {            //handle callback        });    }}mergeInto (LibraryManager.library, HandleIO)=============Internal compiler error in src/compiler.js! Please raise a bug report at https://github.com/kripken/emscripten/issues/ with a log of the build and the input files used to run. Exception message: "SyntaxError: Unexpected token {" | SyntaxError: Unexpected token {    at Object.LibraryManager.load (eval at globalEval (D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:105:8), <anonymous>:173:14)    at JSify (eval at globalEval (D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:105:8), <anonymous>:59:20)    at Object.<anonymous> (D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:208:3)    at Module._compile (module.js:460:26)    at Object.Module._extensions..js (module.js:478:10)    at Module.load (module.js:355:32)    at Function.Module._load (module.js:310:12)    at Function.Module.runMain (module.js:501:10)    at startup (node.js:129:16)    at node.js:814:3Traceback (most recent call last):
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc", line 13, in <module>
     emcc.run()
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 1661, in run
     final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py", line 1745, in emscripten
     call_emscripten(cmdline)
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 1842, in _main
     temp_files.run_and_clean(lambda: main(
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\tempfiles.py", line 78, in run_and_clean
     return func()
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 1847, in <lambda>
     DEBUG=DEBUG,
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 1748, in main
     temp_files=temp_files, DEBUG=DEBUG)
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 93, in emscript
     glue, forwarded_data = compiler_glue(metadata, settings, libraries, compiler_engine, temp_files, DEBUG)
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 296, in compiler_glue
     cwd=path_from_root('src'), error_limit=300)
   File "D:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\jsrun.py", line 122, in run_js
     raise Exception('Expected the command ' + str(command) + ' to finish with return code ' + str(assert_returncode) + ', but it returned with code ' + str(proc.returncode) + ' instead! Output: ' + str(ret)[:error_limit])
 Exception: Expected the command ['D:/Program Files (x86)/Unity/Editor/Data\\Tools\\nodejs\\node.exe', '--stack_size=8192', '--max-old-space-size=2048', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\compiler.js', "D:\\GrenadeTree\\DuckDodge\\Duck n' Dodge\\Temp\\EmscriptenTemp\\tmpwmmmbe.txt", 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Audio.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Cursor.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Eval.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\FileSystem.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Logging.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Profiler.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\SystemInfo.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\UnetWebSocket.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Video.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebCam.js', 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebRequest.js', "D:\\GrenadeTree\\DuckDodge\\Duck n' Dodge\\Assets\\Plugins\\WebGL\\HandleIO.jslib", "D:\\GrenadeTree\\DuckDodge\\Duck n' Dodge\\Assets\\Plugins\\WebGL\\GameSparks.jslib", "D:\\GrenadeTree\\DuckDodge\\Duck n' Dodge\\Assets\\Plugins\\WebGL\\GameAnalyticsUnity.jslib", 'D:\\Program Files (x86)\\Unity\\Editor\\Data\\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
 UnityEditor.HostView:OnGUI()

Is the new unity installer missing some file, or changed one it needs for webGL? I'm almost considering reverting back to an old version and just building for facebook the old way so it will work. Also, here's a link to where my game is now for the curious: http://www.indiedb.com/games/duck-n-dodge

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Marco-Trivellato · Apr 13, 2017 at 09:05 AM

Looks like the problem might be in HandleIO.jslib:

HandleIO.jslib": SyntaxError: Unexpected token {,,

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dragoan · Apr 14, 2017 at 12:12 AM 0
Share

Your mentioning of that led me to try some new things. I haven't been able to fix my problem, but I did find another threat that's kind of similar here: https://forum.unity3d.com/threads/webassembly-build-error.455761/

In it there's a dev that says they have a fix, but it's not applied yet. So I could wait for a new version of unity, or do you know anything about that particular file? It's really short, and when I tried to edit it, it crashed my machine, so I clearly need to know what that file is doing before changing it!

avatar image
0

Answer by ypoeymirou · Apr 12, 2017 at 02:24 PM

Same issue on my side :-(

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Dragoan · Apr 27, 2017 at 07:31 AM

Aha, I have finally fixed my issue after many hours of reinstalling and testing webGL builds. My issue was in a file: Plugins/WebGL/HandleIO.jslib, and when I removed it the game was able to make a build. Finally!

It actually mentioned that file in my error log I had posted, but I thought it was a file inside of the python folders, turns out it wasn't. So if you have that error, try and search for that file, it seems to wreck stuff.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Marco-Trivellato · Apr 27, 2017 at 08:04 AM 0
Share

HandleIO.jslib is what I mentioned in my Answer ;-)

avatar image
0

Answer by DamiaBonet · Jul 26, 2017 at 10:17 PM

The solution is here!

https://youtu.be/lxD02XawLeQ

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Alienpope · Oct 12, 2017 at 11:36 AM 0
Share

it is not work !!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

105 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity WebGL stuck on "0% Loaded" in Facebook instant games 1 Answer

WEBGL build error only on Chrome - Abort(196) 0 Answers

webgl + Facebook Canvas not working 0 Answers

Facebook.Unity.Gameroom.dll was not registered 6 Answers

Android build works but WebGL fails (Unity 5.3.2f1) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges