waha icon indicating copy to clipboard operation
waha copied to clipboard

All sessions "Failed"

Open ionutzu opened this issue 4 months ago • 7 comments

About one hour ago, all the sessions went into "Failed" status.

I have made all the tests/ restarts and still nothing happens.

All sessions are down.

Please help.

patron:PLUS

ionutzu avatar Jul 28 '26 23:07 ionutzu

Reference: https://github.com/WhiskeySockets/Baileys/issues/2731

patron:PLUS

francescolovecchio avatar Jul 28 '26 23:07 francescolovecchio

Same here. All sessions failed

rafasaru avatar Jul 29 '26 00:07 rafasaru

Same here, anyone has a solution?

patron:PLUS

jaderweb avatar Jul 29 '26 02:07 jaderweb

[23:20:30.894] INFO (NOWEBEngine/7): session:atendimento - connection errored {"reqId":1349,"session":"atendimento","trace":"Error: Connection Failure\n at WebSocketClient. (file:///app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:806:18)\n at WebSocketClient.emit (node:events:508:28)\n at file:///app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:465:35\n at processData (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/noise-handler.js:126:13)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async Object.decodeFrame (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/noise-handler.js:197:13)\n at async WebSocketClient.onMessageReceived (file:///app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:442:9)"}

patron:PLUS

jaderweb avatar Jul 29 '26 02:07 jaderweb

Please red #2191

nicolasmdq avatar Jul 29 '26 02:07 nicolasmdq

Same here. All session failed. Not starting.

patron:PRO

ehussain avatar Jul 29 '26 04:07 ehussain

2026.7.2 - NOWEB - fix WhatsApp Web version - #2191

:point_right: https://waha.devlike.pro/docs/engines/noweb/#configuration

:cyclone: Auto-update WhatsApp Web Version

You can resolve the latest WhatsApp Web version right before WAHA starts and pass it via WAHA_NOWEB_WA_VERSION - no need to wait for a new WAHA release.

It’s safe by design: WAHA uses the fetched version only if it’s higher than the built-in one, so a failed or stale fetch simply falls back to the built-in version.

Save the script as fetch-wa-version.js - it prints the latest WhatsApp Web version (like 2.3000.1234567890) to stdout, or prints nothing and exits with code 1 on failure, so WAHA falls back to the built-in version.

Two versions of the script - fetching the version from WhatsApp Web directly (recommended) or from the latest Baileys sources on GitHub:

WhatsApp Web

// Prints the latest WhatsApp Web version (e.g. "2.3000.1234567890") to stdout.
// Prints nothing and exits 1 on failure, so WAHA falls back to the built-in version.
const HEADERS = {
  'sec-fetch-site': 'none',
  'user-agent':
    'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',
};

async function main() {
  const response = await fetch('https://web.whatsapp.com/sw.js', {
    headers: HEADERS,
    signal: AbortSignal.timeout(15_000),
  });
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}`);
  }
  const text = await response.text();
  const match = text.match(/\\?"client_revision\\?":\s*(\d+)/);
  if (!match) {
    throw new Error('client_revision not found in sw.js');
  }
  console.log(`2.3000.${match[1]}`);
}

main().catch((err) => {
  console.error(`Could not fetch the latest WhatsApp Web version: ${err}`);
  process.exit(1);
});

Baileys

// Prints the WhatsApp Web version pinned in the latest Baileys sources (e.g. "2.3000.1234567890") to stdout.
// Prints nothing and exits 1 on failure, so WAHA falls back to the built-in version.
const URL = 'https://raw.githubusercontent.com/WhiskeySockets/Baileys/master/src/Defaults/index.ts';

async function main() {
  const response = await fetch(URL, { signal: AbortSignal.timeout(15_000) });
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}`);
  }
  const text = await response.text();
  const match = text.match(/const version = \[(\d+),\s*(\d+),\s*(\d+)\]/);
  if (!match) {
    throw new Error('version not found in Defaults/index.ts');
  }
  console.log(`${match[1]}.${match[2]}.${match[3]}`);
}

main().catch((err) => {
  console.error(`Could not fetch the latest WhatsApp Web version: ${err}`);
  process.exit(1);
});

Option 1 - docker-compose (no image build)

Mount the script and wrap the original entrypoint - the version is resolved once per container start:

services:
  waha:
    image: devlikeapro/waha
    volumes:
      - ./fetch-wa-version.js:/fetch-wa-version.js:ro
    entrypoint:
      - /usr/bin/tini
      - --
      - /bin/sh
      - -c
      - |
        export WAHA_NOWEB_WA_VERSION="$${WAHA_NOWEB_WA_VERSION:-$$(node /fetch-wa-version.js)}"
        exec /entrypoint.sh

👉 Note the $$ - Docker Compose interpolates single ${...} itself, so the dollars must be doubled to reach the shell.

Option 2 - your own image on top of WAHA

FROM devlikeapro/waha:latest
COPY fetch-wa-version.js /fetch-wa-version.js
# Original ENTRYPOINT ["/usr/bin/tini", "--"] is inherited - only the CMD changes
CMD ["/bin/sh", "-c", "export WAHA_NOWEB_WA_VERSION=\"${WAHA_NOWEB_WA_VERSION:-$(node /fetch-wa-version.js)}\"; exec /entrypoint.sh"]

A few things to keep in mind:

  • If you set WAHA_NOWEB_WA_VERSION explicitly - it wins over the fetched one (thanks to :- in the wrapper).
  • The version is resolved once per container start - restart the container to pick up a newer version.
  • The fetch URL must be reachable from the container at startup - otherwise WAHA uses the built-in version.

patron:PRO

devlikepro avatar Jul 29 '26 08:07 devlikepro