pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
14.62k stars 3.48k forks source link

QR code get changed from 1 to 2 but session is not started #1353

Closed bhejosms closed 11 months ago

bhejosms commented 2 years ago

Is there an existing issue for this?

Describe the bug

While scanning qr code it get changed from

QR Code IS : 1@s3rc3K3iyC4Mt5Jx3u9A4lsXa67RCGuCfwKaRq8rBUZ0pAcmtmLxpxKY41qFk8DIyQgxFmXH+kFtPg==,Jcfr6l9IsRF9UStsaogu+pcbVjT/zojAhq7aBb5qWmU=,mnqTrvG8YibcUwtBAq+O/A==

QR Code IS : 2@WNva4WzP+j46VgcTc5bjqMq6NbBf/JZQGEBzlbUXdKtuSAvA0cAzbKxokAl2Ox1WRaM5SFFUIcdjzw==,cPk4wW2hSdoJWyF/tN7MdeTRucuK1Aa/9ZugUXB5SFo=,RE1As7pAsSNg9A8vpNMthtf72MFhBxzu2X3dT8MVxCk=,wnaLgEpgK2mFT26Zwu4r/j7pu8IVZrX9M1+Lws+wGXw=

But session file is not created.

Using business whatsapp. Normal scan (Non Beta)

Expected behavior

It should create session file once scanned.

Steps to Reproduce the Bug or Issue

Open QR code GO to link device Scan QR code It gives can not link device. QR code gets changed

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

No, I am not using Multi Device

Environment

Centos

Additional context

No response

Iscrimou commented 2 years ago

i'm having the same problem here

adityadhawan22 commented 2 years ago

remove the .wwebjs_auth folder and then try

rm -rf .wwebjs_auth
bhejosms commented 2 years ago

Where is this directory located? I am not able to find it.

bhejosms commented 2 years ago

In https://github.com/pedroslopez/whatsapp-web.js/issues/1352 it is mention that directory is present at root level of whatsapp web but for me it's not there.

LemuelPuglisi commented 2 years ago

Same here.

bhejosms commented 2 years ago

Has any one found any solution for this issue?

adityadhawan22 commented 2 years ago

In https://github.com/pedroslopez/whatsapp-web.js/issues/1352 it is mention that directory is present at root level of whatsapp web but for me it's not there.

Have you tried changing the directory by passing dataPath in LocalAuth?

Eg: LocalAuth({ dataPath: '/home/yourpath/whatsappSession' })

bhejosms commented 2 years ago

Do you mean changing this.dataPath = path.resolve(dataPath || './.wwebjs_auth/'); to

this.dataPath = '/home/cspl/Desktop/Whatsapp/WhatsappAPI/sessions/'

bhejosms commented 2 years ago

Tried this but it does not work.

Moreover some number are getting scanned but some are not.

adityadhawan22 commented 2 years ago

/home/cspl/Desktop/Whatsapp/WhatsappAPI/sessions/'

Delete this folder and then try

bhejosms commented 2 years ago

Deleting folder does not solve issue.

Digging further found that whatsapp version 2.22.6.70 works and latest version does not work.

bhejosms commented 2 years ago

Now it seems QR code generation starts with 2 only instead of 1

shirser121 commented 11 months ago

Not exist anymore since WhatsApp support only MD connection