waha
waha copied to clipboard
/api/{session}/chats/{chatId}/messages - fails for the chatId which have not sent us a message recently
Hello,
We are facing below exception on some specific contacts. Error happens on the contact which have not sent a message to the whatsapp message. Once that number sends us the message then error disappears.
Also same error happens on such contacts when calling sendText
Example end point.
/api/{session}/chats/{chatId}/messages
Error Response :
{
"statusCode": 500,
"timestamp": "2023-08-10T07:28:06.685Z",
"exception": {
"stack": "Error: Evaluation failed: TypeError: r.findImpl is not a function\n at https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:175453\n at Generator.next (<anonymous>)\n at t (https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66483)\n at s (https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66694)\n at https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66753\n at new Promise (<anonymous>)\n at https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66634\n at O._serverQuery (https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:175781)\n at O._query (https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:175064)\n at O.find (https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:173548)\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.getChatById (/app/node_modules/whatsapp-web.js/src/Client.js:921:20)\n at async WhatsappSessionWebJSPlus.getChatMessages (/app/dist/core/session.webjs.core.js:138:22)\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: r.findImpl is not a function\n at https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:175453\n at Generator.next (<anonymous>)\n at t (https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66483)\n at s (https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66694)\n at https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66753\n at new Promise (<anonymous>)\n at https://web.whatsapp.com/vendor1~app.7f14216f970118f62a35.js:2:66634\n at O._serverQuery (https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:175781)\n at O._query (https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:175064)\n at O.find (https://web.whatsapp.com/app.9bf7959578bdb7663582.js:51:173548)",
"name": "Error"
},
"request": {
"path": "/api/XXXXX/chats/XXXXXXXX%40c.us/messages?downloadMedia=true&limit=100",
"method": "GET",
"body": {},
"query": {
"downloadMedia": "true",
"limit": "100"
}
},
"version": {
"version": "2023.8.10",
"tier": "PLUS",
"browser": "/usr/bin/chromium"
}
}