devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
806 stars 247 forks source link

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

Closed nchilka closed 1 month ago

nchilka commented 1 month ago

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
allburov commented 1 month ago

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

patron:PRO

nchilka commented 1 month ago

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

S1D007 commented 1 month ago

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

allburov commented 1 month ago

@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 commented 1 month ago

@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