venom: Error when sending animated Sticker "Error: Evaluation failed: t"

I am trying to send a animated Sticker using this code

await gclient
      .sendImageAsStickerGif(message.from, 'test.gif')
      .then((result) => {
        console.log('Result: ', result) //return object success
      })
      .catch((erro) => {
        console.error('Error when sending:', erro.stack) //return object error
      })

and I get this error

(node:1745) UnhandledPromiseRejectionWarning: Error: Evaluation failed: t
    at ExecutionContext._evaluateInternal (/home/pi/venom-bot-WhatsappWebBot/node_modules/puppeteer/lib/ExecutionContext.js:102:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (/home/pi/venom-bot-WhatsappWebBot/node_modules/puppeteer/lib/ExecutionContext.js:33:16)
  -- ASYNC --
    at ExecutionContext.<anonymous> (/home/pi/venom-bot-WhatsappWebBot/node_modules/puppeteer/lib/helper.js:94:19)    at DOMWorld.evaluate (/home/pi/venom-bot-WhatsappWebBot/node_modules/puppeteer/lib/DOMWorld.js:89:24)
  -- ASYNC --
    at Frame.<anonymous> (/home/pi/venom-bot-WhatsappWebBot/node_modules/puppeteer/lib/helper.js:94:19)
    at Page.evaluate (/home/pi/venom-bot-WhatsappWebBot/node_modules/puppeteer/lib/Page.js:612:14)
    at Page.<anonymous> (/home/pi/venom-bot-WhatsappWebBot/node_modules/puppeteer/lib/helper.js:95:27)
    at Whatsapp.<anonymous> (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:510:84)
    at step (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:46:23)
    at Object.next (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:27:53)
    at /home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:21:71
    at new Promise (<anonymous>)
    at __awaiter (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:17:12)
    at /home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:506:99
    at new Promise (<anonymous>)
    at Whatsapp.<anonymous> (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:506:51)
    at step (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:46:23)
    at Object.next (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:27:53)
    at fulfilled (/home/pi/venom-bot-WhatsappWebBot/node_modules/venom-bot/dist/api/layers/sender.layer.js:18:58)
(node:1745) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

this is the gif I am trying to send test I think the problem is that the gif is too large to send the problem is because the error isn’t caught by the try and catch the whole process get stopped in my setup and the queue I made for the bot gets filled up with Sticker that cant be sent and the message won’t show up on the onAck function Thanks for the Help in Advance 😄

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Sorry, newbie here and I’m from Brazil, lol, video2gif

if (message.isGroupMsg === false && message.isMedia === true && message.isMMS === true) { const buffer = await client.decryptFile(message); const fileName = some-file-name.${mime.extension(message.mimetype)}; await fs.writeFile(fileName, buffer, (err) => { exec('start video2gif.bat some-file-name.mp4 -o clip.gif -y -w 96:96 -f 10 -q 6', (error, stdout, stderr) => { if (error) { console.log(error: ${error.message}); return; } if (stderr) { console.log(stderr: ${stderr}); return; } client .sendImageAsStickerGif(message.from, 'clip.gif') .then((result) => { console.log('Result: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error }); }); }); }