chrishubert / whatsapp-api

This project is a REST API wrapper for the whatsapp-web.js library, providing an easy-to-use interface to interact with the WhatsApp Web platform.
https://www.christophehubert.com
Other
895 stars 403 forks source link

API not working, using docker #193

Open rwguerra opened 7 months ago

rwguerra commented 7 months ago

I got this error

Initialize error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'Msg')
    at pptr://__puppeteer_evaluation_script__:2:26

I have followed this https://github.com/chrishubert/whatsapp-api/issues/189 and its working locally, but when I deploy it in a VM using docker, it doesnt work.

rwguerra commented 7 months ago

At the end, I have the session created... I have read the QR code... But status is that Im not connected, if I try to do anything, I get session_not_connected

souhailben commented 7 months ago

same here

maxyuri99 commented 7 months ago

same here

maxyuri99 commented 7 months ago

it doesn't work in any way

chrishubert commented 7 months ago

Please use the latest version 🙏

prarthana-gh commented 7 months ago

new version is also giving error:

whatsapp_web_api | (node:24) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null whatsapp_web_api | at LocalWebCache.persist (/usr/src/app/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34:69) whatsapp_web_api | at /usr/src/app/node_modules/whatsapp-web.js/src/Client.js:744:36 whatsapp_web_api | at processTicksAndRejections (internal/process/task_queues.js:95:5) whatsapp_web_api | (Use node --trace-warnings ... to show where the warning was created) whatsapp_web_api | (node:24) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) whatsapp_web_api | (node:24) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

julixpeixoto commented 7 months ago

same error here with lastest version

with local environment the API works, but with Docker I have the session created and read the QR code ( takes more than 10 seconds) and when I go to check the session is displayed session_not_connected

LorisXP commented 7 months ago

same problem

rwguerra commented 7 months ago

same error here with lastest version

with local environment the API works, but with Docker I have the session created and read the QR code ( takes more than 10 seconds) and when I go to check the session is displayed session_not_connected

Same problem here... Im using it in a local environment since then. Anyone have any clue how to solve this problem? Im using last docker version as Chris proposed, but no success ( takes more than 10 seconds and when I go to check the session is displayed session_not_connected)

lucasbrcav commented 7 months ago

Same here, when I run it on Windows 11 it works, but in Docker it doesn't. connect in the session, but when i look the status, is not conected

lucasbrcav commented 7 months ago

guys, i try do acess the files after the docker runs, replace .env and package,try npm install, then works here.

matheusavi commented 7 months ago

Docker does not pull the latest image automatically, try using:

docker compose pull
docker compose up --force-recreate
luzanilton commented 5 months ago

using docker this message occur.

ubuntu@ubuntu-virtual-machine:~/whatsapp-api$ docker-compose up --force-recreate [+] Running 1/1 ⠿ Container whatsapp_web_api Recreated 0.1s Attaching to whatsapp_web_api whatsapp_web_api | whatsapp_web_api | > whatsapp-web-api@1.0.0 start whatsapp_web_api | > node server.js whatsapp_web_api | whatsapp_web_api | Server running on port 3000 whatsapp_web_api | existing session detected ipcar whatsapp_web_api | Failed to send new message webhook: ipcar qr Request failed with status code 404 { whatsapp_web_api | qr: '2@q7cXkF7snoEIPxitmAQdomARAAK08JUBNNFumV/e7s/U7HY2Bx2baRzIZfLc7c0yKzntvlRXOcooCw==,vPOe4pVUYU0E2ETS+Uq1C4Ed8i5s+un+Pk+AoVWJIRI=,5lPlI369MH3xgDuUHh2x50mGtO16vsUEUNM9VRk2X08=,RuI0i5rHy3Gh5NCPX+ODSNR8yv67/5cDBA1PSkO6LEs=,1' whatsapp_web_api | } what am I doing wrong?

Using Ubuntu 20.04 server LTS not install NodeJS

if i want install locally version whatsapp-api, what node / npm version to install ?