godot: Godot generating export templates for web gives an console error in browser.

Godot version

3.3.1

System information

Windows 11, Godot 3.3.1, Intel iris Xe graphics

Issue description

I first compiled Godot 3.3.1 from source code for windows editor, then I want to generate the export templates for web, I do so for release one using scons p=javascript target=release, this don’t give any error while generation and the size of the release template .zip come out to be about 15MB, when I apply that template and exported my project using it, it gives a console error. When I make templates for debug, the templates were generated but the .wasm file in the template has a size of about 180MB, which is too large. And when I use optimize=size flag while generating the export templates for debug, here is the final command which I’ve used scons p=javascript target=debug optimize=size, this gives a debug template .zip which has a size of about 19MB (normal) but as a fact it is giving the same error as the template which I generated before for release. Meanwhile the official export templates provided by Godot have the normal size but they not give any console error. I want to generate that size of templates for my compiled Godot editor and also want the exported project using them is working just like the official templates. Screenshot 2023-11-21 084912

Steps to reproduce

generate web export templates using - scons p=javascript target=release. or follow the docs - https://docs.godotengine.org/en/3.1/development/compiling/compiling_for_web.html

Minimal reproduction project

godot.javascript.opt.zip

the above file is the export templates for web for release build.

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

@surendra019 Please edit your previous comment if you want to add new information. Every time you reply with a new comment it pings a lot of people who are subscribed to this repository.

I already replied 4 times in 2 hours, please be patient.

This is not a user support platform, but a tracker for bug reports. If you need immediate help, you can try on other platforms where users might be willing to spend time debugging what doesn’t work on your system specifically.

Official templates work, so the problem must be a configuration issue on your end.

Here’s how official templates are built: https://github.com/godotengine/godot-build-scripts/blob/3.5/build-javascript/build.sh#L24-L25

Which expands to:

scons verbose=yes warnings=no progress=no production=yes target=release_debug tools=no
scons verbose=yes warnings=no progress=no production=yes target=release tools=no

I see in the original post that you’re trying to build with target=debug. This isn’t something we test frequently, it might simply be too big with debug symbols for browsers to handle. Why do you need a debug custom build?