[NOWEB] - /api/sendImage fails to upload media on version 2025.9.5 ~ 2025.10.2
Describe the bug
After updating to WAHA Plus version 2025.9.8 (engine: NOWEB), the /api/sendImage endpoint stopped working. It consistently returns the error:
Media upload failed on all hosts
In version 2025.9.7, /api/sendImage worked normally, even though that version had a different issue (duplicate sending bug).
Version
{
"version": "2025.9.8",
"engine": "NOWEB",
"tier": "PLUS",
"browser": null
}
Steps
To Reproduce Steps to reproduce the behavior:
- Run WAHA Plus version 2025.9.8 (engine NOWEB).
- Send a POST request to /api/sendImage with a public image URL.
- Observe the error response "Media upload failed on all hosts".
Actual response
{
"statusCode": 500,
"timestamp": "2025-10-05T23:15:17.558Z",
"exception": {
"message": "Media upload failed on all hosts",
"data": null,
"isBoom": true,
"isServer": true,
"output": {},
"name": "Error",
"stack": "Error: Media upload failed on all hosts\n at Object.upload ..."
},
"request": {
"path": "/api/sendImage",
"method": "POST",
"body": {
"chatId": "[email protected]",
"file": {
"mimetype": "image/png",
"url": "https://example.domain.app/image_link/demo/repair_note.png",
"filename": "note.png"
},
"caption": "Test sending image via API",
"session": "demo_session_1"
},
"query": {}
},
"version": {
"version": "2025.9.8",
"engine": "NOWEB",
"tier": "PLUS",
"browser": null
}
}
⚠️ Note: All data above (phone numbers, URLs, filenames, session names) have been anonymized and are not real.
Hi! Could you check docker logs when it happens?
docker compose logs -f
and send /api/sendImage request?
Hi! Could you check docker logs when it happens?
docker compose logs -fand send
/api/sendImagerequest?
Hi, thanks for your quick response! 🙏
Unfortunately, I can’t perform detailed debugging immediately because my WAHA instance runs on a production server with several active clients. Enabling debug logs or reproducing the issue in real time could potentially interrupt ongoing sessions, so I need to wait for a low-traffic window (usually early morning UTC+7) before I can safely capture logs.
If possible, please also try reproducing this issue on your side — it happens consistently right after upgrading.
Here’s a quick summary of what I observed:
- Upgraded from 2025.9.3 → 2025.9.8 → got the error:
Media upload failed on all hosts
- Downgraded back to 2025.9.3, and everything worked fine again.
- Tried upgrading again to 2025.9.8 the next day → same error appeared.
- Downgraded again to 2025.9.3 (since versions 2025.9.5 – 2025.9.7 had another bug: every message was sent 3 times per request).
- I didn’t test version 2025.9.4.
So the /api/sendImage issue seems specific to 2025.9.8, while the duplicate-sending issue occurred between 2025.9.5 and 2025.9.7.
Below is the actual API response when the issue occurs (with sensitive request data partially masked):
{
"statusCode": 500,
"timestamp": "2025-10-05T23:15:17.558Z",
"exception": {
"message": "Media upload failed on all hosts",
"data": null,
"isBoom": true,
"isServer": true,
"output": {},
"name": "Error",
"stack": "Error: Media upload failed on all hosts\n at Object.upload (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages-media.js:578:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:146:28\n at async Promise.all (index 0)\n at async prepareWAMessageMedia (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:144:40)\n at async generateWAMessageContent (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:467:13)\n at async generateWAMessage (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:589:46)\n at async Object.sendMessage (file:///app/node_modules/@adiwajshing/baileys/lib/Socket/messages-send.js:889:33)"
},
"request": {
"path": "/api/sendImage",
"method": "POST",
"body": {
"chatId": "[email protected]",
"file": {
"mimetype": "image/png",
"url": "https://example.domain.app/image_link/.../repair_receipt_note.png",
"filename": "note.png"
},
"caption": "Test send image",
"session": "demo_session"
},
"query": {}
},
"version": {
"version": "2025.9.8",
"engine": "NOWEB",
"tier": "PLUS",
"browser": null
}
}
⚠️ Note: Only the "request" data has been masked — other fields are kept intact in case you need file location references (e.g., @adiwajshing/baileys/...).
I’ll try to collect full debug logs during the next maintenance window and share them once available. Thanks again for looking into this! 🙌
+1
Could you test 2025.10.1 🙏
Hi 👋 Yes, I’ve already tested version 2025.10.1 — unfortunately, the issue still persists. The /api/sendImage endpoint continues to fail with the same error (Media upload failed on all hosts).
I’ve created a new detailed bug report for this under post #1486, which includes the full API response, Docker logs, and environment details for version 2025.10.1.
Please check that issue for all updated information. 🙏
Portuguese
Title:
Você poderia testar 2025.10.1 🙏
Olá 👋 Sim, já testei a versão 2025.10.1 — infelizmente, o problema ainda persiste. O endpoint /api/sendImage continua falhando com o mesmo erro (falha no upload de mídia em todos os hosts).
Criei um novo relatório de bug detalhado para isso na postagem nº 1486, que inclui a resposta completa da API, logs do Docker e detalhes do ambiente para a versão 2025.10.1.
Verifique esse problema para obter todas as informações atualizadas. 🙏
Portuguese
Title:
Oi! Você poderia tentar adicionar isso à variável env?
NODE_TLS_REJECT_UNAUTHORIZED=0
Hi! Could you try to add this to env variable?
NODE_TLS_REJECT_UNAUTHORIZED=0
Hi 👋
Thanks for your quick response. I’ve added the suggested environment variable to my WAHA configuration:
NODE_TLS_REJECT_UNAUTHORIZED=0
Unfortunately, the issue still persists — there’s no change in behavior.
The /api/sendImage endpoint continues to fail with the same error:
{
"statusCode": 500,
"timestamp": "2025-10-13T03:47:32.614Z",
"exception": {
"message": "Media upload failed on all hosts",
"data": null,
"isBoom": true,
"isServer": true,
"output": {},
"name": "Error",
"stack": "Error: Media upload failed on all hosts\n at Object.upload (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages-media.js:578:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:146:28\n at async Promise.all (index 0)\n at async prepareWAMessageMedia (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:144:40)\n at async generateWAMessageContent (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:467:13)\n at async generateWAMessage (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:589:46)\n at async Object.sendMessage (file:///app/node_modules/@adiwajshing/baileys/lib/Socket/messages-send.js:893:33)"
},
"request": {
"path": "/api/sendImage",
"method": "POST",
"body": {
"chatId": "[email protected]",
"file": {
"mimetype": "image/jpeg",
"url": "https://example.domain.app/image_link/demo/whatsapp_media/sample_image.jpg",
"filename": "image.jpg"
},
"caption": "Test sending image with NODE_TLS_REJECT_UNAUTHORIZED=0",
"session": "demo_session_1"
},
"query": {}
},
"version": {
"version": "2025.10.1",
"engine": "NOWEB",
"tier": "PLUS",
"browser": null
}
}
⚠️ Note: Sensitive values like phone numbers and URLs have been sanitized for privacy, but the response structure and error trace remain unchanged.
At this point, it seems this issue is not related to TLS verification. Could you please confirm if there’s any specific dependency or module update in Baileys or NOWEB engine that could be affecting media upload handling?
Thanks again for your time and assistance 🙏
Portuguese
Title:
Olá! Você poderia tentar adicionar isso à variável env?
NODE_TLS_REJECT_UNAUTHORIZED=0
Olá 👋
Obrigado pela sua resposta rápida. Adicionei a variável de ambiente sugerida à minha configuração WAHA:
NODE_TLS_REJECT_UNAUTHORIZED=0
Infelizmente, o problema ainda persiste — não há nenhuma mudança de comportamento.
O endpoint /api/sendImage continua falhando com o mesmo erro:
{
"statusCode": 500,
"carimbo de data/hora": "2025-10-13T03:47:32.614Z",
"exceção": {
"message": "Falha no upload de mídia em todos os hosts",
"dados": nulo,
"isBoom": verdadeiro,
"isServer": verdadeiro,
"saída": {},
"nome": "Erro",
"stack": "Erro: falha no upload de mídia em todos os hosts\n em Object.upload (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages-media.js:578:19)\n em process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n em arquivo assíncrono:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:146:28\n em async Promise.all (índice 0)\n em assíncrono prepareWAMessageMedia (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:144:40)\n em generateWAMessageContent assíncrono (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:467:13)\n em assíncrono generateWAMessage (file:///app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:589:46)\n em async Object.sendMessage (arquivo:///app/node_modules/@adiwajshing/baileys/lib/Socket/messages-send.js:893:33)"
},
"solicitar": {
"caminho": "/api/sendImage",
"método": "POST",
"corpo": {
"chatId": "[email protected]",
"arquivo": {
"mimetype": "imagem/jpeg",
"url": "https://example.domain.app/image_link/demo/whatsapp_media/sample_image.jpg",
"nome do arquivo": "imagem.jpg"
},
"caption": "Teste o envio de imagem com NODE_TLS_REJECT_UNAUTHORIZED=0",
"sessão": "demo_session_1"
},
"consulta": {}
},
"versão": {
"versão": "2025.10.1",
"motor": "NOWEB",
"camada": "MAIS",
"navegador": nulo
}
}
⚠️ Observação: valores confidenciais, como números de telefone e URLs, foram limpos para fins de privacidade, mas a estrutura de resposta e o rastreamento de erros permanecem inalterados.
Neste ponto, parece que este problema não está relacionado à verificação TLS. Você poderia confirmar se há alguma dependência específica ou atualização de módulo no mecanismo Baileys ou NOWEB que possa estar afetando o processamento de upload de mídia?
Obrigado novamente pelo seu tempo e ajuda 🙏
Portuguese
Title:
mesmo bug em WEBJS "a imagem já está mais disponível" ou "falha ao carregar"
Portuguese
Title:
O mesmo grande acontecimento aqui... Alguma solução?
Could you check docker logs when you send the image and search for any uploadResult or upload failed, reason string?
Portuguese
Title:
Você poderia verificar os logs do docker ao enviar a imagem e procurar por qualquer string uploadResult?