- Home /
GL build won't run on Chrome
Am participating in the current Ludum Dare and figured as Chrome's cut off the old webplayer I'd take this opportunity to get to know the Html5/WebGL exporter. Sadly, even running a very basic project (a little rotation scripting, some uGUI) causes the output player to trip up Chrome, with the error message:
An error occurred running the Unity content on this page. See your browser's JavaScript console for more info. The error was: Uncaught SyntaxError: Unexpected Number
The console reads:
Invoking error handler due to
Uncaught SyntaxError: Unexpected number
fileloader.js:3 Uncaught SyntaxError: Unexpected number
localhost/:33 run() called, but dependencies remain, so not runningModule.printErr @ localhost/:33
localhost/:29 42
localhost/:33 42Module.printErr @ localhost/:33
localhost/:33 warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demanglingModule.printErr @ localhost/:33
UnityConfig.js:74 Invoking error handler due to
Uncaught abort() at Error
at jsStackTrace (http://localhost:63291/Release/Sat2126.js:992:13)
at stackTrace (http://localhost:63291/Release/Sat2126.js:1009:22)
at abort (http://localhost:63291/Release/Sat2126.js:3111539:25)
at Array.b42 (http://localhost:63291/Release/Sat2126.js:3107288:72)
at Array.__Z28RuntimeInvoker_t17_t536_t536P10MethodInfoPvPS1_ [RuntimeInvoker_t17_t536_t536?1(void**, undefined?S?*)] (http://localhost:63291/Release/Sat2126.js:2925020:40)
at __ZN13MemoryManager8AllocateEji10MemLabelIdiPKci [MemoryManager::Allocate?1(unsigned int, int)] (http://localhost:63291/Release/Sat2126.js:910817:41)
at __Z15malloc_internaljj10MemLabelIdiPKci [malloc_internal?1(unsigned int, unsigned int)] (http://localhost:63291/Release/Sat2126.js:910644:8)
at __GLOBAL__I_a1646 (http://localhost:63291/Release/Sat2126.js:938223:8)
at __ATINIT__.push.func (http://localhost:63291/Release/Sat2126.js:1326:1114)
at callRuntimeCallbacks (http://localhost:63291/Release/Sat2126.js:1092:7)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
:63291/Release/Sat2126.js:3111539 Uncaught abort() at Error
at jsStackTrace (http://localhost:63291/Release/Sat2126.js:992:13)
at stackTrace (http://localhost:63291/Release/Sat2126.js:1009:22)
at abort (http://localhost:63291/Release/Sat2126.js:3111539:25)
at Array.b42 (http://localhost:63291/Release/Sat2126.js:3107288:72)
at Array.__Z28RuntimeInvoker_t17_t536_t536P10MethodInfoPvPS1_ [RuntimeInvoker_t17_t536_t536?1(void**, undefined?S?*)] (http://localhost:63291/Release/Sat2126.js:2925020:40)
at __ZN13MemoryManager8AllocateEji10MemLabelIdiPKci [MemoryManager::Allocate?1(unsigned int, int)] (http://localhost:63291/Release/Sat2126.js:910817:41)
at __Z15malloc_internaljj10MemLabelIdiPKci [malloc_internal?1(unsigned int, unsigned int)] (http://localhost:63291/Release/Sat2126.js:910644:8)
at __GLOBAL__I_a1646 (http://localhost:63291/Release/Sat2126.js:938223:8)
at __ATINIT__.push.func (http://localhost:63291/Release/Sat2126.js:1326:1114)
at callRuntimeCallbacks (http://localhost:63291/Release/Sat2126.js:1092:7)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
Any clues, folks? Would love to be able to upload a webplayer - much more convenient that multiple downloads.
Running Windows 7 64bit. Many thanks in advance!
--Rev
PS: Bonus question! Does anybody know if the WebGL players work for Linux?
It does not work to OPERA, IE, GOOGLE CHRO$$anonymous$$E, FIREFOX. works on Vivaldi, Chromium in windows 10
Answer by Schubkraft · Apr 20, 2015 at 11:57 AM
Chrome introduced a bug with their update to version 42 last week. This bug makes their JS engine trip over for sizeable JS projects (not just Unity). They guys at Google have a fix ready and will deploy it soonish hopefully.
In the meantime Firefox is your friend.
WebGL should just work in FF and Chrome (exception due to the current bug) on Linux. The whole project runs in the browser.
Waaaagh! Sorry about the delayed response, Schubkraft. Great answer - still waiting on Chrome, though... grumble...
The current 42.0.2311.135 m should not show this issue anymore. If it does it might be something else and a bug report with your project attached would then be the best course of action.
I'm getting this error still in chrome Version 44.0.2403.130 m
I get this error when I try to the "Build and Run" command from Unity (I'm on 5.2.2f1 64bit) to host the WebGL content. But when I use another webserver the exported content works fine for me using Chrome 46.0.2490.86. So to me that seems like a bug in the how Unity is trying to serve the files. Specifically it looks like HTTP header content is being injected into fileloader.js when it is being served to the client.
Why vote this as best answer , but is not? I'm getting the same error on firefox and event on chrome, please help
Don't write comments as answers!
I've converted your answer to a proper comment.
$$anonymous$$ake sure you use comments and only if you want to give a solution to a question, add an answer.
Your answer
Follow this Question
Related Questions
Unity3d Webgl build and angularjs 1 Answer
Chrome and Webplayer Builds 0 Answers
Playerprefs issue in WebGL 0 Answers
WebGL Fast Left Mouse Click issues (Sometimes they are not recognized in Chrome) 0 Answers