Cannot load game from S3 bucket, getting webassembly errors in console (SOLVED)

So, I’m linking to my game from a static react site hosted off of an s3 bucket. When I try to load the game from a link within my site, the dmloader file loads, and I see the defold logo, but nothing else happens and I get these following messages in the console.

dmloader.js:347 wasm streaming compile failed: TypeError: WebAssembly.instantiate(): Import #0 module=“env” error: module is not an object or function
dmloader.js:347 falling back to ArrayBuffer instantiation
dmloader.js:347 failed to asynchronously prepare wasm: TypeError: WebAssembly.instantiate(): Import #0 module=“env” error: module is not an object or function
TypeError: WebAssembly.instantiate(): Import #0 module=“env” error: module is not an object or function
Uncaught (in promise) RuntimeError: abort(TypeError: WebAssembly.instantiate(): Import #0 module=“env” error: module is not an object or function). Build with -s ASSERTIONS=1 for more info.

I’m also getting this error within defold whenever I build.
WARNING:GAMESYS: The collision object ‘/_generated_1dadb1cc.collisionobjectc’ has a tile map containing more than 16 layers, the rest will be ignored.

Are these related? Should I be worried about the GAMESYS warning? It seems to have no impact on the game itself.

I’m not sure how to proceed with the wasm errors in console. An earlier build was working just fine.

My hosted game can be found at:
https://www.shekdigital.com/game/game.html

I don’t think the are related. Don’t you always get that error, even on a desktop build?

Is it a cache problem perhaps? Does it work if you host the files somewhere else (GitHub pages or local web server)?

sorry to say I am not expert as @britzl but do you pass a module as require which maybe not find? does this module is present at files that game search? sth else dont know just made me impression that ask for a module many times like does not find it. Thanks and sorry for intervene

Yea I get the GAMESYS error on desktop builds as well.

I think it is a cache problem, since I uploaded to netlify and it works just fine.
https://xenodochial-golick-ba7760.netlify.app/

1 Like

Sorted out my issue. Thanks for all your help.

What was the issue? (For future readers)

The issue was with my Cloudfront configuration. I had to set cache-control headers for the game directory to have a TTL Min and TTL Max of 0

2 Likes

Thanks for the info!