Skip to content

TypeError: Cannot read properties of undefined (reading 'markedUnread') #5736

@zohaib-metagle

Description

@zohaib-metagle

Is there an existing issue for this?

  • I have searched the existing issues.

Is this a problem caused by your code, or is it specifically because of the library?

  • I have double-checked my code carefully.

Describe the bug.

When sending messages using client.sendMessage() or chat.sendMessage(), the library throws a TypeError: Cannot read properties of undefined (reading 'markedUnread') error. This occurs even when sendSeen: false is explicitly set in options, or when sendSeen is completely omitted from the options object.

Expected Behavior

client should send message smoothly

Steps to Reproduce the Bug or Issue

  1. Initialize a WhatsApp Web client
  2. Wait for client to be ready
  3. Attempt to send a message to an individual contact (not a group) using either:
    • client.sendMessage(contactId, message, options)
    • chat.sendMessage(message, options)
  4. Error occurs during message sending

WhatsApp Account Type

Standard

Browser Type

Google chrome

Operation System Type

macos

Phone OS Type

Others

WhatsApp-Web.js Version

v1.34.4

WhatsApp Web Version

v1.34.4

Node.js Version

16

Authentication Strategy

LocalAuth

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions