build.js:9659 Uncaught TypeError: Cannot read property 'apply' of undefined
at asm.__GLOBAL__I_000101 (build.js:9659)
at func (build.js:2412)
at callRuntimeCallbacks (build.js:1754)
at ensureInitRuntime (build.js:1784)
at doRun (build.js:9953)
at build.js:9974
here's the code (which honestly is very confusing to me since it seems circular):
var real___GLOBAL__I_000101 = asm["__GLOBAL__I_000101"];
asm["__GLOBAL__I_000101"] = function() {
assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
return real___GLOBAL__I_000101.apply(null, arguments);
};
here's the command i used to compile
./emcc -s WASM=1 -s LINKABLE=1 -g2 -DUNITY_WEBGL=1 -s PRECISE_F32=2 -s
NO_EXIT_RUNTIME=1 -s USE_WEBGL2=1 -s DISABLE_EXCEPTION_CATCHING=1 -s
TOTAL_MEMORY=268435456 -s ASSERTIONS=1 -s DEMANGLE_SUPPORT=1 --memory-init-file 1
--emit-symbol-map --separate-asm --output_eol linux -o "/tmp/compile/build.html" --pre-js
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/prejs/FileSystem.js" --pre-js
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/prejs/FullScreen.js" --pre-js
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/prejs/IntegrateWasm.js" --pre-js
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/prejs/LoaderSetup.js" --pre-js
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/prejs/MediaDevices.js" --pre-js
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/prejs/SendMessage.js" --pre-js
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/ExceptionLogger.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/Audio.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/Cursor.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/Eval.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/FileSystem.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/Logging.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/Profiler.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/SystemInfo.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/UnetWebSocket.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/Video.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/WebCam.js" --js-library
"/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/WebRequest.js"
"/home/max/dev_projects/avtrial/AV-1.4.2-Trial/Assets/Plugins/WebGL/lib.bc"
this is due to async interpreting.
Most helpful comment
this is due to async interpreting.