Skip to content

QR showing after connrected #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cashmaal opened this issue May 16, 2025 · 4 comments
Open

QR showing after connrected #343

cashmaal opened this issue May 16, 2025 · 4 comments

Comments

@cashmaal
Copy link

cashmaal commented May 16, 2025

Hi team

I am using this service from 6 months, but from 5 days I got a issue, When I connect any business whatsapp using QR code and that connected from phone successfully but not connect to our server, and we can see a error on pm2 logs

this is error:

0|whatsapp-api | Initialize error: Waiting for selector [data-icon='search'] failed: Protocol error (Runtime.callFunctionOn): Target closed.

how can we solve this?

due to this we can't scan qr code again and it show qr already scanned but on status "{"success":false,"state":null,"message":"session_not_connected"}"

I think this issue is come because whatsapp show a popup of continue button, if we don't click on continue button web whatsapp not working on browsers also, like opera and chrome etc.. same this issue I think in our API

Image

@avoylenko
Copy link
Collaborator

Do you have the WEB_VERSION_CACHE_TYPE env configured?

@cashmaal
Copy link
Author

Thanks for your reply,
the blow are my .env file.

Application

PORT=3000 # OPTIONAL, DEFAULT 3000
API_KEY= # OPTIONAL, DEFAULT EMPTY
BASE_WEBHOOK_URL=https://webhook.site/5f04a3b6-2359-4a6b-9512-caba6ef46e43 # MANDATORY
ENABLE_LOCAL_CALLBACK_EXAMPLE=TRUE # OPTIONAL, DISABLE FOR PRODUCTION
RATE_LIMIT_MAX=1000 # OPTIONAL, THE MAXIUM NUMBER OF CONNECTIONS TO ALLOW PER TIME FRAME
RATE_LIMIT_WINDOW_MS=1000 # OPTIONAL, TIME FRAME FOR WHICH REQUESTS ARE CHECKED IN MS

Client

MAX_ATTACHMENT_SIZE=10000000 # IF REACHED, MEDIA ATTACHMENT BODY WILL BE NULL
SET_MESSAGES_AS_SEEN=TRUE # WILL MARK THE MESSAGES AS READ AUTOMATICALLY

ALL CALLBACKS: auth_failure|authenticated|call|change_state|disconnected|group_join|group_leave|group_update|loading_screen|media_uploaded|message|message_ack|messa>

DISABLED_CALLBACKS=qr|message_ack|message_reaction|unread_count|message_edit|message_ciphertext # PREVENT SENDING CERTAIN TYPES OF CALLBACKS BACK TO THE WEBHOOK
WEB_VERSION='2.2328.5' # OPTIONAL, THE VERSION OF WHATSAPP WEB TO USE
WEB_VERSION_CACHE_TYPE=none # OPTIONAL, DETERMINTES WHERE TO GET THE WHATSAPP WEB VERSION(local, remote or none), DEFAULT 'none'
RECOVER_SESSIONS=TRUE # OPTIONAL, SHOULD WE RECOVER THE SESSION IN CASE OF PAGE FAILURES

Session File Storage

SESSIONS_PATH=./sessions # OPTIONAL

ENABLE_SWAGGER_ENDPOINT=TRUE # OPTIONAL

@avoylenko
Copy link
Collaborator

Your configuration seems fine. Would you mind to switch to a forked project and check if your issue is solved there?
Here is the docker image:
docker pull avoylenko/wwebjs-api:latest

@de-foo
Copy link

de-foo commented May 22, 2025

I had the same issue, and switching to the forked project avoylenko/wwebjs-api:latest fixed it for me.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants