You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to get Azle (TypeScript CDK) canisters to execute and generate Candid when compiled with the Rust target wasm32-wasi instead of wasm32-unknown-unknown, a strange error occurs when running the Wasm module through Node.js's Wasm implementation:
TypeError: Cannot convert undefined to a BigInt
at _ZN98_$LT$ic_stable_structures..ic0_memory..Ic0StableMemory$u20$as$u20$ic_stable_structures..Memory$GT$4size17h89256a89bcb439a2E (wasm://wasm/0199407a:1:4105761)
at _ZN20ic_stable_structures14memory_manager27MemoryManagerInner$LT$M$GT$4init17ha04bebf4d4296befE (wasm://wasm/0199407a:1:3516220)
at _ZN20ic_stable_structures14memory_manager22MemoryManager$LT$M$GT$21init_with_bucket_size17h5e0e42ed2180b108E (wasm://wasm/0199407a:1:3950306)
at _ZN20ic_stable_structures14memory_manager22MemoryManager$LT$M$GT$4init17h9a9d1e23253fbf80E (wasm://wasm/0199407a:1:4104022)
at _ZN9stable_fs7storage6stable22StableStorage$LT$M$GT$23new_with_memory_indices17h0e60dcf7cf6f3de1E (wasm://wasm/0199407a:1:3053687)
at _ZN9stable_fs7storage6stable22StableStorage$LT$M$GT$3new17he1c094322a45bf1dE (wasm://wasm/0199407a:1:4082606)
at _ZN3std6thread5local4lazy21LazyKeyInner$LT$T$GT$10initialize17he20720e1b7c9fa00E (wasm://wasm/0199407a:1:3050734)
at _ZN3std6thread5local6statik12Key$LT$T$GT$3get17h3fd4e9a8ddcfe4caE (wasm://wasm/0199407a:1:4032661)
at _ZN16ic_wasi_polyfill2FS7__getit17h71b8f9ab5c334f9cE.llvm.3256719224495320100 (wasm://wasm/0199407a:1:4098671)
at _ZN3std6thread5local17LocalKey$LT$T$GT$4with17h0c5f7d9a771ee26fE (wasm://wasm/0199407a:1:3399842)
I bring this up here because the error appears to come from ic-stable-structures. I wonder if there is some implementation issue with ic-stable-structures when compiling to wasm32-wasi (or at least when running through Node.js's VM)?
Hey Jordan, this has been discussed in #108. This is not an issue with stable structures, but rather an issue with the how the SDK generates did files from candid. Per the discussion there, they will be fixing that issue on their side.
While attempting to get Azle (TypeScript CDK) canisters to execute and generate Candid when compiled with the Rust target
wasm32-wasi
instead ofwasm32-unknown-unknown
, a strange error occurs when running the Wasm module through Node.js's Wasm implementation:I bring this up here because the error appears to come from ic-stable-structures. I wonder if there is some implementation issue with ic-stable-structures when compiling to wasm32-wasi (or at least when running through Node.js's VM)?
More information can be found in this companion issue: wasm-forge/ic-wasi-polyfill#9
The text was updated successfully, but these errors were encountered: