Error! Error: Evaluation failed: R
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Describe the bug
1. Proses send type image and document, Normal 2. Proses send type video : error
Error! Error: Evaluation failed: R at ExecutionContext._evaluateInternal (/opt/kawani/service/service-wa-personal/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async ExecutionContext.evaluate (/opt/kawani/service/service-wa-personal/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) at async Client.sendMessage (/opt/kawani/service/service-wa-personal/node_modules/whatsapp-web.js/src/Client.js:686:28)
Expected behavior
I hope that sending messages with the video type can be successful and received by the destination WA
Steps to Reproduce the Bug or Issue
- Update npm i whatsapp-web.js
Relevant Code
`// Send media app.post(‘/send-media’, async (req, res) => { const sender = req.body.sender; const number = req.body.number; const caption = req.body.caption; const fileUrl = req.body.file; let mimeType;
const media = await MessageMedia.fromUrl( fileUrl );
// Search Client ::
const client = sessions.find(sess => sess.id == sender).client;
console.log(`
send-media ::>>>
sender : ${sender} | number : ${number} | caption : ${caption} | fileUrl : ${fileUrl}
`);
console.log( client );
client.sendMessage(number, media, {caption: caption})
.then(response => {
console.log('[SEND-MEDIA] Successfully! ',response);
res.status(200).json({
status: true,
response: response
});
}).catch(err => {
console.log('[SEND-MEDIA] Error! ',err);
res.status(500).json({
status: false,
response: err
});
});
});`
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Linux Centos V7 Phone OS: Android whatsapp-web.js version : whatsapp-web.js 1.18.3 Node.js Version : v12.22.12
Additional context
No response
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:6
You’ll need to point puppeteer to use a separately installed Chrome browser. Check this: https://wwebjs.dev/guide/handling-attachments.html#caveat-for-sending-videos-and-gifs
Thank you all for the help and information