whatsapp-api icon indicating copy to clipboard operation
whatsapp-api copied to clipboard

Sometimes session_not_connected although QR Code was generated and scanned from Whatsapp

Open teguhwin8 opened this issue 8 months ago • 14 comments

Issue

Sometimes session_not_connected although QR Code was generated and scanned from Whatsapp

Environtment I used

PORT=3000 
API_KEY= 
BASE_WEBHOOK_URL=http://localhost:3000/localCallbackExample 
ENABLE_LOCAL_CALLBACK_EXAMPLE=TRUE 
RATE_LIMIT_MAX=1000 
RATE_LIMIT_WINDOW_MS=1000 
MAX_ATTACHMENT_SIZE=10000000 
SET_MESSAGES_AS_SEEN=TRUE 
DISABLED_CALLBACKS=message_ack|message_reaction  
WEB_VERSION='2.2410.1' 
WEB_VERSION_CACHE_TYPE=remote 
RECOVER_SESSIONS=TRUE 
SESSIONS_PATH=./sessions 
ENABLE_SWAGGER_ENDPOINT=TRUE 

Am I setting up something wrongly within the .env?

Expected flow

The flow i'm trying to initiate session

  • API: start session
  • API: get session QR (image)
  • Physical Action: mobile scan
  • API: /session/status/:sessionId

The result from API:

{
    "success": true,
    "state": "CONNECTED",
    "message": "session_connected"
}

Actual flow

However the Actual result, turns out to be...

{
    "success": false,
    "state": null,
    "message": "session_not_connected"
}

teguhwin8 avatar Jun 22 '24 07:06 teguhwin8