question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when sending a message

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

C:.…\My-Bots\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221 throw new Error('Evaluation failed: ’ + helper_js_1.helper.getExceptionMessage(exceptionDetails)); ^

Error: Evaluation failed: g at ExecutionContext._evaluateInternal (C:.…\My-Bots\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ExecutionContext.evaluate (C:.…\My-Bots\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16) at async Client.sendMessage (C:.…\My-Bots\node_modules\whatsapp-web.js\src\Client.js:594:28)

Node.js v18.0.0

Expected behavior

Iam sending media using base64 string since the library supports it. I have used this method a lot but suddenly it’s showing me this error

Steps to Reproduce the Bug or Issue

  1. setting up new MessageMedia(‘video/mp4’, Base64, ‘video.mp4’)
  2. sending the message
  3. error occures

Relevant Code

const send = new MessageMedia(“video/mp4”, base, ${number}.mp4); client_whatsapp.sendMessage(message.from, send, { sendMediaAsDocument: true });

Browser Type

Google Chrome

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows Phone OS: IOS whatsapp-web.js: v1.16.6 Whatsapp Web Version: 2.2216.6 Node.js Version: v18.0.0

Additional context

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jonylimcommented, May 12, 2022

Hi, we got the same error. From my team’s investigation, we found out that this issue occur when you send media files with file size exceeding limit determined by WhatsApp (16 MB for media, 100 MB for document). Additionally, if the media is a video, the error will also happen regardless of the file size. For video, we temporarily solve this issue by sending video as document using { sendMediaAsDocument: true }

0reactions
Lucas-Angelocommented, Oct 30, 2022

Hi, we got the same error. From my team’s investigation, we found out that this issue occur when you send media files with file size exceeding limit determined by WhatsApp (16 MB for media, 100 MB for document). Additionally, if the media is a video, the error will also happen regardless of the file size. For video, we temporarily solve this issue by sending video as document using { sendMediaAsDocument: true }

not work for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message from sender 9230 - T-Mobile
This error occurs when sending a message to another Sprint phone and the recipient's phone is off or out of coverage for 72...
Read more >
Error occurs when you send or receive an email message in ...
Lists various error messages that you may receive when you send or receive email messages in Outlook or Outlook Express. Describes possible causes...
Read more >
Top 6 Ways to Fix Message Not Sent Error on Android
1. Check SIM/Account Balance · 2. Enable Airplane Mode · 3. Force Stop Messages · 4. Clear Messages App Cache · 5. Check...
Read more >
SMS Error Codes and Their Meanings - All You Need To Know
SMS error code is a number that is sent out whenever there is a problem with the process of sending messages. These sms...
Read more >
Error 30004 "Message Delivery - Twilio Support
Error 30004 "Message Delivery - Message blocked" when Sending SMS ... If a message you sent is not delivered to the end device...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found