Why Godot 4 web export can't be played?

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

I try upload the project to itch.io
and when I click play pop up the error said:

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)

is there any fix? I use Forward+ project preset

I use godot 4.0 stable

:bust_in_silhouette: Reply From: BookSloth

I had the same problem. The solution is to go into the settings of your itch.io project and enable “SharedArrayBuffer support”. That seemed to fix that error for me, since now I’m getting a different error message instead. Please let me know if that fixes it. And whether or not you also get a new error message with that enabled.

Update:
The error I was getting after the fix I suggested was caused by something wrong with my own project. Therefore I believe the fix I suggested above should work perfectly.

BookSloth | 2023-03-04 02:06

I’ve try that but when I press run button, the game goes blank grey sceen. I’ve been researching more, it seem like we have to wait for godot 4.1 for web export.

TrizG_ | 2023-03-06 04:38

I think there’s a way to do it. I’ve seen people export from godot 4 to web

bonsaipropaganda | 2023-04-21 17:24

Use Godot 3.5.X(which requires WebGL 1.0), if want to support most of browser.

Godot 4.X support webGL 2.0 (using the Compatibility rendering method)

Here is WebGL 2.0 supported browser list WebGL 2.0 | Can I use... Support tables for HTML5, CSS3, etc

Godot 4’s HTML5 exports currently cannot run on macOS and iOS due to upstream bugs with SharedArrayBuffer and WebGL 2.0.

If you want to run on Mac browser use chromium.