whatsapp-api icon indicating copy to clipboard operation
whatsapp-api copied to clipboard

API stopped working

Open bmduarte opened this issue 4 months ago • 4 comments

Hi

Without changing any configuration or code, the API requests that were working previously have stopped responding. I also tried creating a new session, and the same problem occurs.

Here's an example:

http://localhost:3001/client/getContacts/sesstest

{"success":false,"error":"Evaluation failed: TypeError: Cannot read properties of undefined (reading 'getContacts')\n at pptr://puppeteer_evaluation_script:2:34"}

Is anyone else having similar issues?

Thanks!

bmduarte avatar Sep 06 '25 15:09 bmduarte

Hello,

I’ve been using the API successfully, but recently the sendMessage endpoint stopped working.
When calling this endpoint, the request no longer sends messages as expected.

  • Environment:

    • Node.js: v20.19.3
    • OS: Ubuntu (systemd service)
    • API version: (please fill with the repo version/commit you are running)
  • What I expected: A message to be delivered when calling /sendMessage.

  • What actually happened: The request returns without error, but the message is not delivered.
    Additionally, I see this error in the logs:

Evaluation failed: TypeError: Cannot read properties of undefined (reading 'sendSeen') at pptr://puppeteer_evaluation_script:7:37

Could you please check if this is a known issue or if there were recent changes affecting the sendMessage endpoint?

Thank you in advance!

BetoCR avatar Sep 07 '25 01:09 BetoCR

@BetoCR @bmduarte WhatsApp keeps updating the wwebjs page, so you need to manually bump the whatsapp-web.js version or feel free to switch to the forked project https://github.com/avoylenko/wwebjs-api

avoylenko avatar Sep 07 '25 05:09 avoylenko

just run npm i whatsapp-web.js and it will work .... like avoylenko said, just update the whatsapp-web.js version

leandrojmolina avatar Sep 19 '25 17:09 leandrojmolina

Perhaps I should have run the npm command inside the container but on my Ubuntu server It does give a lot of errors

added 631 packages, and audited 632 packages in 20s

120 packages are looking for funding
  run `npm fund` for details

15 vulnerabilities (2 low, 2 moderate, 10 high, 1 critical)

Maybe should include I am using Docker where possible the npm command is not required but most likely after an update on the Whatsapp side it stopped working.

WJ4IoT avatar Oct 06 '25 08:10 WJ4IoT