devlikeapro / waha

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

[BUG][WEBJS] - Instance moves to 'FAILED' state randomly. #276

Closed ehussain closed 2 days ago

ehussain commented 3 months ago

Describe the bug

Instance moves randomly into 'FAILED' state. We have restarted instance multiple times and also did many logouts. It keeps moving to this state randomly.

Version

{
  "version": "2024.3.2",
  "engine": "WEBJS",
  "tier": "PLUS",
  "browser": "/usr/bin/chromium"
}

To Reproduce Steps to reproduce the behavior:

No Reproduction steps. However this logs might be helpful in debugging


{"log":"\u001b[31m[Nest] 30  - \u001b[39m03/14/2024, 11:39:54 PM \u001b[31m  ERROR\u001b[39m \u001b[38;5;3m[WhatsappSession - 60413] \u001b[39m\u001b[31mError: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'push')\r\n","stream":"stdout","time":"2024-03-14T23:39:54.334903661Z"}
{"log":"    at fillModuleArray (eval at \u003canonymous\u003e (:2:5), \u003canonymous\u003e:6:74)\r\n","stream":"stdout","time":"2024-03-14T23:39:54.334940538Z"}
{"log":"    at moduleRaid (eval at \u003canonymous\u003e (:2:5), \u003canonymous\u003e:15:3)\r\n","stream":"stdout","time":"2024-03-14T23:39:54.334944013Z"}
{"log":"    at __puppeteer_evaluation_script__:4:17\u001b[39m\r\n","stream":"stdout","time":"2024-03-14T23:39:54.334946751Z"}
{"log":"\u001b[2K\u001b[1G\u001b[1myarn run v1.22.19\u001b[22m\r\n","stream":"stdout","time":"2024-03-15T00:24:51.036829744Z"}
{"log":"\u001b[2K\u001b[1G\u001b[2m$ node --unhandled-rejections=none dist/main\u001b[22m\r\n","stream":"stdout","time":"2024-03-15T00:24:51.064656402Z"}
{"log":"WAHA (WhatsApp HTTP API) - Running PLUS version...\r\n","stream":"stdout","time":"2024-03-15T00:24:51.544752585Z"}

{"log":"\u001b[31m[Nest] 30  - \u001b[39m03/15/2024, 12:25:17 AM \u001b[31m  ERROR\u001b[39m \u001b[38;5;3m[WhatsappSession - 60413] \u001b[39m\u001b[31mError: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'push')\r\n","stream":"stdout","time":"2024-03-15T00:25:17.164836399Z"}
{"log":"    at fillModuleArray (eval at \u003canonymous\u003e (:2:5), \u003canonymous\u003e:6:74)\r\n","stream":"stdout","time":"2024-03-15T00:25:17.164868856Z"}
{"log":"    at moduleRaid (eval at \u003canonymous\u003e (:2:5), \u003canonymous\u003e:15:3)\r\n","stream":"stdout","time":"2024-03-15T00:25:17.164872767Z"}
{"log":"    at __puppeteer_evaluation_script__:4:17\u001b[39m\r\n","stream":"stdout","time":"2024-03-15T00:25:17.164875754Z"}

Expected behavior

It should stay connected for long enough without going to FAILED state.

Engine I'm using WEBJS engine.

Requests - Responses

Docker Logs

https://gist.github.com/ehussain/4e1854bad50fa8c9a74ced35a630be0a https://gist.github.com/ehussain/cefd2cb1ee2d54da8106112103bd6552 https://gist.github.com/ehussain/13573ee07cac3f59b051d42c8c727131 https://gist.github.com/ehussain/1ac2c9631abed56e6c89f6560afbecc6 https://gist.github.com/ehussain/2e87b1077093f0d363829d4171a5d9e4 https://gist.github.com/ehussain/03a8370bbf386081b31142bc390cd302

patron:ADVANCED

allburov commented 3 months ago

Hi! Just published 2024.3.4 with the possible fix, could you try and give a feedback?

ehussain commented 3 months ago

Issue is still reproducing.

{"log":"\u001b[31m[Nest] 30  - \u001b[39m03/17/2024, 11:36:36 PM \u001b[31m  ERROR\u001b[39m \u001b[38;5;3m[WhatsappSession - 60011] \u001b[39m\u001b[31mError: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default')\r\n","stream":"stdout","time":"2024-03-17T23:36:36.134932503Z"}
{"log":"    at __puppeteer_evaluation_script__:5:95\u001b[39m\r\n","stream":"stdout","time":"2024-03-17T23:36:36.134973966Z"}
{"log":"\u001b[2K\u001b[1G\u001b[1myarn run v1.22.19\u001b[22m\r\n","stream":"stdout","time":"2024-03-17T23:44:24.26275598Z"}
{"log":"\u001b[2K\u001b[1G\u001b[2m$ node --unhandled-rejections=none dist/main\u001b[22m\r\n","stream":"stdout","time":"2024-03-17T23:44:24.30053548Z"}
{"log":"WAHA (WhatsApp HTTP API) - Running PLUS version...\r\n","stream":"stdout","time":"2024-03-17T23:44:24.955704789Z"}

patron:ADVANCED

ehussain commented 3 months ago

Please reopen this bug.

patron:ADVANCED

allburov commented 3 months ago

Could you test it with 2024.3.7? :pray:

Thavia commented 3 months ago

Hello, I'm facing the same issue! Version 2024.4.2. Status failed just after QR CODE is read

ehussain commented 2 months ago

Please reopen this issue. Its still happening.

patron:ADVANCED

Thavia commented 2 months ago

I've manage to get it working by stopping all sessions and recreating containers;

kekekekkek commented 2 months ago

For those who dont know how to fix the problem, just terminate all docker containers and all WhatsApp sessions, and put the command docker pull devlikeapro/whatsapp-http-api again in cmd. Idk, but it worked for me

egbertomonteiro commented 1 month ago

Hello, I'm facing the same issue! Version 2024.5.7. Status failed just after QR CODE is read

image

devlikepro commented 3 weeks ago

@egbertomonteiro try running it locally

patron:PRO

devlikepro commented 3 weeks ago

Its still happening.

How is it going after we added autorestart in WEBJS? I didn't find changelog, but we did it!

patron:PRO