# Baileys or Evolution API connected but no messages received

> A QR session shows open, sends work, but no inbound event reaches your code. Check Evolution webhooks, settings, notify vs append, decryption and open issues.

Published 2026-11-16. Z-API Omni team.

When a Baileys or Evolution API session shows open and sends but receives nothing, the message is being dropped before your code, at one of five points. Evolution API's webhook must be enabled and list `MESSAGES_UPSERT`. If by-events is on, your server must answer the per-event route. No Evolution setting may be ignoring the chat. Your Baileys handler must accept `append` as well as `notify`. Decryption must succeed. One case now has a reproduced mechanism, [Baileys #2917](https://github.com/WhiskeySockets/Baileys/issues/2917), with fix PR [#2923](https://github.com/WhiskeySockets/Baileys/pull/2923) open and not merged as of 2026-11-23. [Baileys session open but silent](/academy/articles/baileys-session-open-but-silent-server-sync-ack/) covers it.

This post covers the QR connection, where Baileys runs a WhatsApp Web session and Evolution API wraps it. Close codes, reconnects and the `440` loop are in [Baileys disconnect codes, WAHA and Evolution API session errors](/academy/articles/waha-evolution-api-baileys-session-errors/).

## Find where the message stops

Outbound success proves the socket is up. It says nothing about inbound events. Turn on logging before you change any config, so you can see whether the message reaches Baileys at all.

