When send the voice or Video show error message
Error Log Error: Evaluation failed: a at ExecutionContext._ExecutionContext_evaluate (C:\Users\Abdul Rehman\Music\whatspp-web\backend\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:229:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ExecutionContext.evaluate (C:\Users\Abdul Rehman\Music\whatspp-web\backend\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:107:16)
const base64Data = content.data; // already base64 contentBody = { mimetype: content.mimetype, data: base64Data, filename: content.filename };
PAYLOAD :
Sending payload: { chatId: '[email protected]', sender: '923035014103', waId: 710, contentType: 'MessageMedia', content: { mimetype: 'audio/webm;codecs=opus', data: 'GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH/////////FUmpZpkq17GDD0JATYCGQ2hyb21lV0GGQ2hyb21lFlSua7+uvdeBAXPFhzl00pxpCH+DgQKGhkFfT1BVU2Oik09wdXNIZWFkAQEAAIC7AAAAAADhjbWERzuAAJ+BAWJkgSAfQ7Z1Af/////////ngQCjQ8OBAACA+wN//IIsNoGbAbQxoHFZjhoEUxahB5ZgrjHl9'... 142200 more characters, filename: 'voice_1753689202127.webm' }, options: { sendAudioAsVoice: true } }
See https://github.com/pedroslopez/whatsapp-web.js/issues/2380 also be aware that in order to send videos you have to run a Chrome browser instance.