whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

UnhandledPromiseRejectionWarning: Error: Evaluation failed: u

Open allail-qadrillah opened this issue 2 years ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

when i try to send an audio from a local file, it doesn't works

Expected behavior

Send messages with audio files

Steps to Reproduce the Bug or Issue

trying to send .mp3 file messages

Relevant Code

const media = await MessageMedia.fromFilePath("Voice.mp3")
await client.sendMessage(msg.from, media)

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows 10 Pro Phone OS: Android whatsapp-web.js V. 1.19.4 WhatsApp Web V. 2.2224.8 Node.js V. 16.15.1

Additional context

No response

allail-qadrillah avatar Feb 15 '23 08:02 allail-qadrillah

same here

amosayomide05 avatar Feb 15 '23 15:02 amosayomide05

the same but with buttons

hermanigoncalves avatar Feb 15 '23 15:02 hermanigoncalves

the same but with buttons

you can't send audio with buttons. You really can't, as in the code itself allows for button message headers with attachments and not audio.

purpshell avatar Feb 15 '23 18:02 purpshell

I'm not trying to send audio in the header of the buttons. And yes only the buttons and when I install the solution given in another topic of the error: IMG_20230215_160038.jpg

hermanigoncalves avatar Feb 15 '23 19:02 hermanigoncalves

the same but with buttons

you can't send audio with buttons. You really can't, as in the code itself allows for button message headers with attachments and not audio.

Without buttons

amosayomide05 avatar Feb 15 '23 19:02 amosayomide05

i have the the saas type web page installed and configurate in my url I want to implement the script chatwoot to the page to be able to rent it gz i dont see the create a new acount , can you do it qith the logo and name change my whatsapp +50687021496

llantasghasham avatar Feb 15 '23 23:02 llantasghasham

const media = MessageMedia.fromFilePath('path/to/file.extension');
await client.sendMessage(msg.from, media);

alechkos avatar Dec 01 '23 14:12 alechkos