waha icon indicating copy to clipboard operation
waha copied to clipboard

[BUG][WEBJS] - Unable to scan qr to login - Indian number

Open nchilka opened this issue 1 year ago • 1 comments

I have been facing the difficulty in login in to WAHA using qr scan. The issue is same of what been raised earlier https://www.patreon.com/posts/qr-code-scanning-104471167. I have changed my VPS to closest location to mobile and even brought the proxy6 proxy but the issue persists.

Version

Environment: {
  version: '2024.5.8',
  engine: 'WEBJS',
  tier: 'CORE',
  browser: '/usr/bin/chromium'
}

{"version":"2024.5.8","engine":"WEBJS","tier":"CORE","browser":"/usr/bin/chromium"}

To Reproduce Steps to reproduce the behavior:

  1. You start a new session in WhatsApp in cloud
  2. Scan the QR code.
  3. Experience a long loading time.
  4. Face login failures or instant logout.
  5. Encounter a new QR code or enter a FAILED state immediately.

Docker Logs [Nest] 30 - 05/23/2024, 3:17:09 PM LOG [RoutesResolver] HealthController {/health}: +0ms [Nest] 30 - 05/23/2024, 3:17:09 PM LOG [RouterExplorer] Mapped {/health, GET} route +0ms [Nest] 30 - 05/23/2024, 3:17:09 PM LOG [NestApplication] Nest application successfully started +3ms WhatsApp HTTP API is running on: http://[::1]:3000 Environment: { version: '2024.5.8', engine: 'WEBJS', tier: 'CORE', browser: '/usr/bin/chromium' }

[Nest] 30 - 05/23/2024, 3:17:51 PM LOG [SessionManager] 'default' - starting session... [Nest] 30 - 05/23/2024, 3:17:51 PM LOG [Webhook - default] Configuring webhooks for https://httpbin.org/post... [Nest] 30 - 05/23/2024, 3:17:51 PM LOG [Webhook - default] Event 'session.status' is enabled for url: https://httpbin.org/post [Nest] 30 - 05/23/2024, 3:17:51 PM LOG [Webhook - default] Webhooks were configured for https://httpbin.org/post. [Nest] 30 - 05/23/2024, 3:17:51 PM LOG [Webhook - default] Event 'message' is enabled for url: https://httpbin.org/post [Nest] 30 - 05/23/2024, 3:17:51 PM LOG [Webhook - default] Sending POST to https://httpbin.org/post... [Nest] 30 - 05/23/2024, 3:17:52 PM LOG [Webhook - default] POST request was sent with status code: 200

[Nest] 30 - 05/23/2024, 3:18:25 PM LOG [Webhook - default] Sending POST to https://httpbin.org/post... [Nest] 30 - 05/23/2024, 3:18:26 PM LOG [Webhook - default] POST request was sent with status code: 200

nchilka avatar May 23 '24 15:05 nchilka

@nchilka are you in India? Could you try to run the project locally on your laptop/PC and see if it helps?

patron:PRO

allburov avatar May 24 '24 04:05 allburov

@allburov Yes, the local run worked for me but not the VPS..!

nchilka avatar May 24 '24 16:05 nchilka

i am not able to login, also i am getting "can't link new device at this time, try again later" ->. in my whatsapp. please help

S1D007 avatar May 24 '24 17:05 S1D007

@S1D007 do you use indian accounts also? Could you try it on local laptop in home network to see if it works?

patron:PRO

allburov avatar May 25 '24 05:05 allburov

@nchilka consider running WAHA on your local network then, you can buy something like rasberri pi or a small server (lenovo m93 or similar) and host it there. So the setup would look like

  1. You have an app (with your logic and database) running on VPS
  2. You have WAHA running on your local network on some dedicated PC (mongodb or file MUST be placed on this server as well)
  3. You have ngrok (or any similar reverse proxy) running on local network and sharing 3000 port on dedicated name (paid ngrok required for that)
  4. Your App communicated with WAHA API using the external ngrok name and WAHA send webhooks back to the server

There's nothing we can do about network detection from Meta side :(

FYI @S1D007 try running it locally and if it works for your case - consider using setup like this as well

patron:PRO

allburov avatar May 25 '24 05:05 allburov