Menu

#845 Error while sending sticker. UnhandledPromiseRejectionWarning: Error: Evaluation failed: s

open
nobody
None
2023-11-13
2021-08-20
Anonymous
No

Originally created by: lucafont2

Hello, I am having issues sending a sticker from a video.
These are the information about the video:
Codec Name h264
Codec Long Name H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Profile High
Codec Type video
Codec Tag String avc1
Codec Tag 0x31637661
Width 640
Height 800
Coded Width 640
Coded Height 800
Closed Captions 0
Has B Frames 0
Pix Fmt yuv420p
Level 31
Color Range tv
Color Space smpte170m
Color Transfer smpte170m
Color Primaries bt470bg
Chroma Location left Refs 1 Is Avc true Nal
Length Size 4 R
Frame Rate 30/1
Avg Frame Rate 30/1
Time Base 1/90000
Start Pts 0
Start Time 0
Duration Ts 1863000
Duration 20.7
Bit Rate 928420
Bits Per Raw Sample 8 Nb
Frames 621

When sending only with this video i have this error

(node:220922) UnhandledPromiseRejectionWarning: Error: Evaluation failed: s                           at ExecutionContext._evaluateInternal (/home/nodeJs/whatsapp/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async ExecutionContext.evaluate (/home/nodeJs/whatsapp/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async Client.sendMessage (/home/nodeJs/whatsapp/node_modules/whatsapp-web.js/src/Client.js:530:28)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:220922) 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: 1)
(node:220922) [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:220922) UnhandledPromiseRejectionWarning: Error: Evaluation failed: s
    at ExecutionContext._evaluateInternal (/home/nodeJs/whatsapp/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async ExecutionContext.evaluate (/home/nodeJs/whatsapp/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async Client.sendMessage (/home/nodeJs/whatsapp/node_modules/whatsapp-web.js/src/Client.js:530:28)
(node:220922) 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)

I am using "whatsapp-web.js": "^1.14.0"

Discussion

  • Anonymous

    Anonymous - 2021-08-26

    Originally posted by: PurpShell

    hmm.. Are you sure you are sending a sticker? Send me your code

     
  • Anonymous

    Anonymous - 2021-08-26

    Originally posted by: lucafont2

    client.on('message',async function(msg) {
          let chat = await msg.getChat();
          if (! chat.isGroup  &&  (msg.type=="video" || msg.type=="image") ) {
             const receivedImage = await msg.downloadMedia();
             client.sendMessage(msg.from, receivedImage, { sendMediaAsSticker: true });
         }
    }) ;
    

    This code works with all video i send, but with that video an error throws

     
  • Anonymous

    Anonymous - 2021-08-27

    Originally posted by: JoseHM8A

    client.on('message',async function(msg) { let chat = await msg.getChat(); if (! chat.isGroup && (msg.type=="video" || msg.type=="image") ) { const receivedImage = await msg.downloadMedia(); client.sendMessage(msg.from, receivedImage, { sendMediaAsSticker: true }); } }) ;

    This code works with all video i send, but with that video an error throws

    plz, upload your video here: https://mediafire.com, and send me the download link

     
  • Anonymous

    Anonymous - 2021-08-27

    Originally posted by: lucafont2

    Here is the vid: https://cdn.lucaservers.com/vid_slps7r.mp4

     
  • Anonymous

    Anonymous - 2021-09-26

    Originally posted by: stale[bot]

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

     
  • Virgil Fuller

    Virgil Fuller - 2023-11-13
    Post awaiting moderation.

Log in to post a comment.