eilvelia / tdl

Node.js bindings to TDLib 🥒
MIT License
411 stars 53 forks source link

Symbol not found: pkey_alloc #131

Closed bubblecsh closed 1 year ago

bubblecsh commented 1 year ago

Hey Im running tdlib along with nodejs server inside docker container with node:18.4.0-alpine image. This container is perfectly running in local environment (mac m1) however as soon as it is deployed in cloud (aws) it may randomly either work or crash with following error:

/usr/src/app/node_modules/tdl-tdlib-addon/dist/index.js:39 this._addon.load_tdjson(libraryFile); ^ Error: Failed to load 'td_json_client_create': Symbol not found: pkey_alloc at new TDLib (/usr/src/app/node_modules/tdl-tdlib-addon/dist/index.js:39:17) at Object.<anonymous> (/usr/src/app/lib/tdlib/index.ts:12:15) at Module._compile (node:internal/modules/cjs/loader:1112:14) at Module.m._compile (/usr/src/app/node_modules/ts-node/src/index.ts:1618:23) at Module._extensions..js (node:internal/modules/cjs/loader:1166:10) at Object.require.extensions.<computed> [as .ts] (/usr/src/app/node_modules/ts-node/src/index.ts:1621:12) at Module.load (node:internal/modules/cjs/loader:988:32) at Function.Module._load (node:internal/modules/cjs/loader:834:12) at Module.require (node:internal/modules/cjs/loader:1012:19) at require (node:internal/modules/cjs/helpers:102:18)

I assume this is related to metal on which it is currently running but would appreciate some help

eilvelia commented 1 year ago

Hi! Is it possible for you to use debian (or another glibc-based) linux distribution in the docker container?

bubblecsh commented 1 year ago

Thanks for quick response Will give it a shot and get back

bubblecsh commented 1 year ago

Switching from alpine to bullseye helped indeed Thank you