tglib icon indicating copy to clipboard operation
tglib copied to clipboard

Node Error when importing

Open SwapnilSoni1999 opened this issue 4 years ago • 2 comments

Node version: v14.16.0 and v15.13.0 (tried on both) did a npm install tglib

then made a index.js and required the module then ran with node index.js

then it threw error

#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x7ffd7c848da0
 1: 0xaf68b1  [node]
 2: 0x1afe1e4 V8_Fatal(char const*, ...) [node]
 3: 0xf5e7f9 v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [node]
 4: 0xc9c938 v8::ArrayBuffer::GetBackingStore() [node]
 5: 0xa3ff40 napi_get_typedarray_info [node]
 6: 0x7f2dc4101a83  [/home/sonisins/prujekts/node/channel-dl/node_modules/ffi-napi/build/Release/ffi_bindings.node]
 7: 0x7f2dc4104e76 FFI::FFI::InitializeBindings(Napi::Env, Napi::Object) [/home/sonisins/prujekts/node/channel-dl/node_modules/ffi-napi/build/Release/ffi_bindings.node]
 8: 0x7f2dc41055f0  [/home/sonisins/prujekts/node/channel-dl/node_modules/ffi-napi/build/Release/ffi_bindings.node]
 9: 0x7f2dc4101b15 __napi_Init(napi_env__*, napi_value__*) [/home/sonisins/prujekts/node/channel-dl/node_modules/ffi-napi/build/Release/ffi_bindings.node]
10: 0xa52e49 napi_module_register_by_symbol(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, napi_value__* (*)(napi_env__*, napi_value__*)) [node]
11: 0xa575f0  [node]
12: 0xa57c69 node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) [node]
13: 0xcdbb5b  [node]
14: 0xcdd10c  [node]
15: 0xcdd786 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
16: 0x14fdff9  [node]
[1]    32742 illegal hardware instruction (core dumped)  node download.js

SwapnilSoni1999 avatar Apr 06 '21 10:04 SwapnilSoni1999

Can confirm, have same issue with brand new build of tdlib. Probably some issue with compiled file function mapping

#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x7ffe9f59a590
 1: 0xa70141  [node]
 2: 0x19cf084 V8_Fatal(char const*, ...) [node]
 3: 0xe594c9 v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [node]
 4: 0xba4a18 v8::ArrayBuffer::GetBackingStore() [node]
 5: 0x9c18f0 napi_get_typedarray_info [node]
 6: 0x7f93552f1bc3  [/home/home/projects/3Gmodem/node_modules/ffi-napi/build/Release/ffi_bindings.node]
 7: 0x7f93552f4d86 FFI::FFI::InitializeBindings(Napi::Env, Napi::Object) [/home/home/projects/3Gmodem/node_modules/ffi-napi/build/Release/ffi_bindings.node]
 8: 0x7f93552f54b4  [/home/home/projects/3Gmodem/node_modules/ffi-napi/build/Release/ffi_bindings.node]
 9: 0x7f93552f1c59 __napi_Init(napi_env__*, napi_value__*) [/home/home/projects/3Gmodem/node_modules/ffi-napi/build/Release/ffi_bindings.node]
10: 0x9d4d98 napi_module_register_by_symbol(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, napi_value__* (*)(napi_env__*, napi_value__*)) [node]
11: 0x9d92df  [node]
12: 0x9d860b node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) [node]
13: 0xbe369b  [node]
14: 0xbe4c46  [node]
15: 0xbe52c6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
16: 0x13ff259  [node]
Illegal instruction (core dumped)

JezausTevas avatar May 03 '21 10:05 JezausTevas

I am also having this issue, and I'm having it with other libraries as well, do we need to build td somewhere specific?

Spodeian avatar Jun 04 '21 21:06 Spodeian