wa-automate-nodejs
wa-automate-nodejs copied to clipboard
SendLinkWithAutoPreview not working as expected: link.openwa.cloud throws error for all sites
Are you using the latest version of the library?
- [x] I have checked and am using the latest version of the library.
What type of session are you experiencing this issue on?
Legacy (Normal)
What type of host account are you experiencing this issue on?
Personal account (normal)
Mode
EASY API/CLI
Current Behavior
https://github.com/open-wa/wa-automate-nodejs/issues/2744#issuecomment-1159212688 I requested with the exact same payload as in the example above
Expected Behavior
Message gets sent (It currently does not)
Steps To Reproduce
- Run command with payload in api-docs on swagger
create() code OR full CLI command + CONFIG
DEBUG INFO
WA_VERSION: 2.3000.1021410019
PAGE_UA: WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
WA_AUTOMATE_VERSION: 4.76.0
BROWSER_VERSION: Chrome/131.0.6778.204
OS: Linux 6.8
START_TS: 1743430868060
RAM_INFO: Total: 8.33 GB | Free: 7.50 GB
PPTR_VERSION: 23.11.1
Environment
- OS: Ubuntu 24.04 LTS
- Node: v18.19.1
- npm: 9.2.0
Screenshots/Logs
AxiosError: Request failed with status code 500 0|phone1 | at settle (/opt/wa-sessions/node_modules/axios/dist/node/axios.cjs:2031:12) 0|phone1 | at IncomingMessage.handleStreamEnd (/opt/wa-sessions/node_modules/axios/dist/node/axios.cjs:3148:11) 0|phone1 | at IncomingMessage.emit (node:events:529:35) 0|phone1 | at endReadableNT (node:internal/streams/readable:1400:12) 0|phone1 | at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 0|phone1 | at Axios.request (/opt/wa-sessions/node_modules/axios/dist/node/axios.cjs:4258:41) 0|phone1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { 0|phone1 | code: 'ERR_BAD_RESPONSE', 0|phone1 | config: { 0|phone1 | transitional: { 0|phone1 | silentJSONParsing: true, 0|phone1 | forcedJSONParsing: true, 0|phone1 | clarifyTimeoutError: false 0|phone1 | }, 0|phone1 | adapter: [ 'xhr', 'http', 'fetch' ], 0|phone1 | transformRequest: [ [Function: transformRequest] ], 0|phone1 | transformResponse: [ [Function: transformResponse] ], 0|phone1 | timeout: 0, 0|phone1 | xsrfCookieName: 'XSRF-TOKEN', 0|phone1 | xsrfHeaderName: 'X-XSRF-TOKEN', 0|phone1 | maxContentLength: -1, 0|phone1 | maxBodyLength: -1, 0|phone1 | env: { FormData: [Function [FormData]], Blob: [class Blob] }, 0|phone1 | validateStatus: [Function: validateStatus], 0|phone1 | headers: Object [AxiosHeaders] { 0|phone1 | Accept: 'application/json, text/plain, */*', 0|phone1 | 'Content-Type': undefined, 0|phone1 | 'User-Agent': 'axios/1.8.4', 0|phone1 | 'Accept-Encoding': 'gzip, compress, deflate, br' 0|phone1 | }, 0|phone1 | method: 'get', 0|phone1 | url: 'https://link.openwa.cloud/api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6', 0|phone1 | allowAbsoluteUrls: true, 0|phone1 | data: undefined 0|phone1 | }, 0|phone1 | request: <ref *1> ClientRequest { 0|phone1 | _events: [Object: null prototype] { 0|phone1 | abort: [Function (anonymous)], 0|phone1 | aborted: [Function (anonymous)], 0|phone1 | connect: [Function (anonymous)], 0|phone1 | error: [Function (anonymous)], 0|phone1 | socket: [Function (anonymous)], 0|phone1 | timeout: [Function (anonymous)], 0|phone1 | finish: [Function: requestOnFinish] 0|phone1 | }, 0|phone1 | _eventsCount: 7, 0|phone1 | _maxListeners: undefined, 0|phone1 | outputData: [], 0|phone1 | outputSize: 0, 0|phone1 | writable: true, 0|phone1 | destroyed: false, 0|phone1 | _last: true, 0|phone1 | chunkedEncoding: false, 0|phone1 | shouldKeepAlive: false, 0|phone1 | maxRequestsOnConnectionReached: false, 0|phone1 | _defaultKeepAlive: true, 0|phone1 | useChunkedEncodingByDefault: false, 0|phone1 | sendDate: false, 0|phone1 | _removedConnection: false, 0|phone1 | _removedContLen: false, 0|phone1 | _removedTE: false, 0|phone1 | strictContentLength: false, 0|phone1 | _contentLength: 0, 0|phone1 | _hasBody: true, 0|phone1 | _trailer: '', 0|phone1 | finished: true, 0|phone1 | _headerSent: true, 0|phone1 | _closed: false, 0|phone1 | socket: TLSSocket { 0|phone1 | _tlsOptions: [Object], 0|phone1 | _secureEstablished: true, 0|phone1 | _securePending: false, 0|phone1 | _newSessionPending: false, 0|phone1 | _controlReleased: true, 0|phone1 | secureConnecting: false, 0|phone1 | _SNICallback: null, 0|phone1 | servername: 'link.openwa.cloud', 0|phone1 | alpnProtocol: false, 0|phone1 | authorized: true, 0|phone1 | authorizationError: null, 0|phone1 | encrypted: true, 0|phone1 | _events: [Object: null prototype], 0|phone1 | _eventsCount: 10, 0|phone1 | connecting: false, 0|phone1 | _hadError: false, 0|phone1 | _parent: null, 0|phone1 | _host: 'link.openwa.cloud', 0|phone1 | _closeAfterHandlingError: false, 0|phone1 | _readableState: [ReadableState], 0|phone1 | _maxListeners: undefined, 0|phone1 | _writableState: [WritableState], 0|phone1 | allowHalfOpen: false, 0|phone1 | _sockname: null, 0|phone1 | _pendingData: null, 0|phone1 | _pendingEncoding: '', 0|phone1 | server: undefined, 0|phone1 | _server: null, 0|phone1 | ssl: [TLSWrap], 0|phone1 | _requestCert: true, 0|phone1 | _rejectUnauthorized: true, 0|phone1 | parser: null, 0|phone1 | _httpMessage: [Circular *1], 0|phone1 | [Symbol(alpncallback)]: null, 0|phone1 | [Symbol(res)]: [TLSWrap], 0|phone1 | [Symbol(verified)]: true, 0|phone1 | [Symbol(pendingSession)]: null, 0|phone1 | [Symbol(async_id_symbol)]: 58570, 0|phone1 | [Symbol(kHandle)]: [TLSWrap], 0|phone1 | [Symbol(lastWriteQueueSize)]: 0, 0|phone1 | [Symbol(timeout)]: null, 0|phone1 | [Symbol(kBuffer)]: null, 0|phone1 | [Symbol(kBufferCb)]: null, 0|phone1 | [Symbol(kBufferGen)]: null, 0|phone1 | [Symbol(kCapture)]: false, 0|phone1 | [Symbol(kSetNoDelay)]: false, 0|phone1 | [Symbol(kSetKeepAlive)]: true, 0|phone1 | [Symbol(kSetKeepAliveInitialDelay)]: 60, 0|phone1 | [Symbol(kBytesRead)]: 0, 0|phone1 | [Symbol(kBytesWritten)]: 0, 0|phone1 | [Symbol(connect-options)]: [Object] 0|phone1 | }, 0|phone1 | _header: 'GET /api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6 HTTP/1.1\r\n' + 0|phone1 | 'Accept: application/json, text/plain, */*\r\n' + 0|phone1 | 'User-Agent: axios/1.8.4\r\n' + 0|phone1 | 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 0|phone1 | 'Host: link.openwa.cloud\r\n' + 0|phone1 | 'Connection: close\r\n' + 0|phone1 | '\r\n', 0|phone1 | _keepAliveTimeout: 0, 0|phone1 | _onPendingData: [Function: nop], 0|phone1 | agent: Agent { 0|phone1 | _events: [Object: null prototype], 0|phone1 | _eventsCount: 2, 0|phone1 | _maxListeners: undefined, 0|phone1 | defaultPort: 443, 0|phone1 | protocol: 'https:', 0|phone1 | options: [Object: null prototype], 0|phone1 | requests: [Object: null prototype] {}, 0|phone1 | sockets: [Object: null prototype], 0|phone1 | freeSockets: [Object: null prototype] {}, 0|phone1 | keepAliveMsecs: 1000, 0|phone1 | keepAlive: false, 0|phone1 | maxSockets: Infinity, 0|phone1 | maxFreeSockets: 256, 0|phone1 | scheduling: 'lifo', 0|phone1 | maxTotalSockets: Infinity, 0|phone1 | totalSocketCount: 1, 0|phone1 | maxCachedSessions: 100, 0|phone1 | _sessionCache: [Object], 0|phone1 | [Symbol(kCapture)]: false 0|phone1 | }, 0|phone1 | socketPath: undefined, 0|phone1 | method: 'GET', 0|phone1 | maxHeaderSize: undefined, 0|phone1 | insecureHTTPParser: undefined, 0|phone1 | joinDuplicateHeaders: undefined, 0|phone1 | path: '/api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6', 0|phone1 | _ended: true, 0|phone1 | res: IncomingMessage { 0|phone1 | _readableState: [ReadableState], 0|phone1 | _events: [Object: null prototype], 0|phone1 | _eventsCount: 4, 0|phone1 | _maxListeners: undefined, 0|phone1 | socket: [TLSSocket], 0|phone1 | httpVersionMajor: 1, 0|phone1 | httpVersionMinor: 1, 0|phone1 | httpVersion: '1.1', 0|phone1 | complete: true, 0|phone1 | rawHeaders: [Array], 0|phone1 | rawTrailers: [], 0|phone1 | joinDuplicateHeaders: undefined, 0|phone1 | aborted: false, 0|phone1 | upgrade: false, 0|phone1 | url: '', 0|phone1 | method: null, 0|phone1 | statusCode: 500, 0|phone1 | statusMessage: 'Internal Server Error', 0|phone1 | client: [TLSSocket], 0|phone1 | _consuming: false, 0|phone1 | _dumped: false, 0|phone1 | req: [Circular *1], 0|phone1 | responseUrl: 'https://link.openwa.cloud/api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6', 0|phone1 | redirects: [], 0|phone1 | [Symbol(kCapture)]: false, 0|phone1 | [Symbol(kHeaders)]: [Object], 0|phone1 | [Symbol(kHeadersCount)]: 28, 0|phone1 | [Symbol(kTrailers)]: null, 0|phone1 | [Symbol(kTrailersCount)]: 0 0|phone1 | }, 0|phone1 | aborted: false, 0|phone1 | timeoutCb: null, 0|phone1 | upgradeOrConnect: false, 0|phone1 | parser: null, 0|phone1 | maxHeadersCount: null, 0|phone1 | reusedSocket: false, 0|phone1 | host: 'link.openwa.cloud', 0|phone1 | protocol: 'https:', 0|phone1 | _redirectable: Writable { 0|phone1 | _writableState: [WritableState], 0|phone1 | _events: [Object: null prototype], 0|phone1 | _eventsCount: 3, 0|phone1 | _maxListeners: undefined, 0|phone1 | _options: [Object], 0|phone1 | _ended: true, 0|phone1 | _ending: true, 0|phone1 | _redirectCount: 0, 0|phone1 | _redirects: [], 0|phone1 | _requestBodyLength: 0, 0|phone1 | _requestBodyBuffers: [], 0|phone1 | _onNativeResponse: [Function (anonymous)], 0|phone1 | _currentRequest: [Circular *1], 0|phone1 | _currentUrl: 'https://link.openwa.cloud/api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6', 0|phone1 | [Symbol(kCapture)]: false 0|phone1 | }, 0|phone1 | [Symbol(kCapture)]: false, 0|phone1 | [Symbol(kBytesWritten)]: 0, 0|phone1 | [Symbol(kNeedDrain)]: false, 0|phone1 | [Symbol(corked)]: 0, 0|phone1 | [Symbol(kOutHeaders)]: [Object: null prototype] { 0|phone1 | accept: [Array], 0|phone1 | 'user-agent': [Array], 0|phone1 | 'accept-encoding': [Array], 0|phone1 | host: [Array] 0|phone1 | }, 0|phone1 | [Symbol(errored)]: null, 0|phone1 | [Symbol(kHighWaterMark)]: 16384, 0|phone1 | [Symbol(kRejectNonStandardBodyWrites)]: false, 0|phone1 | [Symbol(kUniqueHeaders)]: null 0|phone1 | }, 0|phone1 | response: { 0|phone1 | status: 500, 0|phone1 | statusText: 'Internal Server Error', 0|phone1 | headers: Object [AxiosHeaders] { 0|phone1 | date: 'Wed, 09 Apr 2025 10:31:44 GMT', 0|phone1 | 'content-type': 'application/json', 0|phone1 | 'content-length': '156', 0|phone1 | connection: 'close', 0|phone1 | server: 'cloudflare', 0|phone1 | vary: 'Accept-Encoding', 0|phone1 | 'cf-ray': '92d956260b061130-ORD', 0|phone1 | 'cf-cache-status': 'HIT', 0|phone1 | age: '75207', 0|phone1 | 'cache-control': 'max-age=14400, s-maxage=999999999999999999999999999', 0|phone1 | 'report-to': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=tpiXdJbK4SdC34sPHThGsYzU1ms%2Btt96E%2Bfz6RRo74vlkZiRG3Va2REL9a0QH5vqEfSOf59%2FC5cRuv3NkXREF1wMArS54%2B8pADgyhZJ9MPOCtMkglp601z%2BL1XUg%2FUWWCQwmBg%3D%3D"}],"group":"cf-nel","max_age":604800}', 0|phone1 | nel: '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}', 0|phone1 | 'alt-svc': 'h3=":443"; ma=86400', 0|phone1 | 'server-timing': 'cfL4;desc="?proto=TCP&rtt=509&min_rtt=502&rtt_var=194&sent=2&recv=5&lost=0&retrans=0&sent_bytes=219&recv_bytes=992&delivery_rate=2884462&cwnd=242&unsent_bytes=0&cid=144973f9b9fb72d3&ts=43&x=0"' 0|phone1 | }, 0|phone1 | config: { 0|phone1 | transitional: [Object], 0|phone1 | adapter: [Array], 0|phone1 | transformRequest: [Array], 0|phone1 | transformResponse: [Array], 0|phone1 | timeout: 0, 0|phone1 | xsrfCookieName: 'XSRF-TOKEN', 0|phone1 | xsrfHeaderName: 'X-XSRF-TOKEN', 0|phone1 | maxContentLength: -1, 0|phone1 | maxBodyLength: -1, 0|phone1 | env: [Object], 0|phone1 | validateStatus: [Function: validateStatus], 0|phone1 | headers: [Object [AxiosHeaders]], 0|phone1 | method: 'get', 0|phone1 | url: 'https://link.openwa.cloud/api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6', 0|phone1 | allowAbsoluteUrls: true, 0|phone1 | data: undefined 0|phone1 | }, 0|phone1 | request: <ref *1> ClientRequest { 0|phone1 | _events: [Object: null prototype], 0|phone1 | _eventsCount: 7, 0|phone1 | _maxListeners: undefined, 0|phone1 | outputData: [], 0|phone1 | outputSize: 0, 0|phone1 | writable: true, 0|phone1 | destroyed: false, 0|phone1 | _last: true, 0|phone1 | chunkedEncoding: false, 0|phone1 | shouldKeepAlive: false, 0|phone1 | maxRequestsOnConnectionReached: false, 0|phone1 | _defaultKeepAlive: true, 0|phone1 | useChunkedEncodingByDefault: false, 0|phone1 | sendDate: false, 0|phone1 | _removedConnection: false, 0|phone1 | _removedContLen: false, 0|phone1 | _removedTE: false, 0|phone1 | strictContentLength: false, 0|phone1 | _contentLength: 0, 0|phone1 | _hasBody: true, 0|phone1 | _trailer: '', 0|phone1 | finished: true, 0|phone1 | _headerSent: true, 0|phone1 | _closed: false, 0|phone1 | socket: [TLSSocket], 0|phone1 | _header: 'GET /api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6 HTTP/1.1\r\n' + 0|phone1 | 'Accept: application/json, text/plain, */*\r\n' + 0|phone1 | 'User-Agent: axios/1.8.4\r\n' + 0|phone1 | 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 0|phone1 | 'Host: link.openwa.cloud\r\n' + 0|phone1 | 'Connection: close\r\n' + 0|phone1 | '\r\n', 0|phone1 | _keepAliveTimeout: 0, 0|phone1 | _onPendingData: [Function: nop], 0|phone1 | agent: [Agent], 0|phone1 | socketPath: undefined, 0|phone1 | method: 'GET', 0|phone1 | maxHeaderSize: undefined, 0|phone1 | insecureHTTPParser: undefined, 0|phone1 | joinDuplicateHeaders: undefined, 0|phone1 | path: '/api?url=https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6', 0|phone1 | _ended: true, 0|phone1 | res: [IncomingMessage], 0|phone1 | aborted: false, 0|phone1 | timeoutCb: null, 0|phone1 | upgradeOrConnect: false, 0|phone1 | parser: null, 0|phone1 | maxHeadersCount: null, 0|phone1 | reusedSocket: false, 0|phone1 | host: 'link.openwa.cloud', 0|phone1 | protocol: 'https:', 0|phone1 | _redirectable: [Writable], 0|phone1 | [Symbol(kCapture)]: false, 0|phone1 | [Symbol(kBytesWritten)]: 0, 0|phone1 | [Symbol(kNeedDrain)]: false, 0|phone1 | [Symbol(corked)]: 0, 0|phone1 | [Symbol(kOutHeaders)]: [Object: null prototype], 0|phone1 | [Symbol(errored)]: null, 0|phone1 | [Symbol(kHighWaterMark)]: 16384, 0|phone1 | [Symbol(kRejectNonStandardBodyWrites)]: false, 0|phone1 | [Symbol(kUniqueHeaders)]: null 0|phone1 | }, 0|phone1 | data: { 0|phone1 | error: Unexpected token 'e', "error code: 502" is not valid JSON, 0|phone1 | url: 'https://amazon.in/United-Colors-Benetton-Shirt-5NS14U008I_Blue/dp/B08MV8P3Z6' 0|phone1 | } 0|phone1 | }, 0|phone1 | status: 500 0|phone1 | }
Anything else?
No response