evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

failed to receive forwarded images.

Open douglasfranciscon opened this issue 1 year ago • 6 comments

Welcome!

  • [x] Yes, I have searched for similar issues on GitHub and found none.

What did you do?

I updated from 2.2.3 to 2.3.1 and started having issues receiving some messages where the client forwarded a WhatsApp image received in another conversation. I downgraded to version 2.3.0 and the issue was resolved. I was able to reproduce it easily. If I take a photo from a conversation with another person and forward it, it no longer appears in base64 format in the payload. When I reverted to 2.3.0, I again received the base64 image in body.data.message.base64.

What did you expect?

the image sent in the conversation must be received in body.data.message.base64.

What did you observe instead of what you expected?

for any razon, the payload do not contains base64

Screenshots/Videos

No response

Which version of the API are you using?

v2.3.1

What is your environment?

Windows

Other environment specifications

No response

If applicable, paste the log output

No response

Additional Notes

No response

douglasfranciscon avatar Aug 26 '25 15:08 douglasfranciscon

A partir de hoje de manhã, comecei a enfrentar o mesmo problema. Consegui capturar um log, apresenta ser um link ou arquivo quebrado, fiZ a conversão de binário para base64, depois para imagem jpeg, não carrega a imagem.

Starting this morning, I started experiencing the same issue. I managed to capture a log, and it appears to be a broken link or file. It keeps converting from binary to base64, then to image, but the image won't load.

*** LOG ERROR: ***

