Issue Description
client.getChatById(chatId) throws for every @lid contact on this account (confirmed across 12 different contacts), not just occasionally. The thrown error's name/message/stack are a single minified letter (e.g. r), consistent with the internal WAWebFindChatAction.findOrCreateLatestChat → toUserLidOrThrow "No LID for user" failure described in #3834, but here it's 100% reproducible rather than intermittent.
This breaks everything downstream that needs a resolved Chat object for an @lid id:
Interestingly, client.getContactLidAndPhone([chatId]) does resolve correctly for the same contacts, so the account clearly has a usable LID mapping somewhere — findOrCreateLatestChat specifically seems unable to use it.
Reproduction Steps
- Link a WhatsApp Business account whose contacts are mostly @lid (hidden-number privacy id) rather than @c.us.
- Call client.getChatById('@lid') for any of them.
- Observe it throws consistently (not once in a while — every single call, every single contact).
Code Sample
User Setup
| WhatsApp |
Type |
| Account Type |
WhatsApp Business |
| Authentication Strategy |
LocalAuth |
| WhatsApp Web Version |
2.3000.1043159177, 2.3000.1043179329 |
| whatsapp-web.js Version |
1.34.7 |
| Environment |
Version |
| Browser Type |
Chromium |
| Browser Version |
24.38.0 |
| Phone OS Version |
IOS |
| Running OS Version |
Ubuntu |
| Node.js Version |
v20.19.6 |
Checklist
Issue Description
client.getChatById(chatId) throws for every @lid contact on this account (confirmed across 12 different contacts), not just occasionally. The thrown error's name/message/stack are a single minified letter (e.g. r), consistent with the internal WAWebFindChatAction.findOrCreateLatestChat → toUserLidOrThrow "No LID for user" failure described in #3834, but here it's 100% reproducible rather than intermittent.
This breaks everything downstream that needs a resolved Chat object for an @lid id:
TypeError: Cannot read properties of undefined (reading 'serialize')when send message #3637)Interestingly, client.getContactLidAndPhone([chatId]) does resolve correctly for the same contacts, so the account clearly has a usable LID mapping somewhere — findOrCreateLatestChat specifically seems unable to use it.
Reproduction Steps
Code Sample
User Setup
Checklist