Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

I have also stubbed my toe on the SharedArrayBuffer problem and would like a way to enable the needed headers.

However, I also have some workaround ideas for those who are encountering this issue. They may or may not work for you and may or may not cause issues especially with audio.

SharedArrayBuffer seems to be used to share data between threads in multithreaded applications, so either designing an app with no multithreading and/or disabling pthreads in the WASM exporter may avoid the error.

Things to consider trying:

  • If using Emscripten or any language to web exporter, see if there is an option to disable pthreads, multithreading, or similar
  • Similar to above, see if there is a “compatibility” setting for export (this worked for me in a Love2D export to web via Love.js)
  • I saw one suggestion to explicitly assign SharedArrayBuffer to ArrayBuffer as such in the index.html in a script element: SharedArrayBuffer = ArrayBuffer; . I guess this is worth a try, but it sure looks like it would break a lot of stuff to me.
  • Advanced untried idea: For audio, consider signaling the browser and play audio in JavaScript instead of from WASM. This would require some non-trivial extra programming in both the JavaScript and in the WASM artifact