[NOWEB] - Sessions stuck in STARTING status with repeated Error: Connection Terminated
Describe the bug
We are facing an intermittent issue where some sessions get stuck in the STARTING status. In some cases, the session transitions to WORKING as expected, but other times it remains in STARTING indefinitely.
The logs in failing cases show repeated Error: Connection Terminated messages followed by reconnection attempts, but the session never becomes active.
Example logs for an affected session (kCa7e4ERFqPBMyPud-6cbRKsL):
kCa7e4ERFqPBMyPud-6cbRKsL - connection errored {"reqId":4702,"session":"kCa7e4ERFqPBMyPud-6cbRKsL","trace":"Error: Connection Terminated\n}
kCa7e4ERFqPBMyPud-6cbRKsL - Connection closed due to 'Error: Connection Terminated', reconnecting...
kCa7e4ERFqPBMyPud-6cbRKsL - Job scheduled with timeout 2000 ms {"job":"start-engine"}
kCa7e4ERFqPBMyPud-6cbRKsL - error in sending keep alive
kCa7e4ERFqPBMyPud-6cbRKsL - connected to WA {"browser":["Ubuntu","Chrome","22.04.4"]}
kCa7e4ERFqPBMyPud-6cbRKsL - logging in...
kCa7e4ERFqPBMyPud-6cbRKsL - opened connection to WA
...
kCa7e4ERFqPBMyPud-6cbRKsL - connection errored {"trace":"Error: Connection Terminated\n at WebSocketClient.<anonymous> (/app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:458:30) ..."}
Version
Get the WAHA version by calling GET /api/version
{
"version": latest,
"engine": "NOWEB",
"tier": "PLUS"
}
Steps to Reproduce:
Initiate a new session and link the WhatsApp account. The session is now in the WORKING state. After time, around 3-4 hrs, sometimes the session transitions to WORKING normally. Other times it stays in STARTING with repeated reconnection attempts.
Expected Behavior: All sessions should start and connect reliably without being stuck in STARTING.
Actual Behavior: Some sessions remain in STARTING indefinitely.
- Current session status is STARTING, now we have try to hit with start API and still it's in STARTING status and here some logs:
(SessionManager/8): Starting session...{"reqId":7130,"session":"3r4gLrusmED9vP2b5-tGWxJWj"}
(SessionManager/8): Session is already running.{"reqId":7130,"session":"3r4gLrusmED9vP2b5-tGWxJWj"}
(8):{"reqId":7130,"req":{"id":7130,"method":"POST","url":"/api/sessions/3r4gLrusmED9vP2b5-tGWxJWj/start","query":{},"params":{"path":["api","sessions","3r4gLrusmED9vP2b5-tGWxJWj","start"]}},"res":{"statusCode":201},"responseTime":6}
(8):{"reqId":7131,"req":{"id":7131,"method":"GET","url":"/api/sessions/3r4gLrusmED9vP2b5-tGWxJWj","query":{},"params":{"path":["api","sessions","3r4gLrusmED9vP2b5-tGWxJWj"]}},"res":{"statusCode":200},"responseTime":2}```
latest
Could you check the version?
now we have try to hit with start API and
You need to hit stop first and the start to or restart session to fix that manually.
@devlikepro Yes, we tried using the restart mechanism, but occasionally we still get the "STARTING" status a few seconds after restarting. Additionally, the log is as follows:
kCa7e4ERFqPBMyPud-Q9yCjmX - Unpairing the device from account...
Please provide some clarification on this.
@devlikepro any update here?
@devlikepro Is there any update on this?
@rupen-cleverpush (i'm not from waha) check if your docker image is updated. i had the same issue, did a docker pull and it worked... also, if it dont work, try checking your session configs, maybe there is something missing