Skip to content

[GOWS] All outbound messages fail with server returned error 400 until session restart #2084

@bergpinheiro

Description

@bergpinheiro

Note: Session names, phone numbers, and URLs in examples are fictional placeholders for privacy.


Summary

On GOWS engine, some sessions enter a state where every outbound message type fails with HTTP 500 and gRPC error server returned error 400. The WAHA dashboard still shows the session as WORKING.

Workaround that consistently fixes the problem: restart the session via POST /api/sessions/{session}/restart (stop + start, without deleting credentials or scanning QR again). After restart, text, image, audio, and video sends work again.

The issue is session-specific (other sessions on the same worker continue to work) and can affect all contacts for the broken session, not only one chatId.


Environment

Field Value
WAHA version 2026.4.2 (also observed on 2026.4.3)
Engine GOWS
Tier PLUS
Platform linux/x64
Worker ID waha_gowdy
Example session example_session_001
Example chatId 5511999990001@c.us

Symptoms

  1. Session status remains WORKING in the dashboard/API.
  2. No outbound message type succeeds for that session:
    • Text (POST /api/sendText)
    • Image (POST /api/sendImage)
    • Audio / voice (POST /api/sendVoice, POST /api/sendAudio)
    • Video (POST /api/sendVideo)
    • Documents and other send endpoints that use MessageService.SendMessage over gRPC
  3. Inbound messages may still be received (not fully verified in all cases; worth confirming in logs).
  4. Sending from the physical phone may still work while the API fails (suggests desync between GOWS store/state and the linked device).
  5. Only some sessions are affected; other sessions on the same worker are fine.
  6. POST /api/sessions/{session}/restart restores sending for all message types without re-pairing (no new QR scan).

Error response (API)

HTTP 500 with body similar to:

{
  "statusCode": 500,
  "timestamp": "2026-05-18T22:20:44.455Z",
  "exception": {
    "message": "2 UNKNOWN: server returned error 400",
    "code": 2,
    "details": "server returned error 400",
    "metadata": {},
    "name": "Error"
  },
  "request": {
    "path": "/api/sendText",
    "method": "POST",
    "body": {
      "chatId": "5511999990001@c.us",
      "text": "...",
      "session": "example_session_001"
    }
  },
  "version": {
    "version": "2026.4.2",
    "engine": "GOWS",
    "tier": "PLUS",
    "worker": { "id": "waha_gowdy" }
  }
}

The same server returned error 400 occurs for video and other media endpoints.


Stack traces

sendText

Error: 2 UNKNOWN: server returned error 400
    at callErrorFromStatus (.../node_modules/@grpc/grpc-js/build/src/call.js:32:19)
    ...
    at MessageServiceClient.SendMessage (.../dist/core/engines/gows/grpc/gows.js:10502:30)
    at WhatsappSessionGoWSPlus.sendText (.../dist/core/engines/gows/session.gows.core.js:517:78)
    at descriptor.value (.../dist/core/abc/activity.js:9:35)

sendVideo

Error: 2 UNKNOWN: server returned error 400
    ...
    at MessageServiceClient.SendMessage (.../dist/core/engines/gows/grpc/gows.js:10502:30)
    at WhatsappSessionGoWSPlus.sendMedia (.../dist/plus/engines/gows/session.gows.plus.js:185:16)
    at WhatsappSessionGoWSPlus.sendVideo (.../dist/plus/engines/gows/session.gows.plus.js:213:16)

Both paths call the same gRPC method: MessageService.SendMessage.


Example requests that failed

Text

POST /api/sendText
Content-Type: application/json

{
  "session": "example_session_001",
  "chatId": "5511999990001@c.us",
  "text": "Hello"
}

Video

POST /api/sendVideo
Content-Type: application/json

{
  "session": "example_session_001",
  "chatId": "5511999990001@c.us",
  "caption": "Example",
  "convert": false,
  "file": {
    "url": "https://example.com/video.mp4",
    "mimetype": "video/mp4",
    "filename": "video.mp4"
  }
}

Media download and temp-file preparation complete successfully; failure happens only at SendMessage (WhatsApp server rejects with code 400).


Workaround (confirmed)

POST /api/sessions/example_session_001/restart

After restart:

  • Session returns to WORKING
  • sendText, sendImage, sendVoice/sendAudio, sendVideo, etc. work again
  • No session delete and no new QR pairing required

If restart stops working in the future, full session recreate (delete + QR) may still be needed; so far restart alone is sufficient.


patron:PRO

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions