Webassembly.instantiate compile error

40 views
Skip to first unread message

Rohit Saini

unread,
Jun 8, 2020, 6:12:51 PM6/8/20
to emscripten-discuss
Hi All,

I am getting following error while doing WebAssembly.instantiateStreaming. Can I know where all these error messages are defined, so that I can know the exact reason of the issue. Or if someone know about this issue.  Moreover the issue is intermittent , occurs only on some machines and it sometime goes when I clear the cache.

I am using 1.39.7 emscripten version. Wasm binary size is around 50mb.

Regards,
Rohit Saini



Screenshot 2020-06-09 at 3.37.43 AM.png

Alon Zakai

unread,
Jun 8, 2020, 7:46:36 PM6/8/20
to emscripte...@googlegroups.com
"expected X bytes, fell off end" means that the wasm file is truncated - it stops too early. Perhaps only part of it was downloaded before the server stopped for some reason. The problem is likely your webserver, or the network connection.


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/bc6ba785-e510-41d5-816f-fe6614972cd0o%40googlegroups.com.

Rohit Saini

unread,
Jun 9, 2020, 5:44:32 PM6/9/20
to emscripten-discuss
Hi Alon,

But it works fine if I checked the disable cache option in chrome network panel. I am using worker and loading wasm from that worker. If I unchecked the disable cache option, then my wasm and worker script are served from disk cache. If issue would've been with my server, I should get an error in the checked disable cache case not in the unchecked one I think. Could something else be the issue like not setting enough TOTAL_MEMORY etc.?

Regards,
Rohit Saini

Alon Zakai

unread,
Jun 9, 2020, 7:07:02 PM6/9/20
to emscripte...@googlegroups.com
No, that error cannot be caused by something like TOTAL_MEMORY.

That it works fine if you disable the cache proves what the issue is: something to do with the network. Specifically, maybe the cache has bad data, or isn't working properly.

Another thing to try is to see what happens on multiple browsers or browser versions (which will have different cache behaviors, but not different wasm validation behaviors).

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages