devlikeapro / waha

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

[BUG][NOWEB] - Session is automatically logout just after login and mostly session are failed to start #325

Closed Himanshu1234556 closed 1 month ago

Himanshu1234556 commented 1 month ago

Please fix this issue ASAP 🙏🙏

patron:PLUS

allburov commented 1 month ago

Hi! Just publised new 2024.5.5 version, could you check this one? If it doesn't help - please run the session with debug enabled and send here logs :pray: https://waha.devlike.pro/docs/how-to/sessions/#enable-debug

{
  "name": "default",
  "config": {
    "debug": true
  }
}

patron:PRO

devlikepro commented 1 month ago

Try to setup proxy for phone numbers (especially for Indian 🇮🇳 ): https://waha.devlike.pro/docs/how-to/proxy/


Overview

If you're experiencing issues scanning QR codes in WhatsApp, especially with Indian 🇮🇳 phone numbers, using a proxy located close to the phone number's location may help resolve the problem.

It affects both WEBJS and NOWEB engines.

Symptoms

  1. You start a new session in WhatsApp.
  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.

image

Configuration

There are two ways to set up proxies:

  1. Global Setting (for all sessions per container)
  2. Per Session Configuration (you can define a proxy for each session when you start it)

Global Proxy Configuration

To use a proxy, you can set the following environment variables:

Session Proxy Configuration

You can configure proxy for a session by setting config.proxy fields when you POST /api/sessions/start:

No authentication

{
  "name": "default",
  "config": {
    "proxy": {
      "server": "localhost:3128"
    }
  }
}

Proxy with authentication

{
  "name": "default",
  "config": {
    "proxy": {
      "server": "localhost:3128",
      "username": "username",
      "password": "P@ssw0rd"
    }
  }
}

The configuration is saved and will be applied if the docker container restarts, and you set WHATSAPP_RESTART_ALL_SESSIONS environment variables. Read more about it in Autostart section.

Recommended Proxies

Proxy6

We recommend using Proxy6 where you can get a DEDICATED proxy (only you'll use it) for $1.77 per month.

Apply the promocode get a 5% discount on your purchase.

9W9oVxx3UX

Geonode

Another option is Geonode.

patron:PRO

rohankm commented 3 weeks ago

Try to setup proxy for phone numbers (especially for Indian 🇮🇳 ): https://waha.devlike.pro/docs/how-to/proxy/

Overview

If you're experiencing issues scanning QR codes in WhatsApp, especially with Indian 🇮🇳 phone numbers, using a proxy located close to the phone number's location may help resolve the problem.

It affects both WEBJS and NOWEB engines.

Symptoms

  1. You start a new session in WhatsApp.
  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.

image

Configuration

There are two ways to set up proxies:

  1. Global Setting (for all sessions per container)
  2. Per Session Configuration (you can define a proxy for each session when you start it)

Global Proxy Configuration

To use a proxy, you can set the following environment variables:

  • WHATSAPP_PROXY_SERVER=localhost:3128: Set the proxy server in the format host:port, without HTTP or HTTPS.
  • WHATSAPP_PROXY_SERVER_USERNAME=username and WHATSAPP_PROXY_SERVER_PASSWORD=password: Configure credentials for the proxy.
  • WHATSAPP_PROXY_SERVER_LIST=host1.example.com:3138,host2.example.com:3138: Specify a comma-separated list of addresses to use, utilizing a round-robin algorithm for server selection.
  • WHATSAPP_PROXY_SERVER_INDEX_PREFIX=proxy-: Define a session name prefix to choose the appropriate proxy from the list.

Session Proxy Configuration

You can configure proxy for a session by setting config.proxy fields when you POST /api/sessions/start:

  • server - proxy server address, without http:// or https:// prefixes
  • username and password - set this if the proxy requires authentication

No authentication

{
  "name": "default",
  "config": {
    "proxy": {
      "server": "localhost:3128"
    }
  }
}

Proxy with authentication

{
  "name": "default",
  "config": {
    "proxy": {
      "server": "localhost:3128",
      "username": "username",
      "password": "P@ssw0rd"
    }
  }
}

The configuration is saved and will be applied if the docker container restarts, and you set WHATSAPP_RESTART_ALL_SESSIONS environment variables. Read more about it in Autostart section.

Recommended Proxies

Proxy6

We recommend using Proxy6 where you can get a DEDICATED proxy (only you'll use it) for $1.77 per month.

Apply the promocode get a 5% discount on your purchase.

9W9oVxx3UX

Geonode

Another option is Geonode.

patron:PRO

my vps is in India and still im not able to login

devlikepro commented 3 weeks ago

@rohankm could you try to run it on your local PC/laptop? Some VPS is blocked as well.

If it works, the only way to fix that - setup a your own proxy somewhere in real location (using 4G\5G usually helps as well)

patron:PRO