WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.6k stars 1.21k forks source link

[BUG] DONT CANT SEND MESSAGE ALL MEDIA #941

Open Yuri-Neko opened 1 month ago

Yuri-Neko commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Created a new connection
  2. Closed & used saved credentials to log back in
  3. Etc.

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

AxiosError: getaddrinfo ENOTFOUND mmg.whatsapp.net at AxiosError.from (/home/container/node_modules/@whiskeysockets/baileys/node_modules/axios/dist/node/axios.cjs:841:14) at RedirectableRequest.handleRequestError (/home/container/node_modules/@whiskeysockets/baileys/node_modules/axios/dist/node/axios.cjs:3106:25) at RedirectableRequest.emit (node:events:519:28) at eventHandlers. (/home/container/node_modules/follow-redirects/index.js:38:24) at ClientRequest.emit (node:events:519:28) at TLSSocket.socketErrorListener (node:_http_client:500:9) at TLSSocket.emit (node:events:519:28) at emitErrorNT (node:internal/streams/destroy:169:8) at emitErrorCloseNT (node:internal/streams/destroy:128:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) at Axios.request (/home/container/node_modules/@whiskeysockets/baileys/node_modules/axios/dist/node/axios.cjs:4224:41) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async getHttpStream (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.js:320:21) at async getStream (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.js:281:26) at async encryptedStream (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.js:369:30) at async prepareWAMessageMedia (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js:114:110) at async generateWAMessageContent (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js:376:13) at async generateWAMessage (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js:528:59) at async Object.sendMessage (/home/container/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:690:33) { hostname: 'mmg.whatsapp.net', syscall: 'getaddrinfo', code: 'ENOTFOUND', errno: -3008, 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: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, /', 'Content-Type': undefined, 'User-Agent': 'axios/1.7.2', 'Accept-Encoding': 'gzip, compress, deflate, br' }, responseType: 'stream', method: 'get', url: 'https://mmg.whatsapp.net/o1/v/t62.7118-24/f1/m232/up-oil-image-36371026-4d71-416c-b024-4ffebc4dbf1b?ccb=9-4&oh=01_Q5AaILqBcXmKK_hF0yWA9Pe9-OchY-z6FZIPEnlUHUb_RG75&oe=66CAED62&_nc_sid=000000&mms3=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(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
  maxRedirects: 21,
  maxBodyLength: Infinity,
  protocol: 'https:',
  path: '/o1/v/t62.7118-24/f1/m232/up-oil-image-36371026-4d71-416c-b024-4ffebc4dbf1b?ccb=9-4&oh=01_Q5AaILqBcXmKK_hF0yWA9Pe9-OchY-z6FZIPEnlUHUb_RG75&oe=66CAED62&_nc_sid=000000&mms3=true',
  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/t62.7118-24/f1/m232/up-oil-image-36371026-4d71-416c-b024-4ffebc4dbf1b',
  search: '?ccb=9-4&oh=01_Q5AaILqBcXmKK_hF0yWA9Pe9-OchY-z6FZIPEnlUHUb_RG75&oe=66CAED62&_nc_sid=000000&mms3=true'
},
_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,
  _header: 'GET /o1/v/t62.7118-24/f1/m232/up-oil-image-36371026-4d71-416c-b024-4ffebc4dbf1b?ccb=9-4&oh=01_Q5AaILqBcXmKK_hF0yWA9Pe9-OchY-z6FZIPEnlUHUb_RG75&oe=66CAED62&_nc_sid=000000&mms3=true HTTP/1.1\r\n' +
    'Accept: application/json, text/plain, */*\r\n' +
    'User-Agent: axios/1.7.2\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/t62.7118-24/f1/m232/up-oil-image-36371026-4d71-416c-b024-4ffebc4dbf1b?ccb=9-4&oh=01_Q5AaILqBcXmKK_hF0yWA9Pe9-OchY-z6FZIPEnlUHUb_RG75&oe=66CAED62&_nc_sid=000000&mms3=true',
  _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(kChunkedBuffer)]: [],
  [Symbol(kChunkedLength)]: 0,
  [Symbol(kSocket)]: [TLSSocket],
  [Symbol(kOutHeaders)]: [Object: null prototype],
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'https://mmg.whatsapp.net/o1/v/t62.7118-24/f1/m232/up-oil-image-36371026-4d71-416c-b024-4ffebc4dbf1b?ccb=9-4&oh=01_Q5AaILqBcXmKK_hF0yWA9Pe9-OchY-z6FZIPEnlUHUb_RG75&oe=66CAED62&_nc_sid=000000&mms3=true',
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false

}, cause: Error: getaddrinfo ENOTFOUND mmg.whatsapp.net at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'mmg.whatsapp.net' } } unhandledRejection

Yuri-Neko commented 1 month ago

Error: Media upload failed on all hosts at /home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.js:636:19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.upload (/home/container/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:705:36) at async /home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js:123:28 at async Promise.all (index 0) at async prepareWAMessageMedia (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js:121:48) at async generateWAMessageContent (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js:376:13) at async generateWAMessage (/home/container/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js:528:59) at async Object.sendMessage (/home/container/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:690:33) at async conn.sendFile (/home/container/lib/simple.js:914:15) { data: null, isBoom: true, isServer: true, output: { statusCode: 500, payload: { statusCode: 500, error: 'Internal Server Error', message: 'An internal server error occurred' }, headers: {} } } unhandledRejection

adithyan-hermit commented 1 month ago

same

yamadaMk12 commented 1 month ago

Same here