waha icon indicating copy to clipboard operation
waha copied to clipboard

[BUG][NOWEB] -Send Message Error

Open HuangDaHui opened this issue 1 year ago • 2 comments

{"statusCode":500,"timestamp":"2024-08-06T04:18:26.881Z","exception":{"stack":"TypeError: Cannot read properties of undefined (reading 'match')\n at extractUrlFromText (/app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:39:66)\n at generateLinkPreviewIfRequired (/app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:42:48)\n at generateWAMessageContent (/app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:249:71)\n at generateWAMessage (/app/node_modules/@adiwajshing/baileys/lib/Utils/messages.js:526:102)\n at Object.sendMessage (/app/node_modules/@adiwajshing/baileys/lib/Socket/messages-send.js:628:69)\n at WhatsappSessionNoWebPlus.reply (/app/dist/core/engines/noweb/session.noweb.core.js:406:32)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","message":"Cannot read properties of undefined (reading 'match')","name":"TypeError"},"request":{"path":"/api/reply","method":"POST","body":{"session":"session_d3lfcm","reply_to":"[email protected]_3EB0ED72B669F44C5EE95A","chatId":"[email protected]","caption":"xxxxxx","longitude":0,"latitude":0,"file":{"url":"xxxxx","fileName":"xxxxxx ","mimetype":"image/png"}},"query":{}},"version":{"version":"2024.7.7","engine":"NOWEB","tier":"PLUS","browser":"/usr/bin/chromium"}} This error occasionally occurs when sending messages

HuangDaHui avatar Aug 06 '24 06:08 HuangDaHui

Hi! Could you share the caption field here or in [email protected] :pray: and may be the example of the mesage you're replying to

patron:PRO

devlikepro avatar Aug 06 '24 07:08 devlikepro

Hi! Could you share the caption field here or in [email protected] 🙏 and may be the example of the mesage you're replying to

patron:PRO

{
  "request": {
    "path": "/api/reply",
    "method": "POST",
    "body": {
      "session": "session_d3lfcm",
      "reply_to": "[email protected]_3EB0ED72B669F44C5EE95A",
      "chatId": "[email protected]",
      "caption": "基本計劃就足夠\n- 可接駁1個WhatsApp號碼\n- 已包括2個user login(可增加至total 5個,$300/每月/每位)\n\n月費$560,三個月會係$1680 ",
      "longitude": 0,
      "latitude": 0,
      "file": {
        "url": "https://xxxx.png",
        "fileName": "基本計劃就足夠\n- 可接駁1個WhatsApp號碼\n- 已包括2個user login(可增加至total 5個,$300/每月/每位)\n\n月費$560,三個月會係$1680 ",
        "mimetype": "image/png"
      }
    },
    "query": {}
  },
  "version": {
    "version": "2024.7.7",
    "engine": "NOWEB",
    "tier": "PLUS",
    "browser": "/usr/bin/chromium"
  }
}

Hi!This is request json Can you see if it's helpful

HuangDaHui avatar Aug 07 '24 02:08 HuangDaHui

Are you trying to reply with media message? It's not possible yet https://github.com/devlikeapro/waha/issues/503

Try adding a text field instead

{
  "session": "session_d3lfcm",
  "reply_to": "[email protected]_3EB0ED72B669F44C5EE95A",
  "chatId": "[email protected]",
  "text": "基本計劃就足夠\n- 可接駁1個WhatsApp號碼\n- 已包括2個user login(可增加至total 5個,$300/每月/每位)\n\n月費$560,三個月會係$1680 ",
}

Comment with +1 to get update when "reply a media" is ready! https://github.com/devlikeapro/waha/issues/503

patron:PRO

devlikepro avatar Aug 18 '24 08:08 devlikepro