Unreachable error when calling vips_init() in Cloudflare Workers environment (WASM) #4216
mojodevagentsix
started this conversation in
General
Replies: 1 comment 7 replies
-
Please see kleisauke/wasm-vips#2. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm encountering an issue when trying to use libvips compiled to WebAssembly within a Cloudflare Workers environment. Specifically, the vips_init() function is throwing an "unreachable" error.
Environment:
Cloudflare Workers
libvips compiled to WebAssembly using Emscripten
Steps to Reproduce:
Expected Behavior: The vips_init() function should initialize libvips successfully.
Actual Behavior: An "unreachable" error is thrown when calling vips_init().
Error Message:
Error in vips_init: RuntimeError: unreachable at vips-es6.wasm.vips_init (vips-es6.wasm-01392cc6:0x12c496) at Object.fetch (index.js:165:47) at async jsonError (.internal-6d243f3f-ce0c-4f2f-bbd2-40a2a2c4db25-facade-1.js:12:12)
Compilation Flags:
-sAUTOLOAD_DYLIBS=0 -sABORTING_MALLOC=0 -sSTANDALONE_WASM -sERROR_ON_UNDEFINED_SYMBOLS=0 -sMODULARIZE -sEXPORT_NAME='Vips' -sINITIAL_MEMORY=134217728 -sMAXIMUM_MEMORY=134217728 -sSTACK_SIZE=8MB -gsource-map -sALLOW_TABLE_GROWTH -sALLOW_MEMORY_GROWTH=0 -sTEXTDECODER=2 -sASSERTIONS=2 -sFORCE_FILESYSTEM=0 -sMALLOC='emmalloc' -sUSE_OFFSET_CONVERTER -sVERBOSE=1 -sDEMANGLE_SUPPORT=1 -sEXPORTED_FUNCTIONS=_get_vips_version --no-entry -sEXCEPTION_STACK_TRACES -sBINARYEN_EXTRA_PASSES=--emit-target-features --profiling --profiling-funcs --keep-names --emit-symbol-map --threadprofiler -sSAFE_HEAP=1 -sCHECK_NULL_WRITES=0 -sLIBRARY_DEBUG -sEXCEPTION_DEBUG -sSYSCALL_DEBUG -sDYLINK_DEBUG -sSTACK_OVERFLOW_CHECK=2 -sRUNTIME_DEBUG=1 -Os # Optimize for size -g # Include debug information
Additional Context:
Questions
Observations:
Any insights or suggestions on how to resolve this "unreachable" error when initializing libvips in a Cloudflare Workers environment, particularly considering our compilation settings, would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions