You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Sending an image to a WhatsApp Channel (@newsletter JID) via POST /api/sendImage fails with a 500 error. The same image sends successfully to a regular chat (@c.us) with the exact same payload structure.
Error received
{
"statusCode": 500,
"exception": {
"message": "msg.avParams is not a function",
"name": "TypeError",
"stack": "TypeError: msg.avParams is not a function\nwindow.WWebJS.sendMessage (pptr:evaluate;WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:36):533:50)\n at window.WWebJS.sendMessage (evaluate at WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:36), :532:49)\n at async WebjsClientCore.sendMessage (/app/node_modules/whatsapp-web.js/src/Client.js:1616:25)"
}
}
Additional context
Tested both with file.url (remote URL) and file.data (base64) — same error in both cases, confirming it's not related to how the media is fetched.
Sending the same image to a regular chat (@c.us) with the identical payload structure works perfectly (image delivered with caption).
Sending plain text (POST /api/sendText) to the same channel works fine.
This appears specific to image messages targeting @newsletter chats in the WEBJS engine.
Full error log
[13:57:03.362] INFO: request errored - POST /api/sendImage - statusCode 500
Error: {
"type": "Error",
"message": "msg.avParams is not a function\nwindow.WWebJS.sendMessage (pptr:evaluate;WPage.evaluate%20(%2Fapp%2Fdist%2Fcore%2Fengines%2Fwebjs%2FWPage.js%3A13%3A36):533:50)",
"stack":
TypeError: msg.avParams is not a function
window.WWebJS.sendMessage (pptr:evaluate;WPage.evaluate%20(%2Fapp%2Fdist%2Fcore%2Fengines%2Fwebjs%2FWPage.js%3A13%3A36):533:50)
at window.WWebJS.sendMessage (evaluate at WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:36), :532:49)
at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:391:56)
at async ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:277:16)
at async IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:16)
at async CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:362:20)
at async CdpPage.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:818:20)
at async WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:20)
at async WebjsClientCore.sendMessage (/app/node_modules/whatsapp-web.js/src/Client.js:1616:25)
at async descriptor.value (/app/dist/core/abc/activity.js:9:20)
"name": "TypeError"
}
Note: identical error reproduced 3 times, testing both file.url (remote URL) and file.data (base64 payload) — same stack trace in all cases.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Sending an image to a WhatsApp Channel (@newsletter JID) via POST /api/sendImage fails with a 500 error. The same image sends successfully to a regular chat (@c.us) with the exact same payload structure.
Version
{
"version": "2026.6.2",
"engine": "WEBJS",
"tier": "CORE",
"browser": "/usr/bin/chromium"
}
Steps to reproduce
Payload used
{
"session": "default",
"chatId": "XXXXXXXXXXXXXXXXX@newsletter",
"file": {
"url": "https://example.com/image.jpg",
"mimetype": "image/jpeg",
"filename": "banner.jpg"
},
"caption": "test"
}
Error received
{
"statusCode": 500,
"exception": {
"message": "msg.avParams is not a function",
"name": "TypeError",
"stack": "TypeError: msg.avParams is not a function\nwindow.WWebJS.sendMessage (pptr:evaluate;WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:36):533:50)\n at window.WWebJS.sendMessage (evaluate at WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:36), :532:49)\n at async WebjsClientCore.sendMessage (/app/node_modules/whatsapp-web.js/src/Client.js:1616:25)"
}
}
Additional context
Full error log
[13:57:03.362] INFO: request errored - POST /api/sendImage - statusCode 500
Error: {
"type": "Error",
"message": "msg.avParams is not a function\nwindow.WWebJS.sendMessage (pptr:evaluate;WPage.evaluate%20(%2Fapp%2Fdist%2Fcore%2Fengines%2Fwebjs%2FWPage.js%3A13%3A36):533:50)",
"stack":
TypeError: msg.avParams is not a function
window.WWebJS.sendMessage (pptr:evaluate;WPage.evaluate%20(%2Fapp%2Fdist%2Fcore%2Fengines%2Fwebjs%2FWPage.js%3A13%3A36):533:50)
at window.WWebJS.sendMessage (evaluate at WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:36), :532:49)
at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:391:56)
at async ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:277:16)
at async IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:16)
at async CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:362:20)
at async CdpPage.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:818:20)
at async WPage.evaluate (/app/dist/core/engines/webjs/WPage.js:13:20)
at async WebjsClientCore.sendMessage (/app/node_modules/whatsapp-web.js/src/Client.js:1616:25)
at async descriptor.value (/app/dist/core/abc/activity.js:9:20)
"name": "TypeError"
}
Note: identical error reproduced 3 times, testing both file.url (remote URL) and file.data (base64 payload) — same stack trace in all cases.
Beta Was this translation helpful? Give feedback.
All reactions