Search code examples
unity-webgl

My webgl app throws error :TypeError: Module.asm.$a is undefined


The webgl app I deployed is not functioning. The app works fine when built for Android and deployed to the Playstore. I have tried updating the editor, building uncompressed, and a few other things. No luck at all. Any help would be greatly appreciated.

  TypeError: Module.asm.$a is undefined
unityFramework/Module.dynCall_viiiii@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:324120
invoke_viiiii@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:380304
@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7 line 10 > WebAssembly.instantiate:wasm-function[2589]:0x11b1c7
@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7 line 10 > WebAssembly.instantiate:wasm-function[2589]:0x11aedc
@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7 line 10 > WebAssembly.instantiate:wasm-function[26630]:0x1085431
invoke_iii@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:376825
@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7 line 10 > WebAssembly.instantiate:wasm-function[1139]:0x80fba
@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7 line 10 > WebAssembly.instantiate:wasm-function[26628]:0x108541b
invoke_vi@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:377940
@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7 line 10 > WebAssembly.instantiate:wasm-function[54318]:0x16d56aa
@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7 line 10 > WebAssembly.instantiate:wasm-function[54316]:0x16ca949
unityFramework/Module._main@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:320746
callMain@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:390526
doRun@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:390968
run@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:391132
runCaller@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:390172
removeRunDependency@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:15466
unityFramework/</unityFileSystemInit</<@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:1913
doCallback@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:116718
done@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:116882
unityFramework/reconcile/transaction.oncomplete@blob:MY_SITE_HERE/ff6fb507-3f9d-4d0d-889e-fb82539d35e7:10:110532

updated editor. NOt sure what to do. I have a working webgl app I built a few years back that worked fine.


Solution

  • Solved

    The issue was that the server was not configured for web assembly files (/wasm) and this was resolved by adding a htaccess file to the game directory as described in the Unity manual here.