Error: "Failed loading file 'projectname.wasm': Not Found" even on a server

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By PixelatedIvan

I recently tried to export my game to html5, since the game file is too big to send around on discord. When I first tried it with file://, it did not work (Failed loading file ‘projectname.wasm’: Not Found), I then heard that it had to be on a server, so I tried to put it on my website server (note this is a free byethost website), but I still got the error, I also tried enabling and disabling Runnable and Debug. The Wasm, HTML, JS, and PNG files are all there too.

NOTE: I also tried Firefox.

I recently tried to export my game to html5, since the game file is too big to send around on discord.

If all you need is sending your project over Discord, you can use an ephemeral file sharing service such as transfer.sh which allows up to 10 GB of file uploads stored for 14 days. You could even look at Instant.io for direct peer-to-peer transfers (not going through an intermediate server).

Calinou | 2018-08-13 18:29

:bust_in_silhouette: Reply From: DigitalMan

Same thing for me. So I modified the index.js file and changed the basePath since I put the export files into a sub directory. But now I get

ERROR: Failed loading file ‘index.pck’: Not Found

But that file is also in the same folder on my web server.

According to A2 Hosting you can’t just throw the web assembly files into a folder of a .net core web site and have it work. Is not compatible. I’m going to research other solutions.

DigitalMan | 2018-08-19 11:53

:bust_in_silhouette: Reply From: kiroslee

If you use IIS on windows, add MIME type in IIS config
.wasm application/wasm
.pck application/pck
This will work~

This worked for me. Thanks.

Jams | 2018-12-20 03:33