MhankBarBar / termux-wabot

........
GNU General Public License v3.0
254 stars 319 forks source link

UnhandledPromiseRejectionWarning error #168

Open IamBrazilian opened 1 year ago

IamBrazilian commented 1 year ago

I get this error when scanning the QR Code:

(node:5209) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined at invalidArrayBufferView (internal/crypto/cipher.js:87:10) at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:108:11) at new Cipheriv (internal/crypto/cipher.js:217:22) at Object.createCipheriv (crypto.js:109:10) at Object.aesEncrypt (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/Utils.js:108:24) at WAConnection.sendBinary (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/0.Base.js:321:26) at WAConnection.on (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:86:18) at WAConnection.emit (events.js:203:15) at WAConnection.emit (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:664:41) at WAConnection.connect (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/3.Connect.js:70:14) (node:5209) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:5209) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:5209) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined at invalidArrayBufferView (internal/crypto/cipher.js:87:10) at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:108:11) at new Cipheriv (internal/crypto/cipher.js:217:22) at Object.createCipheriv (crypto.js:109:10) at Object.aesEncrypt (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/Utils.js:108:24) at WAConnection.sendBinary (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/0.Base.js:321:26) at WAConnection.on (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:87:18) at WAConnection.emit (events.js:203:15) at WAConnection.emit (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:664:41) at WAConnection.connect (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/3.Connect.js:70:14) (node:5209) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:5209) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined at invalidArrayBufferView (internal/crypto/cipher.js:87:10) at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:108:11) at new Cipheriv (internal/crypto/cipher.js:217:22) at Object.createCipheriv (crypto.js:109:10) at Object.aesEncrypt (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/Utils.js:108:24) at WAConnection.sendBinary (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/0.Base.js:321:26) at WAConnection.on (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:88:18) at WAConnection.emit (events.js:203:15) at WAConnection.emit (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:664:41) at WAConnection.connect (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/3.Connect.js:70:14) (node:5209) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:5209) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined at invalidArrayBufferView (internal/crypto/cipher.js:87:10) at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:108:11) at new Cipheriv (internal/crypto/cipher.js:217:22) at Object.createCipheriv (crypto.js:109:10) at Object.aesEncrypt (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/Utils.js:108:24) at WAConnection.sendBinary (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/0.Base.js:321:26) at WAConnection.on (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:89:18) at WAConnection.emit (events.js:203:15) at WAConnection.emit (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:664:41) at WAConnection.connect (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/3.Connect.js:70:14) (node:5209) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (node:5209) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined at invalidArrayBufferView (internal/crypto/cipher.js:87:10) at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:108:11) at new Cipheriv (internal/crypto/cipher.js:217:22) at Object.createCipheriv (crypto.js:109:10) at Object.aesEncrypt (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/Utils.js:108:24) at WAConnection.sendBinary (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/0.Base.js:321:26) at WAConnection.on (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:90:18) at WAConnection.emit (events.js:203:15) at WAConnection.emit (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:664:41) at WAConnection.connect (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/3.Connect.js:70:14) (node:5209) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5) (node:5209) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined at invalidArrayBufferView (internal/crypto/cipher.js:87:10) at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:108:11) at new Cipheriv (internal/crypto/cipher.js:217:22) at Object.createCipheriv (crypto.js:109:10) at Object.aesEncrypt (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/Utils.js:108:24) at WAConnection.sendBinary (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/0.Base.js:321:26) at WAConnection.on (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:91:18) at WAConnection.emit (events.js:203:15) at WAConnection.emit (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/4.Events.js:664:41) at WAConnection.connect (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/3.Connect.js:70:14) (node:5209) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6) (node:5209) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined at WAConnection.base64EncodedAuthInfo (/home/hugo/termux-wabot/node_modules/@adiwajshing/baileys/lib/WAConnection/0.Base.js:126:42) at starts (/home/hugo/termux-wabot/index.js:57:65) at process._tickCallback (internal/process/next_tick.js:68:7) (node:5209) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)