-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Title
Cannot send media >128 MiB via WAHA (GoWS/PLUS): gRPC RESOURCE_EXHAUSTED (134217728)
Describe the bug
When sending large videos via WAHA (engine GoWS, tier PLUS) using the JSON endpoint POST /api/sendFile with file.url, files up to ~100–120 MB succeed, but larger files (e.g., 143–149 MB) consistently fail with a 500 error and a gRPC “RESOURCE_EXHAUSTED … size larger than 134217728” message. This suggests an internal ~128 MiB limit in the GoWS/gRPC path, even when the media is provided by URL (no large HTTP JSON body).
Note: Sending JSON with Base64 (file.data) is limited earlier by Express/body-parser (~50 MB). Using file.url avoids the HTTP body size limit, but then fails at gRPC size 128 MiB.
I’d like to confirm whether this is a bug or an intentional/configurable limitation. If it’s a limit, documentation and/or a streaming/chunk mechanism would be helpful.
Version
GET /api/version:
{
"version": "2025.8.1",
"engine": "GOWS",
"tier": "PLUS",
"browser": null
}Docker image: devlikeapro/waha-plus:gows
Steps to reproduce
- Run WAHA PLUS with GoWS engine and authenticate a session (status: WORKING).
- Serve a large local file (≥140 MB) via HTTP accessible to the container (e.g., http://host.docker.internal:8083/file/.../file_20.mp4).
- POST /api/sendFile with the JSON body below (include X-API-Key if required).
- Observe 500 response with gRPC RESOURCE_EXHAUSTED when file size is ≥ ~128 MiB. Files ~100 MB succeed.
Payload example (143 MB video via URL):
{
"session": "telezap-final",
"chatId": "[email protected]",
"file": {
"mimetype": "video/mp4",
"filename": "file_20.mp4",
"url": "http://host.docker.internal:8083/file/.../file_20.mp4"
},
"caption": "Test WAHA - via URL"
}Expected behavior
- Either file.url should allow sending media larger than 128 MiB (ideally by streaming/chunking internally), or
- If the limit is intentional, there should be a documented configuration (e.g., raising gRPC max message size) or a clear error (e.g., 413 with guidance) and recommended workaround.
Requests - Responses
Failure response for ~143 MB:
{
"statusCode": 500,
"timestamp": "2025-09-14T17:21:58.677Z",
"exception": {
"message": "8 RESOURCE_EXHAUSTED: Attempted to send message with a size larger than 134217728",
"code": 8,
"name": "Error"
},
"request": { "path": "/api/sendFile", "method": "POST" },
"version": { "version": "2025.8.1", "engine": "GOWS", "tier": "PLUS", "browser": null }
}Success response for ~100 MB:
{ "id": "[email protected]_3EB0E4EFDE5DEF930F017C" }Docker Logs
Relevant excerpt:
[INFO] request errored {"url":"/api/sendFile","statusCode":500}
Error: 8 RESOURCE_EXHAUSTED: Attempted to send message with a size larger than 134217728
at MessageServiceClient.SendMessage (.../gows.js:8969:30)
at WhatsappSessionGoWSPlus.sendMedia (.../session.gows.plus.js:123:78)
at WhatsappSessionGoWSPlus.sendFile (.../session.gows.plus.js:131:16)
Additional context
- JSON Base64 (file.data) hits Express/body-parser limit (~50 MB) with PayloadTooLargeError, so file.url is the only viable JSON route for large media.
- Attempting multipart/form-data against WAHA endpoints appears unsupported; POST multipart to /api/sendFile results in:
TypeError: Cannot read properties of undefined (reading 'session')
at ChattingController.sendFile (.../api/chatting.controller.js:37:71)
This indicates WAHA expects JSON bodies, not multipart.
- In contrast, a separate Go-based WhatsApp API we use (outside WAHA) supports multipart/form-data uploads (streaming binary) and does not exhibit the 128 MiB limit, which suggests the constraint is specific to the WAHA GoWS/gRPC path.
Questions for maintainers
- Is the ~128 MiB limit inherent to the current GoWS/gRPC implementation? Is there a config to increase the max message size?
- Are there plans to support streaming/chunked media when using file.url so that larger files don’t overflow gRPC message size?
- Will WAHA support an official multipart/form-data upload path (binary stream), which could bypass JSON/body limits and gRPC message-size constraints?
- If the limit is intentional, could it be documented clearly (e.g., Base64 JSON ~50 MB, URL ~128 MiB) along with official workarounds?