WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.92k stars 1.34k forks source link

QR Code Connection Timeout and Failure to Connect with @whiskeysockets/baileys v6.7.7 #1009

Open KaioBrenner opened 2 months ago

KaioBrenner commented 2 months ago

Description

I am encountering an issue where, after generating the QR code using the @whiskeysockets/baileys library (version 6.7.7), the connection times out when attempting to connect using my mobile device. The QR code is generated correctly and displayed, but the connection fails after scanning the QR code, resulting in a timeout error. This issue occurs both on my local machine and on the production server.

Steps to Reproduce

  1. Install the @whiskeysockets/baileys version 6.7.7.
  2. Run the project and generate the QR code.
  3. Attempt to scan the QR code using the WhatsApp mobile app.
  4. Observe the connection attempt timing out and failing to establish.

Expected Behavior

After scanning the QR code, the mobile device should connect successfully to WhatsApp Web, and the session should be established without timing out.

Actual Behavior

The QR code is displayed correctly, but upon scanning it with the mobile device, the connection process fails and times out. The WhatsApp mobile app displays an error message indicating that it was not possible to connect.

Environment

Node.js Version: v20.11.0 Baileys Version: v6.7.7

Request for Assistance I would appreciate any guidance or suggestions on resolving this issue. If there are any recent changes or workarounds that I should be aware of, please let me know. If any code snippets or configuration files are needed, I am happy to provide them.

junplid commented 2 months ago

Resolveu pra mim colocar essa linha:

const bot = makeWASocket({
  auth: state,
  version: [2, 3000, 1015901307],
});

veja mais aqui >> https://github.com/WhiskeySockets/Baileys/issues/999