Hello, I’m trying to create a basic Godot project using Spine and export it to the web, but my export shows errors in the console:
-index.js:477 Error in loading dynamic library libspine_godot.web.template_release.wasm32.wasm: Error: libspine_godot.web.template_release.wasm32.wasm: file not found, and synchronous loading of external files is not available
-ERROR: Can't open dynamic library: bin/web/libspine_godot.web.template_release.wasm32.wasm. Error: Could not load dynamic lib: libspine_godot.web.template_release.wasm32.wasm
-index.js:477 Error: libspine_godot.web.template_release.wasm32.wasm: file not found, and synchronous loading of external files is not available.
-index.js:477 at: open_dynamic_library (platform/web/os_web.cpp:255)
-ERROR: Can't open GDExtension dynamic library: 'res://bin/spine_godot_extension.gdextension'.
-at: open_library (core/extension/gdextension.cpp:702)
-index.js:477 ERROR: Error loading extension: 'res://bin/spine_godot_extension.gdextension'.
-index.js:477 at: load_extensions (core/extension/gdextension_manager.cpp:291)
Godot Engine v4.4.1.stable.custom_build.49a5bc7b6 (2025-03-25 23:11:16 UTC) - https://godotengine.org
index.js:462 OpenGL API OpenGL ES 3.0 (WebGL 2.0 (OpenGL ES 3.0 Chromium)) - Compatibility - Using Device: WebKit - WebKit WebGL
To try to narrow down the issue, I downloaded a fresh version of the editor: v4.4.1.stable.official.
Following the instructions on https://en.esotericsoftware.com/spine-godot, I downloaded the spine-godot GDExtension for Godot 4.4.1, and placed the /bin folder at the root of the project, as indicated in the documentation. When I run the project in the editor, Spine works fine. The problem arises when exporting to the web.
After that, I installed the Export Templates for Windows, Linux, macOS, Web, Android, and iOS corresponding to version 4.4.1.
I also modified the lines in the spine_godot_extension.gdextension file from libgexample... to libspine_godot... as suggested in this post:
https://es.esotericsoftware.com/forum/d/28220-can-not-export-web-build-with-godot-and-spine2d/2
Before:
web.debug.threads.wasm32 = "web/libgexample.web.template_debug.wasm32.wasm"
web.release.threads.wasm32 = "web/libgexample.web.template_release.wasm32.wasm"
web.debug.wasm32 = "web/libgexample.web.template_debug.wasm32.nothreads.wasm"
web.release.wasm32 = "web/libgexample.web.template_release.wasm32.nothreads.wasm"
After:
web.debug.threads.wasm32 = "web/libspine_godot.web.template_debug.wasm32.wasm"
web.release.threads.wasm32 = "web/libspine_godot.web.template_release.wasm32.wasm"
web.debug.wasm32 = "web/libspine_godot.web.template_debug.wasm32.nothreads.wasm"
web.release.wasm32 = "web/libspine_godot.web.template_release.wasm32.nothreads.wasm"
I exported to Web with "Extensions Support" and "Thread Support" enabled, and I also selected "Use Custom Template", using the template I had previously downloaded and installed. (I also tried leaving this field empty since the templates are installed, but I got the same result.)
I’m not sure what I’m doing wrong. Could you help me get a working empty base project that doesn’t throw errors when using the Spine module as a GDExtension?