Skip to content

Can not fetch channels by getChannels() #201675

@ohidxy

Description

@ohidxy

Issue Description

I was trying to get all the channels but its throwing error like below. Its happening same for client.sendMessage(channelId, msg).

The error looks as below:

Error getting channels for client c9: TypeError: Cannot read properties of undefined (reading 'description')
at Channel._patch (/usr/src/app/node_modules/whatsapp-web.js/src/structures/Channel.js:44:49)
at new Channel (/usr/src/app/node_modules/whatsapp-web.js/src/structures/Channel.js:22:24)
at ChatFactory.create (/usr/src/app/node_modules/whatsapp-web.js/src/factories/ChatFactory.js:14:20)
at /usr/src/app/node_modules/whatsapp-web.js/src/Client.js:1178:54
at Array.map ()
at Client.getChannels (/usr/src/app/node_modules/whatsapp-web.js/src/Client.js:1178:25)
at async getAllChannels (/usr/src/app/routes/functions.js:350:26)

Reproduction Steps

  1. Try to fetch the channels via client.getChannels()

Code Sample

User Setup

WhatsApp Type
Account Type Standard
Authentication Strategy LocalAuth
WhatsApp Web Version 2.3000.1035508410
whatsapp-web.js Version 1.34.6
Environment Version
Browser Type Chromium
Browser Version 146.0.7680.1
Phone OS Version iOS 26.3.1
Running OS Version Ubuntu 24
Node.js Version 18.19.1

Checklist

  • I use the latest released version of whatsapp-web.js.
  • I have searched existing issues and confirmed this is not a duplicate.
  • I have verified this is a library issue, not a problem with my code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is brokenissued highHigh impact issuetypingsType definitions

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions