alik0211 / mtproto-core

Telegram API JS (MTProto) client library for Node.js and browser
https://mtproto-core.js.org
GNU General Public License v3.0
625 stars 111 forks source link

TypeError: Cannot read properties of undefined (reading 'reject') #257

Open Juned-H2 opened 2 years ago

Juned-H2 commented 2 years ago

Describe the bug Not sure what is exactly causing this issue. Happens very rarely. Causes the process to crash and exit, error message:

/root/telegram/node_modules/@mtproto/core/src/rpc/index.js:550
        waitMessage.reject(message.result);
                    ^

TypeError: Cannot read properties of undefined (reading 'reject')
    at RPC.handleDecryptedMessage (/root/telegram/node_modules/@mtproto/core/src/rpc/index.js:550:21)
    at RPC.handleEncryptedMessage (/root/telegram/node_modules/@mtproto/core/src/rpc/index.js:451:10)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)