• Building
  • Custom web export only has black screen

When I export it with the default template, it's fine. But I decided to optimize it. After a lot of error messages, I managed to get a template. But when I use it, I only get a black screen! What went wrong? Did I remove too many modules? I went on the online Godot build options generator and just disabled as many things as i could. Here's my custom.py file:

# Generated using https://godot-build-options-generator.github.io

disable_3d = "yes"
tools="no"
optimize = "size"
disable_advanced_gui = "yes"
deprecated = "no"
minizip = "no"
module_arkit_enabled = "no"
module_bmp_enabled = "no"
module_bullet_enabled = "no"
module_camera_enabled = "no"
module_csg_enabled = "no"
module_dds_enabled = "no"
module_enet_enabled = "no"
module_etc_enabled = "no"
module_gdnative_enabled = "no"
module_gdnavigation_enabled = "no"
module_gridmap_enabled = "no"
module_hdr_enabled = "no"
module_jpg_enabled = "no"
module_jsonrpc_enabled = "no"
module_mobile_vr_enabled = "no"
module_ogg_enabled = "no"
module_opensimplex_enabled = "no"
module_opus_enabled = "no"
module_regex_enabled = "no"
module_stb_vorbis_enabled = "no"
module_tga_enabled = "no"
module_theora_enabled = "no"
module_tinyexr_enabled = "no"
module_upnp_enabled = "no"
module_visual_script_enabled = "no"
module_vorbis_enabled = "no"
module_webm_enabled = "no"
module_webp_enabled = "no"

Hmm, and have you followed the following page to make sure you can successfully build an export template for the web at all?

https://docs.godotengine.org/en/stable/development/compiling/compiling_for_web.html

Mind, I haven't compiled export templates at all so take this with a grain of salt, but I'm thinking if you don't get a working web export by following the above documentation then your issue is probably not with those compilation options but something else perhaps.

I was following the page. Someone on the Discord server told me that I downloaded the wrong version of Godot so I went and downloaded the right version, but then I just got another error ("unknown file open mode wx+").

@exuin said: another error ("unknown file open mode wx+").

That sounds like a permissions issue, wx seems like write permission lemme google that here...

https://en.wikipedia.org/wiki/File-system_permissions

r if reading permitted, otherwise - w if writing permitted, otherwise - x executing permitted, otherwise -

Looks like 0333 or write and execute allowed but I've no idea what the + would indicate tho so perhaps I'm wrong. Ah there it is...

+ (plus) suffix indicates an access control list that can control additional permissions.

I'm guessing the error is from your server?

The specific line that throws the error is modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags} in line 9 of the js file.

Edit: Uploaded the file to itch.io, still doesn't work on its servers.

Does it compile and run successfully with all the modules enabled? That might be something to try, as then it will help narrow down whether the modules themselves are causing the issue.

I have opened an issue in github here with more information. I spent hours compiling different versions of the engine with different modules disabled. The one with no modules disabled still had the same issue. I don't think the issue here is the modules.

You might want to check the debug console on your web browser (F12) so see if there are any clues.

I'm guessing that is where these later errors come from already.

Yes, I've already checked my debug console. It just displayed the error and linked to the html file.

The issue has been resolved on Github.