Session is being initiated
curl -X 'POST' 'http://.:3000/client/sendMessage/992b8161fa6a50b2f50bb89b93c0c325' -H 'accept: /' -H 'Content-Type: application/json' -d '{ "chatId": "*******[email protected]", "contentType": "string", "content": "Hello World!" }'
return: "error": "Evaluation failed: TypeError: Cannot read properties of undefined (reading 'getChat')\n at pptr://puppeteer_evaluation_script:2:46"
Might be https://github.com/avoylenko/wwebjs-api/issues/48, so pull the latest image.
But I just did a docker compose pull.
I discovered a problem.
When initializing a session, it works normally, but if you need to restart it for any reason, when the session is automatically initialized, it returns with this error:
"error": "Evaluation failed: TypeError: Cannot read properties of undefined (reading 'getChat')\n at pptr://puppeteer_evaluation_script:2:46"
Therefore, it's necessary to restart the entire process, creating a new session.
What is the impact of this? If you (as in my case) want to turn off the endpoint after it's configured, it's not possible because it's necessary to restart npm, and with that, the session returns broken.