Skip to content

Cannot read properties of undefined (reading 'waitForChatLoading') #201715

@reinforcers

Description

@reinforcers

Issue Description

I get the error when I try to fetch messages using Client.getChatById()

Cannot read properties of undefined (reading 'waitForChatLoading')
Object.<anonymous> (https://static.whatsapp.net/rsrc.php/v4igmM4/yn/l/en_US-j/XhE7-9prdbA.js:2085:1607)
Generator.next (<anonymous>)

Reproduction Steps

fetch messages using Client.getChatById()
problem is it doesn't always shown the error. some ID I get the error and the other doesn't
so not really sure what truly going on

Code Sample

Client.getChatById()

User Setup

WhatsApp Type
Account Type Standard
Authentication Strategy LocalAuth
WhatsApp Web Version 2.3000.1037370178
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 Linux Mint 22
Node.js Version 20.18.2

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 mediumMedium 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