-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worker code: Cannot set property self of #<Object> which has only a getter #21054
Comments
Can you share the full set of link flags you are using? And also maybe the generated If you are using WASM_WORKERS, I think we might not have good support for running those under node yet. Most of the tests for wasm workers are only run in the browser. |
Of course. As far as I can tell, I'm not using Without further a do, please see the link commands and -L../../bin/gcc -sMODULARIZE=1 -sEXPORT_ES6=1 -sEXPORT_NAME=bar -sEXPORTED_RUNTIME_METHODS=FS,getValue,setValue,UTF8ToString,lengthBytesUTF8,stringToUTF8 -sEXPORTED_FUNCTIONS=_malloc,_main,PThread -sPTHREAD_POOL_SIZE=1 -sPTHREAD_POOL_SIZE_STRICT=0 -lworkerfs.js -lpthread -lm -sALLOW_TABLE_GROWTH -sWASM_BIGINT -sUSE_PTHREADS -sALLOW_MEMORY_GROWTH
|
Odd that we have not yet run into this issue testing on any of the verions of node that we test against. By any chance are you trying to load |
Vite bundles all wasm related files as assets and I tell the main js file ( Oddly enough, removing |
There are many pthread tests that run under node. For example |
Ah, I think this is because how |
The boilerplate code placed by Emscripten for worker code seems to be creating issues. When the worker is started on Node, it throws the following error and therefore does not load.
I suspect the error comes from this line. However, replacing self with global did not help. I'm not suprised though, probably there is an internal call to it somewhere
emscripten/src/wasm_worker.js
Line 22 in a997567
Version of emscripten/emsdk:
Version of Node:
v20.10.0
Failing command line in full:
N/A
Full link command and output with
-v
appended:N/A
The text was updated successfully, but these errors were encountered: