wppconnect-team / wppconnect

WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination
https://wppconnect.io
Other
1.76k stars 304 forks source link

New version unable to send .mp4 file #2124

Open momokang opened 5 months ago

momokang commented 5 months ago

Description

Mp4 file cannot be send , even it's only 1mb. I tried image and pdf all able to send but unable to send mp4. No error and no log at all, it just hang there no proceed to next line.

Environment

Steps to Reproduce

Send mp4 file

Your Code

await waClient.sendFile(
    phone,
    msgDetail["att_path"], // it's url link with .mp4
    msgDetail["att_name"],
    msgSendDetail
)
    .then((result) => {
    })
    .catch((err) => { 
        console.log(err); 
    });
momokang commented 5 months ago

Downgrade to previous version it's working, tried "data:video/mp4;base64,..." also not working, looks like mp4 format is failed to send in new version

momokang commented 4 months ago

WhatsApp WEB version: 2.2404.5 WA-JS version: 2.28.1

Still unable to send .mp4, which is very important for user to send video, would like to know the schedule of fixing this

RafaelDuque049 commented 3 weeks ago

Também estou com o mesmo problema ainda. Faço a tentativa de envio de um arquivo MP4 e falha todas as vezes, por mais que o arquivo seja pequeno. Já testei em PDF, o arquivo é enviado sem problema algum.

I'm also having the same problem. I try to send an MP4 file and it fails every time, even though the file is small. I've already tested it in PDF, and the file is sent without any problem.

Ambiente:

wppconnect: v1.30.3 Node: v20.14.0 WhatsApp-web: v 2.3000.1

Meu código:

info.then(PATH => 
        client
            .sendFile(message.from, `midias/video/${PATH}.mp4`, PATH)
            .then((result) => console.log('Result: ', result))
            .catch((erro) => {
                  client.sendText(message.from, mensagem.FalhaDownloadVideo)
                  console.error('Error when sending: ', erro)
            }
        )
 );

Imagem erro:

Captura de Tela (79) Captura de Tela (81)

RafaelDuque049 commented 2 weeks ago

I checked if it was possible to send videos using AVI as the video format, and it generates the same error.

Verifiquei se era possível enviar vídeos utilizando como formato de vídeo o AVI, e gera o mesmo erro.

Ambient:

wppconnect: v1.32.0 Node: v20.14.0 WhatsApp-web: v 2.3000.101422

My code:

info.then(PATH => 
  client
    .sendFile(message.from, `${__dirname}/midias/video/${PATH}.avi`, PATH)
    .then((result) => console.log('Result: ', result))
    .catch((erro) => {
        client.sendText(message.from, mensagens.FalhaEnvioVideo)
        console.error('Error when sending: ', erro)
    })
);

Imagem:

Captura de Tela (88)