Describe the bug I am encountering a 500 Internal Server Error when trying to send a message via the API. The session status is CONNECTED, but the message is not delivered, and the logs show a TypeError related to markedUnread.
Error Message:
JSON
{
"success": false,
"error": "Cannot read properties of undefined (reading 'markedUnread')\nI (https://static.whatsapp.net/rsrc.php/v4ivYF4/yv/l/en_GB-j/PYyXh1NyTG4.js:1541:4171)"
}
Environment:
OS: AlmaLinux 8 / 9
Deployment: Docker
Base Image: node:22-bookworm-slim
Browser: Chromium (System installed)
wwebjs-api Version: Latest (Main branch / Edge)
whatsapp-web.js Version: github:pedroslopez/whatsapp-web.js#main
Configuration (.env):
SET_MESSAGES_AS_SEEN=false
SET_MESSAGES_AS_READ=false
WEB_VERSION_CACHE_TYPE=none
Steps to Reproduce:
Start a session via /session/start/test.
Scan the QR code and confirm the status is CONNECTED.
Try to send a message using /client/sendMessage/test.
The API returns the markedUnread error, and the message is not sent.
Additional Context: It seems that even with SET_MESSAGES_AS_SEEN=false, the library still attempts to call a function that relies on markedUnread, which has likely changed in the latest WhatsApp Web update (v2.3000.x). I have tried a clean build with --no-cache and using the edge version of whatsapp-web.js, but the issue persists.
Describe the bug I am encountering a 500 Internal Server Error when trying to send a message via the API. The session status is CONNECTED, but the message is not delivered, and the logs show a TypeError related to markedUnread.
Error Message:
JSON
{
"success": false,
"error": "Cannot read properties of undefined (reading 'markedUnread')\nI (https://static.whatsapp.net/rsrc.php/v4ivYF4/yv/l/en_GB-j/PYyXh1NyTG4.js:1541:4171)"
}
Environment:
OS: AlmaLinux 8 / 9
Deployment: Docker
Base Image: node:22-bookworm-slim
Browser: Chromium (System installed)
wwebjs-api Version: Latest (Main branch / Edge)
whatsapp-web.js Version: github:pedroslopez/whatsapp-web.js#main
Configuration (.env):
SET_MESSAGES_AS_SEEN=false
SET_MESSAGES_AS_READ=false
WEB_VERSION_CACHE_TYPE=none
Steps to Reproduce:
Start a session via /session/start/test.
Scan the QR code and confirm the status is CONNECTED.
Try to send a message using /client/sendMessage/test.
The API returns the markedUnread error, and the message is not sent.
Additional Context: It seems that even with SET_MESSAGES_AS_SEEN=false, the library still attempts to call a function that relies on markedUnread, which has likely changed in the latest WhatsApp Web update (v2.3000.x). I have tried a clean build with --no-cache and using the edge version of whatsapp-web.js, but the issue persists.