Error when sending a message
See original GitHub issueIs 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
- setting up new MessageMedia(‘video/mp4’, Base64, ‘video.mp4’)
- sending the message
- 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:
- Created a year ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
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