Closed iffy closed 1 year ago
I've tried these Emscripten versions with no luck: 3.1.19, 2.0.34, 1.39.20, 1.39.7, 1.40.1 Also tried Nim 1.4.0 but got the same error.
It's not my code (though it's probably something I'm doing wrong). Here's a fresh nicoboot-created repo that reproduces the error for me: https://github.com/iffy/nico-issue-97
Steps to duplicate:
git clone https://github.com/iffy/nico-issue-97.git
cd nico-issue-97
./buildindocker.sh
Then run a webserver (I did python -m http.server 8090
and browsed to http://127.0.0.1:8090)
By following what they did in https://github.com/emscripten-core/emscripten/issues/11295 I replaced all instances of nicogame
with canvas
in index.html
and then got this error:
Uncaught (in promise) RuntimeError: Aborted(No EM_ASM constant found at address 18312)
abort http://127.0.0.1:8090/app.js:1
_emscripten_asm_const_int http://127.0.0.1:8090/app.js:1
createExportWrapper http://127.0.0.1:8090/app.js:1
callMain http://127.0.0.1:8090/app.js:1
doRun http://127.0.0.1:8090/app.js:1
run http://127.0.0.1:8090/app.js:1
runCaller http://127.0.0.1:8090/app.js:1
removeRunDependency http://127.0.0.1:8090/app.js:1
receiveInstance http://127.0.0.1:8090/app.js:1
receiveInstantiationResult http://127.0.0.1:8090/app.js:1
promise callback*createWasm/instantiateAsync/< http://127.0.0.1:8090/app.js:1
promise callback*instantiateAsync http://127.0.0.1:8090/app.js:1
createWasm http://127.0.0.1:8090/app.js:1
<anonymous> http://127.0.0.1:8090/app.js:1
building this project using
. /path/to/emsdk/emsdk_env.sh
nimble webr
nimhttpd # to run the webserver
then going to localhost:1337/app.html
works for me.
I'm not using docker to build it since I don't have docker. I am using EMSDK 2.0.13
Maybe it's not working because you're going to index.html rather than the html file generated from your app.
The app should probably be generated to index.html
instead of <appname>.html
YES, thank you! I was looking at index.html
instead of <appname>.html
I'm compiling with Nim 1.6.6 and Emscripten 3.1.19 with
nimble webr
and when I load it in Firefox I get this error in the console (and no game shows up):I'm about to try with earlier Emscripten versions to see if that's the reason. Do you happen to have a recommended Emscripten version?