Closed roysG closed 2 years ago
This is the code i am use to send the video: const media = await MessageMedia.fromUrl(file);
Please check out https://wwebjs.dev/guide/handling-attachments.html#caveat-for-sending-videos-and-gifs
To send mp4s and other proprietary formats you need to use Google Chrome, as Chromium does not support them.
I performed a test using Google Chrome and the same chromium error occurs. My version: Version 98.0.4758.102 (Official version) 64-bit
@pedroslopez, Thanks.
Same results here. When I tried to send a mp4 video (with chrome) get:
Error: Evaluation failed: N
at ExecutionContext._evaluateInternal (/root/whatsapp-node/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
at runMicrotasks (
Same results here. When I tried to send a mp4 video (with chrome) get:
Error: Evaluation failed: N at ExecutionContext._evaluateInternal (/root/whatsapp-node/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at async ExecutionContext.evaluate (/root/whatsapp-node/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) at async Client.sendMessage (/root/whatsapp-node/node_modules/whatsapp-web.js/src/Client.js:594:28)
Bug from my side, using chrome video is sending ok. Client connection:
const client = new Client(
{
puppeteer: {
headless: true
, args: ['--no-sandbox', '--disable-setuid-sandbox', '--remote-debugging-port=9222']
, executablePath: '/usr/bin/google-chrome'
}
,authStrategy: new LocalAuth({ clientId: "example" })
}
);
Same results here. When I tried to send a mp4 video (with chrome) get: Error: Evaluation failed: N at ExecutionContext._evaluateInternal (/root/whatsapp-node/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at async ExecutionContext.evaluate (/root/whatsapp-node/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) at async Client.sendMessage (/root/whatsapp-node/node_modules/whatsapp-web.js/src/Client.js:594:28)
Bug from my side, using chrome video is sending ok. Client connection:
const client = new Client( { puppeteer: { headless: true , args: ['--no-sandbox', '--disable-setuid-sandbox', '--remote-debugging-port=9222'] , executablePath: '/usr/bin/google-chrome' } ,authStrategy: new LocalAuth({ clientId: "example" }) } );
Thats for gui i guess?
I get this error when i try to send video:
Error: Evaluation failed: N 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at ExecutionContext._evaluateInternal (/root/server/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at runMicrotasks () 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at processTicksAndRejections (node:internal/process/task_queues:96:5) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at async ExecutionContext.evaluate (/root/server/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at async Client.sendMessage (/root/server/node_modules/whatsapp-web.js/src/Client.js:632:28) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | Error: Evaluation failed: N 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at ExecutionContext._evaluateInternal (/root/server/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at runMicrotasks () 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at processTicksAndRejections (node:internal/process/task_queues:96:5) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at async ExecutionContext.evaluate (/root/server/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at async Client.sendMessage (/root/server/node_modules/whatsapp-web.js/src/Client.js:632:28) Unhandled Rejection at Promise Promise { 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | Error: Evaluation failed: N 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at ExecutionContext._evaluateInternal (/root/server/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at runMicrotasks () 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at processTicksAndRejections (node:internal/process/task_queues:96:5) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at async ExecutionContext.evaluate (/root/server/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | at async Client.sendMessage (/root/server/node_modules/whatsapp-web.js/src/Client.js:632:28) 1290|4fe01f06b38d940eedcd2f1946b1bfb9 | }
Relevant code
If applicable, add code snippets to help explain your problem.
Environment (please complete the following information):
WhatsApp
Library
node -v
): Tested on: v16.14.0 / v16.13.1npm -v
): .1.2Other
The sending video was working until the latest changes with the Socket before a week ago Sending Images working great