WhiskeySockets / Baileys

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

Mobile Registration Not Working [BUG] #821

Open SACHIBOT opened 4 months ago

SACHIBOT commented 4 months ago

Bug Report: Mobile Registration Not Working Correctly with Baileys

Description Mobile registration is not working correctly when attempting to register with WhatsApp using Baileys. The process is blocked with a message indicating that the official WhatsApp app is required to log in.

To Reproduce Steps to reproduce the behavior:

  1. Create a new connection using Baileys.
  2. Close the connection and attempt to use mobile login.
  3. Observe the error message.

Expected Behavior The registration process should allow successful login to WhatsApp using Baileys without being blocked.

Screenshots/Logs

Failed to request registration code. Please try again.
{
  reason: 'blocked',
  status: 'fail',
  login: '947####', // it's my number
  custom_block_screen: {
    title: 'You need the official WhatsApp to log in',
    hide_date: true,
    btn_secondary_url: 'https://faq.whatsapp.com/1217634902127718',
    btn_secondary_text: 'Learn More',
    btn_primary_url: 'https://www.whatsapp.com/download',
    btn_primary_text: 'Download WhatsApp',
    body: "Using an app other than the official WhatsApp has privacy and security risks. Use WhatsApp to register or log back in.<br/><br/><b>How to get the official WhatsApp</b><br/>Download from app store or directly from WhatsApp. <a href='https://www.whatsapp.com/download'>Go to official website</a><br/><br/><b>More accounts in one app</b><br/>Now you can add phone numbers and use multiple accounts on WhatsApp. <a href='https://faq.whatsapp.com/492167569769444'>Learn more</a>"
  }
}

Environment

Additional Context The error occurs when trying to use example.ts in the Baileys library.

Steps Taken

AkashSaikia commented 4 months ago

How do you manage multiple clients if not using proxy ? Individual servers ? If yes, why ? @SACHIBOT

SACHIBOT commented 4 months ago

How do you manage multiple clients if not using proxy ? Individual servers ? If yes, why ? @SACHIBOT

I didn't use a proxy or multiple clients. I ran it on my machine for testing purposes to understand how the process works before adding it to my target projects.

bentacos commented 4 months ago

i'm not sure why anyone would want to use mobile registration. this feature makes the library a primary target of WhatsApp takedowns. if users want to register on WhatsApp, they should use the official app. i think we should stick with scanning to keep the library alive.