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

API not working, using docker

Open rwguerra opened this issue 1 year ago • 13 comments

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 avatar Apr 08 '24 18:04 rwguerra

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

rwguerra avatar Apr 08 '24 20:04 rwguerra

same here

souhailben avatar Apr 08 '24 22:04 souhailben

same here

maxyuri99 avatar Apr 09 '24 11:04 maxyuri99

it doesn't work in any way

maxyuri99 avatar Apr 09 '24 12:04 maxyuri99

Please use the latest version 🙏

chrishubert avatar Apr 10 '24 06:04 chrishubert

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.

prarthana-gh avatar Apr 10 '24 17:04 prarthana-gh

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

julixpeixoto avatar Apr 16 '24 00:04 julixpeixoto

same problem

LorisXP avatar Apr 17 '24 13:04 LorisXP

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)

rwguerra avatar Apr 18 '24 13:04 rwguerra

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 avatar Apr 19 '24 18:04 lucasbrcav

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

lucasbrcav avatar Apr 19 '24 19:04 lucasbrcav

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

docker compose pull
docker compose up --force-recreate

matheusavi avatar Apr 24 '24 00:04 matheusavi

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 | > [email protected] 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 ?

luzanilton avatar Jun 24 '24 14:06 luzanilton