Search Issue Tracker
By Design
Votes
0
Found in
2017.2.0f3
Issue ID
968373
Regression
No
[WebGL] "Uncaught SyntaxError: missing ) after argument list" appear in browser after build
How to reproduce:
1. Download attached project file and open "Init" Scene
2. Switch Platform to WebGL
3. Press Build & Run
Expected result: Game should work without any javascript errors
Actual result: Built game didn't work, "SyntaxError: missing ) after argument list", "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" error appears in the console.
Reproduced with: 5.6.4p2, 2017.1.2p2, 2017.2.0p2, 2017.3.0b9, 2018.1.0a4
Tested on: Chrome, Firefox, Edge
Comments (2)
-
sacb0y
Nov 15, 2018 05:29
This needs explanation
-
durp
Feb 05, 2018 03:39
This is marked as resolved. Where is the missing )? Could I just insert it into my UnityLoader.js or do I need to get a new version of unity and rebuild?
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shortcut window searchbar loses edit mode when typing into searchbar after any action is made to any shortcut
- [Linux] Preferences directory is not created when the Editor is installed or launched
- Docked UI Builder corrupts when the domain isn't reloaded after deleting an element
- [VFX] Incorrect Behavior with SG and Scale in Update
- Memory leaks are caused when using MeshToSDFBaker.Dispose()
Resolution Note:
The canvas object can be accessed in the following ways:
from html: gameInstance.Module.canvas
from js plugin: Module.canvas
however, you can only access the canvas object only once the game instance has been initialized. That can be done on onRuntimeInitialized event, for example:
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/<buildname>.json", { Module: {
onRuntimeInitialized: function() {
var c = this.canvas;
// do something with c
}