Evolution API reads two logging variables ([Evolution environment variables, accessed 2026-11-16](https://docs.evolutionfoundation.com.br/evolution-api/configuration/env)). `LOG_LEVEL` takes ERROR, WARN, DEBUG, INFO, LOG, VERBOSE, DARK and WEBHOOKS; include WARN and WEBHOOKS. `LOG_BAILEYS` takes "fatal" through "trace". In plain Baileys, `debug` logging prints "every binary node to the console as structured JSON" ([Baileys troubleshooting, accessed 2026-11-16](https://baileys.wiki/advanced/troubleshooting)). Look for `'failure'` or `'stream:error'` tags.

Send a message to the number from another phone. If the node shows up in the Baileys log and no webhook fires, the drop happens in Evolution or your handler, and the sections below apply. If no node shows up, the message never reached the socket. Skip to the open reports at the end.

## Check that the Evolution webhook is enabled for MESSAGES_UPSERT

Read the stored config first. The find endpoint "Returns null if no webhook is configured" ([Find Webhook, accessed 2026-11-16](https://docs.evolutionfoundation.com.br/evolution-api/get-webhook)).

```bash
curl -X GET 'https://EVOLUTION_HOST/webhook/find/INSTANCE_NAME' \
  -H 'apikey: EVOLUTION_API_KEY'
```

The `apikey` header is the one Evolution's connection state page documents, as the [session errors article](/academy/articles/waha-evolution-api-baileys-session-errors/) notes.

Evolution's source decides what counts as enabled ([webhook.controller.ts, accessed 2026-11-16](https://github.com/evolution-foundation/evolution-api/blob/main/src/api/integrations/event/webhook/webhook.controller.ts)). The webhook runs only when `enabled` is true and the URL matches an http or https pattern. The event key must appear in the `events` array. Disabling the webhook clears that list. Enabling it with an empty list applies all default events.

### The docs and the source disagree on the request body

The [Set Webhook page](https://docs.evolutionfoundation.com.br/evolution-api/set-webhook) (accessed 2026-11-16) shows `POST /webhook/set/{instanceName}` with a flat body: `enabled`, `url`, `events`, `headers` and `base64`. The source schema, [webhook.schema.ts](https://raw.githubusercontent.com/evolution-foundation/evolution-api/main/src/api/integrations/event/webhook/webhook.schema.ts) (accessed 2026-11-16), requires a top-level `webhook` object instead. Inside it go `enabled`, `url`, `headers`, `byEvents`, `base64` and `events`, with `enabled` and `url` required. The webhooks page example uses snake_case names such as `webhook_by_events`.

Follow the source schema, then confirm with the find call above. If the find call still returns null after a set call, the body didn't match the schema.

The server can also be configured through environment variables: `WEBHOOK_GLOBAL_ENABLED`, `WEBHOOK_GLOBAL_URL`, `WEBHOOK_GLOBAL_WEBHOOK_BY_EVENTS` and `WEBHOOK_EVENTS_MESSAGES_UPSERT`. The docs don't say whether the global webhook or the one set through the API wins, so check both.

### By-events routes and the 404 that is never retried

With by-events on, Evolution appends the event name to your URL. The source replaces underscores with hyphens and lowercases it, so `MESSAGES_UPSERT` goes to `https://your-host/webhook/messages-upsert`. A server that only handles the base URL answers 404 on every message.

That 404 is final. Evolution doesn't retry 400, 401, 403, 404 or 422, and it logs the error without rethrowing it. Other failures get up to 10 attempts by default, starting at 5 seconds, with exponential backoff capped at 300 seconds. Each request times out after 30,000 ms.

## Evolution settings that drop messages before the webhook

These checks come from Evolution's [whatsapp.baileys.service.ts](https://raw.githubusercontent.com/evolution-foundation/evolution-api/main/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts) on the main branch (accessed 2026-11-16). The docs don't describe them.

| Condition | Effect on `MESSAGES_UPSERT` |
| --- | --- |
| `groupsIgnore` on | Group messages dropped, in the handler and at the socket |
| `readStatus` off | Broadcast JIDs (status posts) ignored at the socket |
| Always | Newsletter messages ignored at the socket |
| A video while S3 `SAVE_VIDEO` is off | Handler returns before the webhook |
| `type` other than `notify` or `append`, or no message content | Skipped |
| An edited message | Sent as `MESSAGES_EDITED` instead |

The socket-level filter is Baileys' `shouldIgnoreJid`. Baileys defines it as a predicate that returns `true` "to suppress all events and message decryption for that JID" ([socket config, accessed 2026-11-16](https://baileys.wiki/concepts/socket-config)). Evolution stops ignoring groups when `syncFullHistory` is on. Change these flags with `POST /settings/set/{instanceName}` ([Set Settings, accessed 2026-11-16](https://docs.evolutionfoundation.com.br/evolution-api/set-settings)), whose page lists the fields without describing them.

Evolution doesn't filter `fromMe` messages in this handler. If your own messages arrive and customer messages don't, look at the `@lid` filter and decryption sections below.

## Baileys sends offline messages as append

Baileys' `messages.upsert` carries `type: 'notify' | 'append'` ([Baileys events, accessed 2026-11-16](https://baileys.wiki/concepts/events)). The docs call `notify` "messages received while the socket was online" and `append` "messages loaded from history or backfill. Do not re-notify for these." The docs example returns early when `type !== 'notify'`.

The source maps more than history to `append`. In `messages-recv.ts`, the call is `upsertMessage(msg, node.attrs.offline ? 'append' : 'notify')` ([source, accessed 2026-11-16](https://raw.githubusercontent.com/WhiskeySockets/Baileys/master/src/Socket/messages-recv.ts)). A message WhatsApp queued while your socket was down arrives as `append`. A handler copied from the docs example drops it. Nobody has confirmed this behaviour as the cause of the open issues below.

Handle both types, and use the type only to decide whether to alert a person. The docs warn that one event can carry several messages, "especially during reconnection", and recommend `sock.ev.process` over separate listeners.

```typescript
import type { WASocket, WAMessage } from 'baileys'

export function listenForMessages(
  sock: WASocket,
  handle: (msg: WAMessage, live: boolean) => Promise<void>
) {
  sock.ev.process(async (events) => {
    const upsert = events['messages.upsert']
    if (!upsert) return
    for (const msg of upsert.messages) {
      if (!msg.message) {
        console.warn('no content', msg.key.id, msg.messageStubType, msg.messageStubParameters)
        continue
      }
      // notify: received while online. append: offline queue or history.
      await handle(msg, upsert.type === 'notify')
    }
  })
}
```

On the scoped package, import from `@whiskeysockets/baileys` instead. Deduplicate on `msg.key.id` inside `handle`, in case a history or backfill `append` carries a message you already stored.

## Messages that fail to decrypt

Baileys still emits a message it can't decrypt, as a CIPHERTEXT stub with no content. A comment in `messages-recv.ts` says the code falls through to `upsertMessage` on purpose so the stub is emitted. Baileys also sends a retry request to the sender. A message that fails with the missing-keys error is NACKed and never emitted.

Evolution drops those stubs. When `messageStubParameters` contains `'Bad MAC'`, `'failed to decrypt message'` or `'SessionError'`, the handler logs a warning and sends no webhook. Search your logs for `Message ignored with messageStubParameters`. You'll only see it when `LOG_LEVEL` includes WARN.

Decryption depends on saved keys. Baileys' [session management page](https://baileys.wiki/authentication/session-management) (accessed 2026-11-16) says "Both parts must be saved and restored together." It also warns: "If you do not save these updates, messages will fail to send or decrypt". The production warning about `useMultiFileAuthState` is covered in [Baileys v7 and keeping a session current](/academy/articles/baileys-v7-lts-2027-keep-session-current/).

## Senders your own code filters out

Evolution rewrites `@lid` senders only when it has the alternate ID. Its handler sets `remoteJid` to `remoteJidAlt` when that field exists. Without it, the `@lid` JID passes through unchanged. A downstream filter that only accepts `@s.whatsapp.net` then discards a message that Evolution did deliver. The identifiers are explained in [WhatsApp LID vs JID](/academy/articles/whatsapp-lid-vs-jid-group-identifiers/).

## One auth state, one process

Baileys' troubleshooting and session pages say nothing about two processes sharing one auth state. Run one socket per set of credentials anyway. If you see close code `440`, another client took the session, as [the session errors article](/academy/articles/waha-evolution-api-baileys-session-errors/) explains.

## History sync is a different event

History arrives through `messaging-history.set`, "asynchronously" per [Baileys' history sync page](https://baileys.wiki/advanced/history-sync) (accessed 2026-11-16). Evolution turns it into `CHATS_SET`, `MESSAGES_SET`, `CONTACTS_UPSERT` and `CONTACTS_UPDATE`, never `MESSAGES_UPSERT`. Evolution's [webhooks page](https://docs.evolutionfoundation.com.br/evolution-api/configuration/webhooks) (in Portuguese, accessed 2026-11-16) describes `MESSAGES_SET` as an event that happens only once.

Old chats missing from a `MESSAGES_UPSERT` workflow are expected. Baileys also warns that "Full-history sync significantly increases startup time and memory on large accounts." Returning `false` from `shouldSyncHistoryMessage` turns history sync off.

## Open reports with no confirmed cause

If every check above passes, you may be looking at the symptom in the first, third and fourth issues below. As of 2026-11-16, all four are open, none has a maintainer reply, and none has a confirmed root cause.

| Issue | Opened | Status on 2026-11-16 | What the issue reports |
| --- | --- | --- | --- |
| [Baileys #2908](https://github.com/WhiskeySockets/Baileys/issues/2908) | Nov 16, 2026 | Open, project status "Todo" | Socket reaches open, outbound queries work, `messages.upsert` never fires |
| [Baileys #2899](https://github.com/WhiskeySockets/Baileys/issues/2899) | Nov 13, 2026 | Open, project status "Todo" | Unknown stream errors reported as `badSession` (500) |
| [Evolution API #2789](https://github.com/evolution-foundation/evolution-api/issues/2789) | Nov 12, 2026 | Open, label `bug` | Some connected numbers receive nothing, no errors in the logs |
| [Evolution API #2790](https://github.com/evolution-foundation/evolution-api/issues/2790) | Nov 12, 2026 | Open, label `bug` | Inbound stops while the dashboard shows "Connected" |

Baileys #2899 isn't about inbound messages. Its reporter describes apps that clear credentials on a 500 and lose sessions that were still valid. Until it's resolved, the safer default is to keep auth on a 500.

In #2790, a container restart helped once. On a later occurrence, "inbound sync did not resume at all" after the restart. One commenter linked an open memory-leak report, [Evolution API #2752](https://github.com/evolution-foundation/evolution-api/issues/2752). Another wrote that Evolution "was receiving the message but failing to trigger the webhook". Their logs showed a decryption failure, and rescanning the QR code fixed it for them. That matches the "Message ignored" path above. It is one user's report.

If your logs show `stream errored out` with an `ack` reason, read [Baileys session open but silent](/academy/articles/baileys-session-open-but-silent-server-sync-ack/). That line appears only with the Baileys log level at error or lower.

Until a cause is confirmed, record the time of the last inbound event per number and alert when it goes quiet. A connection state of open won't tell you.

*Z-API Omni team*
