[BUG] Baileys session stops receiving inbound messages while dashboard still shows "Connected" — requires full container restart to recover
Les mainteneurs répondent en général sous 4 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 30/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- docker, postgresql, redis, typescript
Piste de recherche
Start by tracing the Baileys session lifecycle and the ChannelStartupService connection logs; the payload does not name source files or tests. Compare how inbound message events update the chat/message store with how outbound sends and the dashboard connection status are reported. The issue is resolved when inbound messages resume reliably after recovery and the reported status reflects a stalled session.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
📋 Bug Description
The WhatsApp (Baileys) session silently stops receiving new inbound messages while the Evolution Manager dashboard and the instance status both continue to report "Connected". Outbound sends (messages triggered by our own automation via the API) continue to work normally during the stall, which masks the problem and makes it hard to detect from the dashboard alone. The only reliable fix found so far is a full restart of the evolution-api container (not the in-app “Restart”/”Disconnect” buttons in Evolution Manager, which do not recover the session once it’s already stalled).
🔄 Steps to Reproduce
This appears to happen spontaneously after some hours of uptime (not tied to a specific user action). Observed recurrence: 3 times in under 48 hours.
Instance connects normally and processes inbound/outbound messages for some hours.
At some point, inbound messages stop being written to the instance’s message/chat store (findChats / findMessages), even though:
The dashboard still shows the instance as "Connected".
Outbound messages sent via our own API calls are still delivered and logged correctly (fromMe: true records keep appearing).
Using Evolution Manager’s own in-app “Restart” and “Disconnect” buttons does not recover message reception.
A full restart of the underlying Docker container (outside Evolution Manager, at the hosting/orchestration level) does recover it — confirmed via a new [ChannelStartupService] CONNECTED TO WHATSAPP log line and fresh inbound messages syncing in afterward.
The issue recurred again ~16.5 hours after the first fix, and a third time a few hours after the second restart — this time, even after the container restart logged CONNECTED TO WHATSAPP, inbound sync did not resume at all (verified directly against the instance’s own chat/message database: the most recently updated chat across the entire instance remained stuck ~9+ hours in the past, with zero new records, despite test messages sent and outbound automation continuing to fire).
✅ Expected Behavior
The instance should either genuinely reflect a disconnected/degraded state (not "Connected") when the Baileys session stops receiving events, so monitoring can catch it, and/or
The in-app Restart/Disconnect actions should reliably force a real reconnect without requiring an external container restart, and/or
A full container restart should reliably restore inbound message reception (this was not the case the third time).
❌ Actual Behavior
The Baileys session stops receiving new inbound WhatsApp messages while the instance dashboard and status endpoint still report "Connected". Outbound messages sent via our own API/automation continue to work and get logged normally (fromMe: true records keep appearing), which masks the failure.
Confirmed directly against the instance’s own database (/chat/findChats and /chat/findMessages): the most recently updated chat across the entire instance was stuck more than 9 hours in the past, with zero new inbound records, even though test messages were sent during that window and outbound automation kept firing normally.
Evolution Manager’s own in-app “Restart” and “Disconnect” buttons did not recover inbound reception. A full restart of the underlying Docker container did recover it the first time (new [ChannelStartupService] CONNECTED TO WHATSAPP log line, followed by inbound messages syncing again), but on a later occurrence, even a full container restart with that same “CONNECTED TO WHATSAPP” log line did not restore inbound message reception — the instance kept reporting “Connected” with zero new inbound activity afterward.
This has now happened 3 times in under 48 hours.
🌍 Environment
Evolution API, self-hosted via Docker (EasyPanel), with Postgres + Redis.
WhatsApp connector: Baileys, version observed in logs: 2.3000.1054337431.
Instance driven by n8n via real-time Webhook + a periodic flush/schedule trigger.
📋 Logs
📝 Additional Context
Happy to share more detailed timestamps/logs if useful — this is a production instance for a small business’s customer-service WhatsApp bot, so the silent nature of the failure (dashboard shows healthy) is the most damaging part, since it delays detection.
- Langage dominant
- TypeScript
- Étoiles
- 10.2k
- Forks
- 7.5k
- Merge moyen
- 6 j 19 h
- PR mergées (30 j)
- 4
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de evolution-foundation/evolution-api
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
evolution-foundation/evolution-api#2796 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
evolution-foundation/evolution-api#2795 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
evolution-foundation/evolution-api#2782 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
evolution-foundation/evolution-api#2723 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
evolution-foundation/evolution-api#2704 ·
Les mainteneurs répondent en général sous 4 jours
Toutes les issues de evolution-foundation/evolution-api
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
abhigyanpatwari/GitNexus#4124 ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
laaielichter/Godotwright#250 ·
Les mainteneurs répondent en général sous 1 jour
-
An Antigravity tab can quote an old Assist message as the owner's words in a resumed conversationOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
Retry an empty final answer when Gemini reports MALFORMED_RESPONSE (gemini-4-hydrogen)Peut-être pris @waleedkadous l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
iaser-ai/ansari#444 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: Manager UI logo fails to load — broken external URLPeut-être pris @kavindu-udara l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100