Search Unity

Error on WebGl Build if a jslib file is added (a complex Tincan js library actually)

Discussion in 'Web' started by miuoctav, May 17, 2018.

  1. miuoctav

    miuoctav

    Joined:
    Nov 21, 2016
    Posts:
    5
    Those are log errors (tried to fix it, nothing worked).I also uploaded the jslib file that must be included in project:

    Failed running "C:\Program Files\Unity2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" "C:\Program Files\Unity2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc" @"D:\HTML_JS\HTML_JS\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:\HTML_JS\HTML_JS\Assets\Plugins\JS\TINCAN_min.jslib": SyntaxError: Unexpected identifier,,SyntaxError: Unexpected identifier at Object.load (eval at globalEval (C:\Program Files\Unity2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:105:8), <anonymous>:173:14) at JSify (eval at globalEval (C:\Program Files\Unity2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:105:8), <anonymous>:59:20) at D:\HTML_JS\HTML_JS\Assets\Plugins\JS\TINCAN_min.jslib (C:\Program Files\Unity2018.1.0f2\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src\compiler.js:208:3) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7)preprocessed source (you can run a js engine on this to get a clearer error message sometimes):=============mergeInto(LibraryManager.library, { var CryptoJS = CryptoJS || function (a, b) { var c = {}, d = c.lib = {}, e = function () { }, f = d.Base = { extend: function (a) { e.prototype = this; var b = new e; return a && b.mixIn(a), b.hasOwnProperty("init") || (b.init = function () { b.$super.init.apply(this, arguments) }), b.init.prototype = b, b.$super = this, b }, create: function () { var a = this.extend(); return a.init.apply(a, arguments), a }, init: function () { }, mixIn: function (a) { for (var b in a)a.hasOwnProperty(b) && (this = a); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, g = d.WordArray = f.extend({ init: function (a, c) { a = this.words = a || [], this.sigBytes = c != b ? c : 4 * a.length }, toString: function (a) { return (a || i).stringify(this) }, concat: function (a) { var b = this.words, c = a.words, d = this.sigBytes; if (a = a.sigBytes, this.clamp(), d % 4)for (var e = 0; e < a; e++)b[d + e >>> 2] |= (c[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((d + e) % 4); else if (65535 < c.length)for (e = 0; e < a; e += 4)b[d + e >>> 2] = c[e >>> 2]; else b.push.apply(b, c); return this.sigBytes += a, this }, clamp: function () { var b = this.words, c = this.sigBytes; b[c >>> 2] &= 4294967295 << 32 - 8 * (c % 4), b.length = a.ceil(c / 4) }, clone: function () { var a = f.clone.call(this); return a.words = this.words.slice(0), a }, random: function (b) { for (var c = [], d = 0; d < b; d += 4)c.push(4294967296 * a.random() | 0); return new g.init(c, b) } }), h = c.enc = {}, i = h.Hex = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var c = [], d = 0; d < a; d++) { var e = b[d >>> 2] >>> 24 - 8 * (d % 4) & 255; c.push((e >>> 4).toString(16)), c.push((15 & e).toString(16)) } return c.join("") }, parse: function (a) { for (var b = a.length, c = [], d = 0; d < b; d += 2)c[d >>> 3] |= parseInt(a.substr(d, 2), 16) << 24 - 4 * (d % 8); return new g.init(c, b / 2) } }, j = h.Latin1 = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var c = [], d = 0; d < a; d++)c.push(String.fromCharCode(b[d >>> 2] >>> 24 - 8 * (d % 4) & 255)); return c.join("") }, parse: function (a) { for (var b = a.length, c = [], d = 0; d < b; d++)c[d >>> 2] |= (255 & a.charCodeAt(d)) << 24 - 8 * (d % 4); return new g.init(c, b) } }, k = h.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(j.stringify(a))) } catch (a) { throw Error("Malformed UTF-8 data") } }, parse: function (a) { return j.parse(unescape(encodeURIComponent(a))) } }, l = d.BufferedBlockAlgorithm = f.extend({ reset: function () { this._data = new g.init, this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = k.parse(a)), this._data.concat(a), this._nDataBytes += a.sigBytes }, _process: function (b) { var c = this._data, d = c.words, e = c.sigBytes, f = this.blockSize, h = e / (4 * f), h = b ? a.ceil(h) : a.max((0 | h) - this._minBufferSize, 0); if (b = h * f, e = a.min(4 * b, e), b) { for (var i = 0; i < b; i += f)this._doProcessBlock(d, i); i = d.splice(0, b), c.sigBytes -= e } return new g.init(i, e) }, clone: function () { var a = f.clone.call(this); return a._data = this._data.clone(), a }, _minBufferSize: 0 }); d.Hasher = l.extend({ cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a), this.reset() }, reset: function () { l.reset.call(this), this._doReset() }, update: function (a) { return this._append(a), this._process(), this }, finalize: function (a) { return a && this._append(a), this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, c) { return new a.init(c).finalize(b) } }, _createHmacHelper: function (a) { return function (b, c) { return new m.HMAC.init(a, c).finalize(b) } } }); var m = c.algo = {}; return c }(Math);!function () { var a = CryptoJS, b = a.lib, c = b.WordArray, d = b.Hasher, e = [], b = a.algo.SHA1 = d.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (a, b) { for (var c = this._hash.words, d = c[0], f = c[1], g = c[2], h = c[3], i = c[4], j = 0; 80 > j; j++) { if (16 > j)e[j] = 0 | a[b + j]; else { var k = e[j - 3] ^ e[j - 8] ^ e[j - 14] ^ e[j - 16]; e[j] = k << 1 | k >>> 31 } k = (d << 5 | d >>> 27) + i + e[j], k = 20 > j ? k + ((f & g | ~f & h) + 1518500249) : 40 > j ? k + ((f ^ g ^ h) + 1859775393) : 60 > j ? k + ((f & g | f & h | g & h) - 1894007588) : k + ((f ^ g ^ h) - 899497514), i = h, h = g, g = f << 30 | f >>> 2, f = d, d = k } c[0] = c[0] + d | 0, c[1] = c[1] + f | 0, c[2] = c[2] + g | 0, c[3] = c[3] + h | 0, c[4] = c[4] + i | 0 }, _doFinalize: function () { var a = this._data, b = a.words, c = 8 * this._nDataBytes, d = 8 * a.sigBytes; return b[d >>> 5] |= 128 << 24 - d % 32, b[(d + 64 >>> 9 << 4) + 14] = Math.floor(c / 4294967296), b[(d + 64 >>> 9 << 4) + 15] = c, a.sigBytes = 4 * b.length, this._process(), this._hash }, clone: function () { var a = d.clone.call(this); return a._hash = this._hash.clone(), a } }); a.SHA1 = d._createHelper(b), a.HmacSHA1 = d._createHmacHelper(b)}();var CryptoJS = CryptoJS || function (a, b) { var c = {}, d = c.lib = {}, e = function () { }, f = d.Base = { extend: function (a) { e.prototype = this; var b = new e; return a && b.mixIn(a), b.hasOwnProperty("init") || (b.init = function () { b.$super.init.apply(this, arguments) }), b.init.prototype = b, b.$super = this, b }, create: function () { var a = this.extend(); return a.init.apply(a, arguments), a }, init: function () { }, mixIn: function (a) { for (var b in a)a.hasOwnProperty(b) && (this = a); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, g = d.WordArray = f.extend({ init: function (a, c) { a = this.words = a || [], this.sigBytes = c != b ? c : 4 * a.length }, toString: function (a) { return (a || i).stringify(this) }, concat: function (a) { var b = this.words, c = a.words, d = this.sigBytes; if (a = a.sigBytes, this.clamp(), d % 4)for (var e = 0; e < a; e++)b[d + e >>> 2] |= (c[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((d + e) % 4); else if (65535 < c.length)for (e = 0; e < a; e += 4)b[d + e >>> 2] = c[e >>> 2]; else b.push.apply(b, c); return this.sigBytes += a, this }, clamp: function () { var b = this.words, c = this.sigBytes; b[c >>> 2] &= 4294967295 << 32 - 8 * (c % 4), b.length = a.ceil(c / 4) }, clone: function () { var a = f.clone.call(this); return a.words = this.words.slice(0), a }, random: function (b) { for (var c = [], d = 0; d < b; d += 4)c.push(4294967296 * a.random() | 0); return new g.init(c, b) } }), h = c.enc = {}, i = h.Hex = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var c = [], d = 0; d < a; d++) { var e = b[d >>> 2] >>> 24 - 8 * (d % 4) & 255; c.push((e >>> 4).toString(16)), c.push((15 & e).toString(16)) } return c.join("") }, parse: function (a) { for (var b = a.length, c = [], d = 0; d < b; d += 2)c[d >>> 3] |= parseInt(a.substr(d, 2), 16) << 24 - 4 * (d % 8); return new g.init(c, b / 2) } }, j = h.Latin1 = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var c = [], d = 0; d < a; d++)c.push(String.fromCharCode(b[d >>> 2] >>> 24 - 8 * (d % 4) & 255)); return c.join("") }, parse: function (a) { for (var b = a.length, c = [], d = 0; d < b; d++)c[d >>> 2] |= (255 & a.charCodeAt(d)) << 24 - 8 * (d % 4); return new g.init(c, b) } }, k = h.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(j.stringify(a))) } catch (a) { throw Error("Malformed UTF-8 data") } }, parse: function (a) { return j.parse(unescape(encodeURIComponent(a))) } }, l = d.BufferedBlockAlgorithm = f.extend({ reset: function () { this._data = new g.init, this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = k.parse(a)), this._data.concat(a), this._nDataBytes += a.sigBytes }, _process: function (b) { var c = this._data, d = c.words, e = c.sigBytes, f = this.blockSize, h = e / (4 * f), h = b ? a.ceil(h) : a.max((0 | h) - this._minBufferSize, 0); if (b = h * f, e = a.min(4 * b, e), b) { for (var i = 0; i < b; i += f)this._doProcessBlock(d, i); i = d.splice(0, b), c.sigBytes -= e } return new g.init(i, e) }, clone: function () { var a = f.clone.call(this); return a._data = this._data.clone(), a }, _minBufferSize: 0 }); d.Hasher = l.extend({ cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a), this.reset() }, reset: function () { l.reset.call(this), this._doReset() }, update: function (a) { return this._append(a), this._process(), this }, finalize: function (a) { return a && this._append(a), this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, c) { return new a.init(c).finalize(b) } }, _createHmacHelper: function (a) { return function (b, c) { return new m.HMAC.init(a, c).finalize(b) } } }); var m = c.algo = {}; return c }(Math);!function (a) { for (var b = CryptoJS, c = b.lib, d = c.WordArray, e = c.Hasher, c = b.algo, f = [], g = [], h = function (a) { return 4294967296 * (a - (0 | a)) | 0 }, i = 2, j = 0; 64 > j;) { var k; a:{ k = i; for (var l = a.sqrt(k), m = 2; m <= l; m++)if (!(k % m)) { k = !1; break a } k = !0 } k && (8 > j && (f[j] = h(a.pow(i, .5))), g[j] = h(a.pow(i, 1 / 3)), j++), i++ } var n = [], c = c.SHA256 = e.extend({ _doReset: function () { this._hash = new d.init(f.slice(0)) }, _doProcessBlock: function (a, b) { for (var c = this._hash.words, d = c[0], e = c[1], f = c[2], h = c[3], i = c[4], j = c[5], k = c[6], l = c[7], m = 0; 64 > m; m++) { if (16 > m)n[m] = 0 | a[b + m]; else { var o = n[m - 15], p = n[m - 2]; n[m] = ((o << 25 | o >>> 7) ^ (o << 14 | o >>> 18) ^ o >>> 3) + n[m - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[m - 16] } o = l + ((i << 26 | i >>> 6) ^ (i << 21 | i >>> 11) ^ (i << 7 | i >>> 25)) + (i & j ^ ~i & k) + g[m] + n[m], p = ((d << 30 | d >>> 2) ^ (d << 19 | d >>> 13) ^ (d << 10 | d >>> 22)) + (d & e ^ d & f ^ e & f), l = k, k = j, j = i, i = h + o | 0, h = f, f = e, e = d, d = o + p | 0 } c[0] = c[0] + d | 0, c[1] = c[1] + e | 0, c[2] = c[2] + f | 0, c[3] = c[3] + h | 0, c[4] = c[4] + i | 0, c[5] = c[5] + j | 0, c[6] = c[6] + k | 0, c[7] = c[7] + l | 0 }, _doFinalize: function () { var b = this._data, c = b.words, d = 8 * this._nDataBytes, e = 8 * b.sigBytes; return c[e >>> 5] |= 128 << 24 - e % 32, c[(e + 64 >>> 9 << 4) + 14] = a.floor(d / 4294967296), c[(e + 64 >>> 9 << 4) + 15] = d, b.sigBytes = 4 * c.length, this._process(), this._hash }, clone: function () { var a = e.clone.call(this); return a._hash = this._hash.clone(), a } }); b.SHA256 = e._createHelper(c), b.HmacSHA256 = e._createHmacHelper(c)}(Math), function () { var a = CryptoJS, b = a.lib, c = b.WordArray, d = a.enc; d.Base64 = { stringify: function (a) { var b = a.words, c = a.sigBytes, d = this._map; a.clamp(); for (var e = [], f = 0; f < c; f += 3)for (var g = b[f >>> 2] >>> 24 - f % 4 * 8 & 255, h = b[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, i = b[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, j = g << 16 | h << 8 | i, k = 0; k < 4 && f + .75 * k < c; k++)e.push(d.charAt(j >>> 6 * (3 - k) & 63)); <message truncated>


    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:408)
    UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:451)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:920)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:285)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:182
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:89
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     

    Attached Files: