devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
813 stars 248 forks source link

[BUG][WEBJS] - /api/contacts/about?contactId= path brings error 500 #295

Open thmamu opened 2 months ago

thmamu commented 2 months ago

Describe the bug

/api/contacts/about?contactId=4915510099729%40c.us&session=default

return error 500

{"statusCode":500,"timestamp":"2024-04-14T19:59:48.442Z","exception":{"stack":"Error: Evaluation failed: Error\n at new Error (:5:31)\n at new y (https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:433655)\n at https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:434425\n at Generator.next ()\n at t (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66487)\n at s (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66698)\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 PrivateContact.getAbout (/app/node_modules/whatsapp-web.js/src/structures/Contact.js:187:23)\n at async WhatsappSessionWebJSCore.getContactAbout (/app/dist/core/engines/webjs/session.webjs.core.js:262:25)\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: Error\n at new Error (:5:31)\n at new y (https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:433655)\n at https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:434425\n at Generator.next ()\n at t (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66487)\n at s (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66698)","name":"Error"},"request":{"path":"/api/contacts/about?contactId=4915510099729%40c.us&session=default","method":"GET","body":{},"query":{"contactId":"4915510099729@c.us","session":"default"}},"version":{"version":"2024.3.14","engine":"WEBJS","tier":"CORE","browser":"/usr/bin/chromium"}}

Version

{"version":"2024.3.14","engine":"WEBJS","tier":"CORE","browser":"/usr/bin/chromium"}}

it happens with nearly every number

allburov commented 2 months ago

Hi! Could you try to use 2024.4.3? Just published the new version.

thmamu commented 2 months ago

seems to not fix the problem:

/api/contacts/about?contactId=4915258194720%40c.us&session=default

{"statusCode":500,"timestamp":"2024-04-15T06:10:23.677Z","exception":{"stack":"Error: Evaluation failed: Error\n at new Error (:5:31)\n at new y (https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:433655)\n at https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:434425\n at Generator.next ()\n at t (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66487)\n at s (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66698)\n at ExecutionContext._ExecutionContext_evaluate (/app/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:229:15)\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-core/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)\n at async PrivateContact.getAbout (/app/node_modules/whatsapp-web.js/src/structures/Contact.js:187:23)\n at async WhatsappSessionWebJSCore.getContactAbout (/app/dist/core/engines/webjs/session.webjs.core.js:262:25)\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: Error\n at new Error (:5:31)\n at new y (https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:433655)\n at https://web.whatsapp.com/app.a325b87cf6fdeb29465c.js:257:434425\n at Generator.next ()\n at t (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66487)\n at s (https://web.whatsapp.com/vendor1~app.264a01b6133c4a120327.js:2:66698)","name":"Error"},"request":{"path":"/api/contacts/about?contactId=4915258194720%40c.us&session=default","method":"GET","body":{},"query":{"contactId":"4915258194720@c.us","session":"default"}},"version":{"version":"2024.4.3","engine":"WEBJS","tier":"CORE","browser":"/usr/bin/chromium"}}

allburov commented 2 months ago

oh, /about. Did it work before or never? Or with some numbers it works, with some it doesn't?