wppconnect-team / wppconnect-server

Wppconnect Server is a ready-to-use API, just download, install, and start using, simple as that.
https://wppconnect.io/swagger/wppconnect-server/
Apache License 2.0
613 stars 348 forks source link

webhook this feature is not working after recent updates. (listenAcks ), #1902

Closed shivamkb17 closed 2 weeks ago

shivamkb17 commented 2 weeks ago

Description

After this recent update, even after setting up listenAcks to true, it is not working.

Environment

export default { secretKey: "jPGqZ4c5UlO1YjBGIw3jixiWnqmSM", host: "http://localhost", port: "21465", deviceName: "AutoConnect", poweredBy: "AutoConnect-Server", startAllSession: true, tokenStoreType: "file", maxListeners: 25, customUserDataDir: "./userDataDir/", webhook: { url: "https://webhook.site/a8967f35-b3a9-4649-bee0-fa5e40b25841", autoDownload: true, uploadS3: false, readMessage: true, allUnreadOnStart: true, listenAcks: true, onPresenceChanged: true, onParticipantsChanged: true, onReactionMessage: true, onPollResponse: true, onRevokedMessage: true, onLabelUpdated: false, onSelfMessage: false, ignore: ["status@broadcast"], }, websocket: { autoDownload: false, uploadS3: false, }, chatwoot: { sendQrCode: true, sendStatus: true, }, archive: { enable: false, waitTime: 10, daysToArchive: 45, }, log: { level: "silly", // Before open a issue, change level to silly and retry a action logger: ["console", "file"], }, createOptions: { browserArgs: [ "--disable-web-security", "--no-sandbox", "--disable-web-security", "--aggressive-cache-discard", "--disable-cache", "--disable-application-cache", "--disable-offline-load-stale-cache", "--disk-cache-size=0", "--disable-background-networking", "--disable-default-apps", "--disable-extensions", "--disable-sync", "--disable-translate", "--hide-scrollbars", "--metrics-recording-only", "--mute-audio", "--no-first-run", "--safebrowsing-disable-auto-update", "--ignore-certificate-errors", "--ignore-ssl-errors", "--ignore-certificate-errors-spki-list", ], /**

`

Steps to Reproduce

  1. install latest version
  2. setup an account and check the listenAck webhook.
  3. [and so on...]

Log Output

[+918cxxxxxxx2xxx:client] Current state: MAIN (NORMAL) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onAnyMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onAnyMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onAnyMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onAnyMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onAnyMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onMessage event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onAnyMessage event (1 registered) 0|wppconnect-server | warn: 2024-06-13T19:52:24.542Z Error calling Webhook. - AggregateError 0|wppconnect-server | at AxiosError.from (/home/chatwoot/wppconnect-server/node_modules/axios/dist/node/axios.cjs:841:14) 0|wppconnect-server | at RedirectableRequest.handleRequestError (/home/chatwoot/wppconnect-server/node_modules/axios/dist/node/axios.cjs:3106:25) 0|wppconnect-server | at RedirectableRequest.emit (node:events:518:28) 0|wppconnect-server | at eventHandlers.<computed> (/home/chatwoot/wppconnect-server/node_modules/follow-redirects/index.js:38:24) 0|wppconnect-server | at ClientRequest.emit (node:events:518:28) 0|wppconnect-server | at TLSSocket.socketErrorListener (node:_http_client:495:9) 0|wppconnect-server | at TLSSocket.emit (node:events:518:28) 0|wppconnect-server | at emitErrorNT (node:internal/streams/destroy:169:8) 0|wppconnect-server | at emitErrorCloseNT (node:internal/streams/destroy:128:3) 0|wppconnect-server | at processTicksAndRejections (node:internal/process/task_queues:82:21) 0|wppconnect-server | at runNextTicks (node:internal/process/task_queues:64:3) 0|wppconnect-server | at listOnTimeout (node:internal/timers:540:9) 0|wppconnect-server | at process.processTimers (node:internal/timers:514:7) 0|wppconnect-server | warn: 2024-06-13T19:52:24.650Z Error calling Webhook. - AggregateError 0|wppconnect-server | at AxiosError.from (/home/chatwoot/wppconnect-server/node_modules/axios/dist/node/axios.cjs:841:14) 0|wppconnect-server | at RedirectableRequest.handleRequestError (/home/chatwoot/wppconnect-server/node_modules/axios/dist/node/axios.cjs:3106:25) 0|wppconnect-server | at RedirectableRequest.emit (node:events:518:28) 0|wppconnect-server | at eventHandlers.<computed> (/home/chatwoot/wppconnect-server/node_modules/follow-redirects/index.js:38:24) 0|wppconnect-server | at ClientRequest.emit (node:events:518:28) 0|wppconnect-server | at TLSSocket.socketErrorListener (node:_http_client:495:9) 0|wppconnect-server | at TLSSocket.emit (node:events:518:28) 0|wppconnect-server | at emitErrorNT (node:internal/streams/destroy:169:8) 0|wppconnect-server | at emitErrorCloseNT (node:internal/streams/destroy:128:3) 0|wppconnect-server | at processTicksAndRejections (node:internal/process/task_queues:82:21) 0|wppconnect-server | at runNextTicks (node:internal/process/task_queues:64:3) 0|wppconnect-server | at process.processTimers (node:internal/timers:511:9) 0|wppconnect-server | http: [+918cxxxxxxx2xxx:client] Connected 0|wppconnect-server | info: 2024-06-13T19:52:24.762Z inChat 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onPresenceChanged event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onPresenceChanged event (1 registered) 0|wppconnect-server | debug: [+918cxxxxxxx2xxx:client] Emitting onMessage event (1 registered)

If relevant, paste all of your Log Output

Your Code

If relevant, paste all of your challenge code in here

Additional context / Screenshot

Add any other context about the problem here. If applicable, add screenshots to help explain.

icleitoncosta commented 2 weeks ago

Please, update for the version 2.5.1

shivamkb17 commented 1 week ago

Please, update for the version 2.5.1

the onack event is fixed, but I see an new issue, like when I send image, any media file as a document, it rendered properly. but when I send video, ( not as a document ) . I see that webhook emit a large amount of code, not the media URL. earlier for video it is working perfectly.