Hi!
I just finished a game and I want it to be playable in the browser. I have followed the steps to save it as html5. Everything seems to be according to the youtube tutorials I have followed, except when I try to run it I get the following messages:
“Error
The following features required to run Godot projects on the Web are missing:
Cross Origin Isolation - Check web server configuration (send correct headers)
SharedArrayBuffer - Check web server configuration (send correct headers)”
What does this mean? Is there an easy way to fix it?
Thanks!
Hi, are you trying to embed the game on your own website? Or someone else’s website like itch?
1 Like
What version of Godot are you using? Did you enable threads in the html5 export?
(Google Translator)
The Cross Origin Isolation issue is a CORS issue.
Current browsers do not allow an HTML page to be opened from one server and load files from a different server unless the site of the initial page gives its consent.
To give consent, the browser makes requests to the web server, asking it.
If you are running directly from a local directory, there will be no web server, and the browser will prevent your game from running.
If you mount your page and your game on a web server it should work (I don’t know if the SharedArrayBuffer problem is related to this or not, it seems so).
In Chrome there was a switch, which can be put in the shortcut, “–disable-web-security” that, in the past, disabled CORS checks. If that still works, maybe with that you can run your game without a web server from a local directory (look here for example: https://medium.com/@beligh.hamdi/run-chrome-browser-without-cors-872747142c61)