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! Error: Evaluation failed: R

See original GitHub issue

Is 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

  1. 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:open
  • Created 10 months ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
lnmesquita1commented, Nov 24, 2022

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

0reactions
budiamancommented, Nov 25, 2022

Thank you all for the help and information

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node JS : Error: Evaluation failed: TypeError: Cannot read ...
My code was working and the error: Error: Evaluation failed: TypeError: Cannot read properties of null (reading 'innerText') came back.
Read more >
R evaluation failed: setwd("~") - Visual Studio Feedback
I have the same situation (windows 7 64 bits), but the problem is that when I open Visual Studio, since I am already...
Read more >
Evaluation failed: ReferenceError: req is not defined". Im using ...
Im using puppeteer and im trying to get the clients input in the value input. Help! r/node - I get the error "Error:...
Read more >
R to R node: Source of error for "for R evaluation failed"
The "R to R node" that fails to evaluate uses functions from a personal R package with customized functions for soil spectroscopy. The...
Read more >
BiocParallel: Bioconductor facilities for parallel evaluation
R bplapply-methods.R bpiterate-methods.R bpstart-methods.R ... Stop all jobs as soon as one jobs fails (stop.on.error == TRUE) or wait for all jobs to ......
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