whatsapp-http-api
whatsapp-http-api copied to clipboard
[BUG][WEBJS] - Unable to Reply to a message
Describe the bug We tried to send a reply to previous message and it did not work, we had to send it as non reply normal message. This issue happens randomly.
Version
{
"version": "2024.1.1",
"engine": "WEBJS",
"tier": "PLUS",
"browser": "/usr/bin/chromium"
}
To Reproduce Steps to reproduce the behavior:
- Send a reply to a message
- It fails
Expected behavior
It should have been sent as a separate reply message but it fails.
Engine I'm using WEBJS engine.
Requests - Responses
{"chatId":"[email protected]","session":"60609","type":"text","text":"\u05e2\u05db\u05e9\u05d9\u05d5?","reply_to":"[email protected]_3EB0AA2E56A9343911BC28"}
{"statusCode":500,"timestamp":"2024-02-08T09:37:16.603Z","exception":{"stack":"Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'unsafe')\n at window.WWebJS.sendMessage (__puppeteer_evaluation_script__:38:67)\n at __puppeteer_evaluation_script__:10:45\n at ExecutionContext._evaluateInternal (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async ExecutionContext.evaluate (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)\n at async Client.sendMessage (/app/node_modules/whatsapp-web.js/src/Client.js:916:28)\n at async /app/node_modules/@nestjs/core/router/router-execution-context.js:46:28\n at async /app/node_modules/@nestjs/core/router/router-proxy.js:9:17","message":"Evaluation failed: TypeError: Cannot read properties of undefined (reading 'unsafe')\n at window.WWebJS.sendMessage (__puppeteer_evaluation_script__:38:67)\n at __puppeteer_evaluation_script__:10:45","name":"Error"},"request":{"path":"/api/reply","method":"POST","body":{"chatId":"[email protected]","session":"60609","type":"text","text":"עכשיו?","reply_to":"[email protected]_3EB0AA2E56A9343911BC28"},"query":{}},"version":{"version":"2024.1.1","engine":"WEBJS","tier":"PLUS","browser":"/usr/bin/chromium"}}
Docker Logs
I have attached the docker logs in response above.
Additional context
Message were resent as normal message but those were delivered, if I reply them as quoted message then they do not deliver and throw error above.