[Evolution API]  [instance-name]  v2.3.0  212   -  Tue Aug 26 2025 11:10:25     ERROR   [ChannelStartupService]  [string]  Error processing media message: 
[Evolution API]  [instance-name]  v2.3.0  212   -  Tue Aug 26 2025 11:10:25     ERROR   [ChannelStartupService]  [object]   
AxiosError [AggregateError]
    at AxiosError.from (/evolution/node_modules/axios/dist/node/axios.cjs:863:14)
    at RedirectableRequest.handleRequestError (/evolution/node_modules/axios/dist/node/axios.cjs:3191:25)
    at RedirectableRequest.emit (node:events:524:28)
    at eventHandlers.<computed> (/evolution/node_modules/follow-redirects/index.js:49:24)
    at ClientRequest.emit (node:events:524:28)
    at emitErrorEvent (node:_http_client:101:11)
    at TLSSocket.socketErrorListener (node:_http_client:504:5)
    at TLSSocket.emit (node:events:524:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at Axios.request (/evolution/node_modules/axios/dist/node/axios.cjs:4280:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getHttpStream (/evolution/node_modules/baileys/lib/Utils/messages-media.js:318:21)
    at async downloadEncryptedContent (/evolution/node_modules/baileys/lib/Utils/messages-media.js:446:21)
    at async downloadMsg (/evolution/node_modules/baileys/lib/Utils/messages.js:743:24)
    at async downloadMediaMessage (/evolution/node_modules/baileys/lib/Utils/messages.js:707:20)
    at async Bs.getBase64FromMediaMessage (/evolution/dist/main.js:247:6079)
    at async Re.eventWhatsapp (/evolution/dist/main.js:124:1831)
    at async messages.upsert (/evolution/dist/main.js:226:25418) {
  code: 'ETIMEDOUT',
  errors: [
    Error: connect ETIMEDOUT 57.144.153.32:443
        at createConnectionError (node:net:1652:14)
        at Timeout.internalConnectMultipleTimeout (node:net:1711:38)
        at listOnTimeout (node:internal/timers:583:11)
        at process.processTimers (node:internal/timers:519:7) {
      errno: -110,
      code: 'ETIMEDOUT',
      syscall: 'connect',
      address: '57.144.153.32',
      port: 443
    },
    Error: connect ENETUNREACH 2a03:2880:f34c:120:face:b00c:0:167:443 - Local (:::0)
        at internalConnectMultiple (node:net:1186:16)
        at Timeout.internalConnectMultipleTimeout (node:net:1716:5)
        at listOnTimeout (node:internal/timers:583:11)
        at process.processTimers (node:internal/timers:519:7) {
      errno: -101,
      code: 'ENETUNREACH',
      syscall: 'connect',
      address: '2a03:2880:f34c:120:face:b00c:0:167',
      port: 443
    }
  ],
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http', 'fetch' ],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: Infinity,
    maxBodyLength: Infinity,
    env: { FormData: [Function [FormData]], Blob: [class Blob] },
    validateStatus: [Function: validateStatus],
    headers: Object [AxiosHeaders] {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': undefined,
      Origin: 'https://web.whatsapp.com',
      'User-Agent': 'axios/1.10.0',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    responseType: 'stream',
    method: 'get',
    url: 'https://mmg.whatsapp.net/o1/v/t24/f2/m239/AQP0r_su0tVZ-6EmLSFSxSf_373.....',
    allowAbsoluteUrls: true,
    data: undefined
  },
  request: <ref *1> Writable {
    _events: {
      close: undefined,
      error: [Function: handleRequestError],
      prefinish: undefined,
      finish: undefined,
      drain: undefined,
      response: [Function: handleResponse],
      socket: [Function: handleRequestSocket]
    },
    _writableState: WritableState {
      highWaterMark: 16384,
      length: 0,
      corked: 0,
      onwrite: [Function: bound onwrite],
      writelen: 0,
      bufferedIndex: 0,
      pendingcb: 0,
      [Symbol(kState)]: 17580812,
      [Symbol(kBufferedValue)]: null
    },
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'https:',
      path: '/o1/v/t24/f2/m239/AQP0r_su0tVZ-6EmLSFSxSf_373jotzXv67el4kGpxAfUui8v.....',
      method: 'GET',
      headers: [Object: null prototype],
      agents: [Object],
      auth: undefined,
      family: undefined,
      beforeRedirect: [Function: dispatchBeforeRedirect],
      beforeRedirects: [Object],
      hostname: 'mmg.whatsapp.net',
      port: '',
      agent: undefined,
      nativeProtocols: [Object],
      pathname: '/o1/v/t24/f2/m239/AQP0r_su0tVZ-6EmLSFSxSf_373jotzXv67el4kG....
    },
    _ended: true,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 0,
    _requestBodyBuffers: [],
    _eventsCount: 3,
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: true,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /o1/v/t24/f2/m239/AQP0r_su0tVZ-6EmLSFSxSf_373jotzXv67el4kGpxAfUui8vHhQhb7AIS3PRs4y_JZ1YNQ5XCUQdMyWPm-93gRvpleGRv765gXS3OdF4Q?ccb=9-4&oh=01_Q5Aa2QGckjePIx9LWp82Y5uVCqAJUa7mnZOMFA8iJF7hizkeDQ&oe=68D5273B&_nc_sid=e6ed6c&mms3=true HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Origin: https://web.whatsapp.com\r\n' +
        'User-Agent: axios/1.10.0\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'Host: mmg.whatsapp.net\r\n' +
        'Connection: keep-alive\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/o1/v/t24/f2/m239/AQP0r_su0tVZ-6EmLSFSxSf_373jotzXv67el4kG...',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: [Function: emitRequestTimeout],
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'mmg.whatsapp.net',
      protocol: 'https:',
      _redirectable: [Circular *1],
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'https://mmg.whatsapp.net/o1/v/t24/f2/m239/AQP....',
    [Symbol(shapeMode)]: true,
    [Symbol(kCapture)]: false
  },
  cause: AggregateError [ETIMEDOUT]: 
      at internalConnectMultiple (node:net:1122:18)
      at internalConnectMultiple (node:net:1190:5)
      at Timeout.internalConnectMultipleTimeout (node:net:1716:5)
      at listOnTimeout (node:internal/timers:583:11)
      at process.processTimers (node:internal/timers:519:7) {
    code: 'ETIMEDOUT',
    [errors]: [ [Error], [Error] ]
  }
} 

[Evolution API]    v2.3.0  212   -  Tue Aug 26 2025 11:10:25     ERROR   [ChatwootService]  [object]   
{ status: 400, error: 'Bad Request', message: [ 'AggregateError' ] }

jonathanpog98 avatar Aug 26 '25 16:08 jonathanpog98

Comigo começou ontem pela manhã, a maioria das imagens enviadas pela evolution api não carregam quando recebidas em dispositivos IOS, destinatarios android recebem normalmente. Fiz os testes nas seguintes versões da Evolution que tenho instalado: 2.3.1, Homolog, 1.8.6 e 1.8.7. O problema ocorre enviando tanto pelo Chatwoot quanto diretamente pela API por meio do Endpoint, suspeito do problema ser no próprio app do Whatsapp, o estranho é que enviando mensagem diretamente pelo Whatsapp web ou por outra API como o Whatsapp-js a imagem carrega normalmente quando recebida no IOS.

Image

Flow-Sistemas avatar Aug 26 '25 17:08 Flow-Sistemas

Mesmo problema aqui!

w-mcardoso avatar Aug 26 '25 18:08 w-mcardoso

Observado o problema apenas em dispositivos iOS e no formato PNG. Seria interessante alguém aí com Android para poder validar. O que depende de envio via N8N, eu consegui converter em JPG e faço o envio normal.

agvirgula avatar Aug 26 '25 21:08 agvirgula

Observado o problema apenas em dispositivos iOS e no formato PNG. Seria interessante alguém aí com Android para poder validar. O que depende de envio via N8N, eu consegui converter em JPG e faço o envio normal.

no android tb não funciona. pelo visto houve mudança e a imagem vem criptografada e precisa descriptografar para funcionar. No N8N consegui receber a imagem usando o node na Evolution - n8n-nodes-evolution-api

fredericopaulista avatar Aug 27 '25 11:08 fredericopaulista

Olá! Estamos fazendo uma triagem do backlog para focar nos bugs reproduzíveis nas versões atuais.

Esta issue foi reportada em uma versão anterior do Evolution API, sem atividade recente. Nesse intervalo lançamos várias versões com correções e mudanças significativas no Baileys, na camada de webhooks e na integração com Cloud API.

Versões atuais:

  • Latest stable: v2.3.7 (Dezembro/2025)
  • Pre-release: 2.4.0-rc2 (Maio/2026) — recomendada para testar fixes mais recentes

Vamos fechar esta issue por inatividade. Se você ainda reproduz o problema na 2.3.7 ou na 2.4.0-rc2, por favor:

  1. Abra uma nova issue usando o template Bug Report
  2. Inclua: versão exata testada, passos para reproduzir, logs do servidor, payload de exemplo
  3. Linke esta issue na nova para preservar o histórico

Obrigado pela contribuição original e pela paciência!

DavidsonGomes avatar May 19 '26 14:05 DavidsonGomes