[NOWEB] - GET /api/{session}/channels - Cannot read properties of null (reading 'viewer_metadata')
🐞 Bug Report for WAHA WhatsApp Engine
Describe the bug
When trying to connect to WhatsApp via WAHA, I encountered the following error:
Error: Cannot read properties of null (reading 'viewer_metadata')
at toChannel (/app/dist/core/engines/noweb/session.noweb.core.js:1192:40)
This happens during the connection attempt, and it prevents the WhatsApp session from being established.
Config
{
"engine": "NOWEB",
"tier": "PLUS"
}
Steps
To Reproduce (Sometime) Steps to reproduce the behavior:
- Start the WAHA Docker container.
- Attempt to connect a WhatsApp account via the Noweb engine.
- Observe the crash or error logs.
Expected behavior
I expected the WhatsApp connection to initialize successfully without throwing an error.
@devlikepro Please take a look at, https://github.com/devlikeapro/waha/blob/core/src/core/engines/noweb/session.noweb.core.ts#L1745-L1749
The error occurs only if the linked WhatsApp account is a WhatsApp Business account. @devlikepro
Any update here?
I don't see the version you're using in the description, could you specify it?
I expected the WhatsApp connection to initialize successfully without throwing an error.
I don't see a place where wecall .toChannel in init. May be you called some API and got this error?
WhatsApp Business account
Do you mean Meta Connected one or regular?
@devlikepro version: devlikeapro/waha-plus It's a WhatsApp Business account, not a regular WhatsApp account.
Steps to Reproduce:
- Connect a WhatsApp Business account by scanning the QR code.
- Hit the specified endpoint. endpoint: https://waha.devlike.pro/swagger/#/%F0%9F%93%A2%20Channels/ChannelsController_list
- This will result in an error
@devlikepro The issue persists, could you please review it again?
Cannot read properties of null (reading 'viewer_metadata')
{
"version": "2025.8.1",
"engine": "NOWEB",
"tier": "PLUS"
}
We are currently experiencing issues with WhatsApp as well (for some users). Could you please let me know what information you need from my end to investigate this properly
@devlikepro Do you have any updates on the issue we’re currently facing?
@rupen-cleverpush if you're talking about channels list - GET /api/{session}/channels - it filters null already, not sure how you got it
https://github.com/devlikeapro/waha/blob/core/src/core/engines/noweb/session.noweb.core.ts#L1784-L1786