#Error: Evaluation failed: a

16 messages · Page 1 of 1 (latest)

stable adder
#
        throw new Error('Evaluation failed: ' + (0, util_js_1.getExceptionMessage)(exceptionDetails));
              ^

Error: Evaluation failed: a

I'm trying to send an audio file as a voice message, but it seems like I'm encountering some errors...

//audioPath and other variables are defined
const filePath = path.resolve(__dirname, `./cache/${audioPath}.mp3`);
const fileData = fs.readFileSync(filePath, { encoding: 'base64' });

const audio = new MessageMedia('audio/mp3', fileData);
await client.sendMessage(msg.from, audio, { sendAudioAsVoice: true });

I feel like I've the wrong format or something passed through, but not sure what it is.. If anyone's free then can you please assist with this?

stable pond
#

AUDIO FORMATS
.mp3: audio/mpeg
.ogg: audio/ogg; codecs=opus

const audio = await MessageMedia.fromFilePath('teste.mp3');
await client.sendMessage(msg.from, audio, { sendAudioAsVoice: true});
elfin carbon
#

What are the image formats?

quick moon
#

Hi, guys!

Help in error: Evaluation failed: a

I send video and audio, not working! But Document and image working perfect and not receive error.

#

Try send Ogg, but received error!

stable pond
stable pond
quick moon
quick moon
# stable pond Working fine

Im use linux, ubuntu, Puppeter

let browser = {
executablePath: "/usr/bin/google-chrome-stable",
// ignoreDefaultArgs: ["--disable-extensions"],

// headless: true, // No servidor tem que estar true, se estiver com false ele abre um navegador
devtools: false,
dumpio: false, // logs do processo do navegador

// slowMo: 75, // slow down by 250ms
args: [
// '--no-sandbox',
'--headless', //para mostrar o navegador
'--disable-extensions',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-accelerated-2d-canvas', //new
'--no-first-run',
'--no-zygote',
// '--single-process', // <- this one doesn't works in Windows
'--disable-gpu'
],
protocolTimeout: 480000,
};

stable pond
quick moon
#

I try your web version

quick moon
stable pond
quick moon