Skip to content

Does not send first message to new contact on Whatsapp. Newly created or installed on a new phone with zero history. #201765

@JuancaArg

Description

@JuancaArg

Issue Description

When attempting to send the first message to a new contact, it fails to send, and the sendMessage function returns no error.

Note that the first message was sent using both lid and phonumber@c.us, and both returned a successful delivery result, but the message was not completed.

The lid was obtained with the getContactLidAndPhone function, in addition to that I previously executed the getNumberId function, both returning the same code lid

These cases are being generated in newly created WhatsApp accounts, or reinstalled on the same phone after formatting it without history.

When the contact initiates the conversation, the sending functions begin to run normally.

Reproduction Steps

  1. Format the phone that has WhatsApp installed (without a backup) or create a new WhatsApp account with a newly purchased SIM card.

  2. Install WhatsApp without a backup.

  3. Log in to the library

  4. Try sending a message to a new contact (there should be no chat history).

Code Sample

User Setup

WhatsApp Type
Account Type WhatsApp Business
Authentication Strategy LocalAuth
WhatsApp Web Version 2.3000.1039904970
whatsapp-web.js Version 1.34.7
Environment Version
Browser Type Chrome
Browser Version 123
Phone OS Version IOS 26/ Android 16
Running OS Version Docker / Mac Os 26 / Win 11
Node.js Version 22.12

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