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
-
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
- NullReferenceException when setting 'isTextObjectScaleStatic' to false on a disabled TextMeshPro GameObject
- Shader Stripping Custom Options disappear when exiting Play mode without reloading Domain
- Decals do not get projected when 'Rendering Layer Mask' on a GameObject is 23rd Layer or above due to encoding/decoding issues
- Deriving from SearchContextAttribute doesn't always work
- Scripting API documentation is missing for macOS editor extensions
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
}