waha icon indicating copy to clipboard operation
waha copied to clipboard

[GOWS] - Failed to connect to gows after linking WhatsApp Business account to the Business Platform - "Invalid HMAC" error

Open TheOneironaut opened this issue 10 months ago • 5 comments

I have connected my WhatsApp Business account to the Meta Business Platform as shown in the following link: https://developers.facebook.com/docs/whatsapp/embedded-signup/custom-flows/onboarding-business-app-users?cft[0]=AZWS9YLHqdhFoyUkZJAegAOnXV4q5uFL997iSweF1U74x7vb5cmSDFZ0RXBi7oyQF4XVXUP6wnvWGecrHPu2dP1dHk2WWpMHgWlB-7vEBfOHMf9VufsU_7tC-WhJ9QSAfjhtqffmUjuT6I682B2QFkqbi3024THW2QW-_Xgfl5sEAqLD8v3LMStBBjMbbm7NdWVwM5SbU3dy4_HPUYzRFaSK&tn=-U-UK-R#linked-devices

Now, when I try to scan the QR code to connect to "gows", I receive the following error messages:

2025-03-19T15:23:02.582737037Z {"level":40,"time":1742397782582,"pid":1,"hostname":"11111111","engine":"gows","msg":"[Session/status/Client] Invalid HMAC from pair success message"} 2025-03-19T15:23:02.584594413Z {"level":40,"time":1742397782583,"pid":1,"hostname":"11111111","reqId":1842,"session":"status","name":"WhatsappSession","Event":"error","Error":{},"Code":"","Timeout":0,"msg":"Failed QR item event"} 2025-03-19T15:23:02.586597612Z {"level":50,"time":1742397782582,"pid":1,"hostname":"11111111","engine":"gows","msg":"[Session/status/Client] Failed to pair device: invalid device identity HMAC in pair success message"}

patron:PLUS

TheOneironaut avatar Mar 19 '25 15:03 TheOneironaut

Could you try to pair using NOWEB/WEBJS one for tests?

patron:PRO

devlikepro avatar Mar 20 '25 04:03 devlikepro

Hi @devlikepro,

I’m experiencing the same issue. After connecting my WhatsApp Business account to the Meta Business Platform, I’m unable to connect with Waha.

[11:52:07.883] INFO (NOWEBEngine/1): session:XX - error in pairing {"reqId":6,"session":"XX","trace":"Error: Invalid account signature\n    at configureSuccessfulPairing (/app/node_modules/@adiwajshing/baileys/lib/Utils/validate-connection.js:112:15)\n    at WebSocketClient.<anonymous> (/app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:501:91)\n    at WebSocketClient.emit (node:events:520:28)\n    at /app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:237:35\n    at Object.decodeFrame (/app/node_modules/@adiwajshing/baileys/lib/Utils/noise-handler.js:144:17)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"}

[11:52:07.883] INFO (NOWEBEngine/1): session:XX - connection errored {"reqId":6,"session":"XX","trace":"Error: Invalid account signature\n    at configureSuccessfulPairing (/app/node_modules/@adiwajshing/baileys/lib/Utils/validate-connection.js:112:15)\n    at WebSocketClient.<anonymous> (/app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:501:91)\n    at WebSocketClient.emit (node:events:520:28)\n    at /app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:237:35\n    at Object.decodeFrame (/app/node_modules/@adiwajshing/baileys/lib/Utils/noise-handler.js:144:17)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"}

[11:52:07.884] WARN (WhatsappSession/1): session:XX - QR code has not been scanned yet, force stopping the session. {"reqId":6,"session":"XX"}

[11:59:56.366] INFO (1): request errored {"reqId":12,"req":{"id":12,"method":"GET","url":"/api/screenshot?session=XX","query":{"session":"XX"},"params":{"0":"api/screenshot"}},"res":{"statusCode":422},"responseTime":15}
    err: {
      "type": "UnprocessableEntityException",
      "message": "Unknown status - FAILED",
      "stack":
          UnprocessableEntityException: Unknown status - FAILED
              at WhatsappSessionNoWebPlus.getScreenshot (/app/dist/core/engines/noweb/session.noweb.core.js:413:19)
              at ScreenshotController.screenshot (/app/dist/api/screenshot.controller.js:29:38)
              at /app/node_modules/@nestjs/core/router/router-execution-context.js:38:29
      "response": {
        "type": "Object",
        "message": "Unknown status - FAILED",
        "stack":

        "statusCode": 422,
        "error": "Unprocessable Entity"
      },
      "status": 422,
      "options": {},
      "name": "UnprocessableEntityException"
    }

Azzamjiul avatar Apr 19 '25 12:04 Azzamjiul

Hi! Are you able to login on regular https://web.whatsapp.com/?

patron:PRO

devlikepro avatar Apr 28 '25 12:04 devlikepro

Yes @devlikepro , after connecting my WhatsApp Business to Meta Business Suite, all sessions were logged out. I successfully reconnected via web.whatsapp.com by scanning the QR code again.

Azzamjiul avatar Apr 28 '25 12:04 Azzamjiul

Intersting, could you try WEBJS engine? Looks like NOWEB/GOWS missed some logic related to those suite 🤔

patron:PRO

devlikepro avatar Apr 28 '25 12:04 devlikepro

If anyone has business platform account and want to test the solution - please send us a message [email protected] 🙏 We have few solutions, but need to test it properly

patron:PRO

devlikepro avatar May 11 '25 10:05 devlikepro

Hi! Try 2025.5.2 and GOWS

patron:PRO

devlikepro avatar May 16 '25 11:05 devlikepro

Doesn't work yet :(

patron:PRO

devlikepro avatar May 21 '25 05:05 devlikepro

2025.5.5 - fix pairing Business Accounts connected to official Meta API - #864

patron:PRO

devlikepro avatar May 28 '25 10:05 devlikepro

related https://github.com/devlikeapro/waha/issues/1086

patron:PRO

devlikepro avatar Jun 29 '25 03:06 devlikepro