Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Não envia Áudio #2048

Closed
douglasanpa opened this issue Jan 30, 2024 · 3 comments
Closed

Não envia Áudio #2048

douglasanpa opened this issue Jan 30, 2024 · 3 comments
Labels
bug Something isn't working needs triage

Comments

@douglasanpa
Copy link

Description

Não envia Áudio

Estou usando rocketconnect ligado ao server-cli, o recebimento de audio, alem do recebimento e envio de arquivos estão funcionando normalmente.

Estou abrindo a issue no wppconnect, pois o erro aparece na lib

Environment

wppconnect/server-cli:latest

Steps to Reproduce

Enviar audio

Screenshot

image

@douglasanpa douglasanpa added bug Something isn't working needs triage labels Jan 30, 2024
@dudanogueira
Copy link

dudanogueira commented Feb 3, 2024

Também tenho esse issue:

mesmo erro:

wppconnect-1  | error: 2024-02-03T21:43:40.303Z getAudioDuration: error loading audio - Error: getAudioDuration: error loading audio
wppconnect-1  |     at /usr/src/server-cli/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:107:31
wppconnect-1  |     at step (/usr/src/server-cli/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:49:23)
wppconnect-1  |     at Object.next (/usr/src/server-cli/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:30:53)
wppconnect-1  |     at fulfilled (/usr/src/server-cli/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:21:58)
wppconnect-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
wppconnect-1  | JS Stack: Error: getAudioDuration: error loading audio
wppconnect-1  |     at e (https://web.whatsapp.com/:2:4913)
wppconnect-1  |     at HTMLAudioElement.<anonymous> (https://web.whatsapp.com/app.eb2b8a79bb399b3ea6c2.js:269:570186)
wppconnect-1  | Function: function (_a) {
wppconnect-1  |                             var to = _a.to, base64 = _a.base64, filename = _a.filename, caption = _a.caption, quotedMessageId = _a.quotedMessageId, messageId = _a.messageId;
wppconnect-1  |                             return __awaiter(_this, void 0, void 0, function () {
wppconnect-1  |                                 var result;
wppconnect-1  |                                 var _b;
wppconnect-1  |                                 return __generator(this, function (_c) {
wppconnect-1  |                                     switch (_c.label) {
wppconnect-1  |                                         case 0: return [4 /*yield*/, WPP.chat.sendFileMessage(to, base64, {
wppconnect-1  |                                                 type: 'audio',
wppconnect-1  |                                                 isPtt: true,
wppconnect-1  |                                                 filename: filename,
wppconnect-1  |                                                 caption: caption,
wppconnect-1  |                                                 quotedMsg: quotedMessageId,
wppconnect-1  |                                                 waitForAck: true,
wppconnect-1  |                                                 messageId: messageId,
wppconnect-1  |                                             })];
wppconnect-1  |                                         case 1:
wppconnect-1  |                                             result = _c.sent();
wppconnect-1  |                                             _b = {
wppconnect-1  |                                                 ack: result.ack,
wppconnect-1  |                                                 id: result.id
wppconnect-1  |                                             };
wppconnect-1  |                                             return [4 /*yield*/, result.sendMsgResult];
wppconnect-1  |                                         case 2: return [2 /*return*/, (_b.sendMsgResult = _c.sent(),
wppconnect-1  |                                                 _b)];
wppconnect-1  |                                     }
wppconnect-1  |                                 });
wppconnect-1  |                             });
wppconnect-1  |                         }

@edgardmessias
Copy link
Contributor

Poderia testar adicionando essa opção no argumento de execução do chrome? --autoplay-policy=no-user-gesture-required

@dudanogueira
Copy link

@edgardmessias funcionou!!! ❤️

dá um erro, mas funciona:

wppconnect-server-1  | error: 2024-02-05T19:54:08.729Z message is missing critical data needed to download the file. - Error: message is missing critical data needed to download the file.
wppconnect-server-1  |     at Whatsapp.<anonymous> (/usr/src/wpp-server/node_modules/@wppconnect-team/wppconnect/dist/api/whatsapp.js:329:35)
wppconnect-server-1  |     at step (/usr/src/wpp-server/node_modules/@wppconnect-team/wppconnect/dist/api/whatsapp.js:64:23)
wppconnect-server-1  |     at Object.next (/usr/src/wpp-server/node_modules/@wppconnect-team/wppconnect/dist/api/whatsapp.js:45:53)
wppconnect-server-1  |     at /usr/src/wpp-server/node_modules/@wppconnect-team/wppconnect/dist/api/whatsapp.js:39:71
wppconnect-server-1  |     at new Promise (<anonymous>)
wppconnect-server-1  |     at __awaiter (/usr/src/wpp-server/node_modules/@wppconnect-team/wppconnect/dist/api/whatsapp.js:35:12)
wppconnect-server-1  |     at Whatsapp.decryptFile (/usr/src/wpp-server/node_modules/@wppconnect-team/wppconnect/dist/api/whatsapp.js:321:16)
wppconnect-server-1  |     at autoDownload (/usr/src/wpp-server/dist/util/functions.js:130:35)
wppconnect-server-1  |     at EventEmitter.<anonymous> (/usr/src/wpp-server/dist/util/createSessionUtil.js:187:43)
wppconnect-server-1  |     at EventEmitter.emit (node:events:518:28)
wppconnect-server-1  |     at /usr/src/wpp-server/node_modules/@wppconnect-team/wppconnect/dist/api/layers/listener.layer.js:154:87
wppconnect-server-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Pode me ajudar em como dá adicionaria isso no server-cli?
tentei:
command: wppserver --startAllSession --createOptions-browserArgs --autoplay-policy=no-user-gesture-required
e também
command: wppserver --startAllSession --createOptions-browserArgs=--autoplay-policy=no-user-gesture-required
e
command: wppserver --startAllSession --createOptions-browserArgs="--autoplay-policy=no-user-gesture-required"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

3 participants