godotjs / godotjs/GodotJS

ENVIRONMENT_IS_PTHREAD is not defined

Open
#232 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
765
Forks
46
PR merge metrics
No merged PRs in 30d

Description

When I export a Web build using the Godot nothreads export template, this error occurs. Is this an incompatibility between the GodotJS Web bridge and the nothreads template?

build.js:7 Uncaught (in promise) ReferenceError: ENVIRONMENT_IS_PTHREAD is not defined
at build.js:7:827
at build.js:737:8
(anonymous) @ build.js:7
(anonymous) @ build.js:737
Promise.then
(anonymous) @ build.js:735
doInit @ build.js:734
init @ build.js:751
startGame @ build.js:846
(anonymous) @ (index):202
(anonymous) @ (index):216
content_main.js:4760 This page uses Chrome's Built-In AI features (LanguageDetector)! We're always improving our models; please submit your feedback here: https://issues.chromium.org/issues/new?component=1583316

build.js:470 Godot Engine v4.5.3.rc.custom_build - https://godotengine.org
build.js:7 [jsbb] unexpected error: ReferenceError: PThread is not defined
at _jsbb_.install_pthread_worker_listener_hook (build.js:7:36417)
at _jsbb_.init (build.js:7:27278)
at _jsbi_init (build.js:7:278350)
at 05590716:0x206174
at 05590716:0x1c149a
at 05590716:0xaf76a
at 05590716:0xf535f
at build.js:7:49745
at Object.callMain (build.js:7:314562)
at build.js:816:27
error @ build.js:7
init @ build.js:7
_jsbi_init @ build.js:7
$func1680 @ 05590716:0x206174
$func1282 @ 05590716:0x1c149a
$_Z14godot_web_mainiPPc @ 05590716:0xaf76a
$__main_argc_argv @ 05590716:0xf535f
(anonymous) @ build.js:7
callMain @ build.js:7
(anonymous) @ build.js:816
(anonymous) @ build.js:811
Promise.then
start @ build.js:790
(anonymous) @ build.js:849
Promise.then
startGame @ build.js:848
(anonymous) @ (index):202
(anonymous) @ (index):216
build.js:470 OpenGL API OpenGL ES 3.0 (WebGL 2.0 (OpenGL ES 3.0 Chromium)) - Compatibility - Using Device: WebKit - WebKit WebGL
build.js:470 Build configuration: Emscripten 4.0.10, single-threaded, no GDExtension support.
content_main.js:4760 This page uses Chrome's Built-In AI features (LanguageDetector)! We're always improving our models; please submit your feedback here: https://issues.chromium.org/issues/new?component=1583316

Contributor guide

Open the contributing guide

Research direction

Reproduce the Web export with the Godot nothreads template and inspect build.js, especially doInit, init, and _jsbb_.install_pthread_worker_listener_hook. Confirm whether the failure is caused by missing ENVIRONMENT_IS_PTHREAD and PThread definitions. Done means the nothreads export starts without these ReferenceErrors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
game-dev, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.