Skip to content

GDExtensions web export (emscripten v4) broken in 4.4? #105717

Open
@Superbelko

Description

@Superbelko

Tested versions

4.4.stable

System information

Windows 11

Issue description

I am unable to run GDExtension web export, just tried my own project and godot-cpp demo.
It only happens with GDExtension support enabled, plain build without dynamic modules works fine for minimal project.

UPD:
It works with older emscripten, I used 3.1.62, but there is still issues such as audio thread errors and the demo seems to be frozen. console log mentions emscripten warning about blocking on main thread issue. But at least some progress for me.

C:\godot> emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.6 (1ddaae4d2d6dfbb678ecc193bc988820d1fc4633)
Copyright (C) 2025 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

MS Edge v135 log

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'GDExtension Test Project.side.wasm')
    at loadLibData (GDExtension Test Project.js:8:45912)
    at getExports (GDExtension Test Project.js:8:46617)
    at loadDynamicLibrary (GDExtension Test Project.js:8:46965)
    at GDExtension Test Project.js:8:47939

Firefox v137 log

Uncaught (in promise) TypeError: sharedModules is undefined
    loadLibData http://127.0.0.1:8060/GDExtension Test Project.js:8
    getExports http://127.0.0.1:8060/GDExtension Test Project.js:8
    loadDynamicLibrary http://127.0.0.1:8060/GDExtension Test Project.js:8
    loadDylibs http://127.0.0.1:8060/GDExtension Test Project.js:8

Steps to reproduce

  1. setup emscripten
  2. build godot with GDExtension support scons platform=web dlink_enabled=yes target=template_release
  3. build godot-cpp demo scons platform=web target=template_release
  4. open godot-cpp demo & export
  5. run web server script python serve.py --root .

Minimal reproduction project (MRP)

see reproduction steps

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions