Issue Description
Description
When calling group.setDescription(newDescription) on a Chat object, the method throws an error: "Cannot read properties of undefined (reading 'get')".
Expected Behavior
The group description should be updated successfully.
Actual Behavior
Throws error: "Cannot read properties of undefined (reading 'get')"
Additional Context
- The user is admin of the group
- This happens consistently across multiple groups
- The error occurs at the method call level, not during execution
- Tested with latest version (1.34.6) - issue persists
Logs
[ERROR]: Error processing group GroupName: Cannot read properties of undefined (reading 'get')
Reproduction Steps
- Get a Chat object from
client.getChats()
- Call
chat.setDescription("new description")
- Error occurs immediately
Code Sample
async function executeReplaceGroupLinksCommand(client, msg) {
try {
const chats = await client.getChats();
const group = chats.find(chat => chat.isGroup);
if (group && typeof group.setDescription === 'function') {
try {
const result = await group.setDescription("new description");
console.log("Success");
} catch (error) {
console.error("Error:", error.message); // "Cannot read properties of undefined (reading 'get')"
}
}
} catch (error) {
console.error("Error:", error.message);
}
}
User Setup
| WhatsApp |
Type |
| Account Type |
Standard |
| Authentication Strategy |
LocalAuth |
| WhatsApp Web Version |
2.3000.1036990300 |
| whatsapp-web.js Version |
1.34.6 |
| Environment |
Version |
| Browser Type |
Chrome |
| Browser Version |
146.0.7680.153 |
| Phone OS Version |
Android 16 |
| Running OS Version |
Ubuntu 23.04 (Lunar Lobster) |
| Node.js Version |
22.17.0 |
Checklist
Issue Description
Description
When calling
group.setDescription(newDescription)on a Chat object, the method throws an error: "Cannot read properties of undefined (reading 'get')".Expected Behavior
The group description should be updated successfully.
Actual Behavior
Throws error: "Cannot read properties of undefined (reading 'get')"
Additional Context
Logs
Reproduction Steps
client.getChats()chat.setDescription("new description")Code Sample
User Setup
Checklist