open-wa / wa-automate-nodejs

πŸ’¬ πŸ€– The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!
https://docs.openwa.dev/
Other
3.05k stars 588 forks source link

When QR Code is Scanned, a new QR with 'undefined' is generated #3212

Open fathah opened 1 month ago

fathah commented 1 month ago

Are you using the latest version of the library?

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Business account

Mode

EASY API/CLI

Current Behavior

When I start the 'node' server, it displays the QR code. Then it auto-generates a shorter QR code. When I checked the data inside the QR it has undefined.

Initial QR

2@Hf02Sn0F0mrILBBXTpqlSQCoYGa0VPTHNJNW9wjhOtTuhUtnVmq+meqmmz/JarNOxgIveTJ24pvpYg==, 
ONFBu+I2nnrPdCLEYLPxEbhukC5QlQLPMCboQEy882M=,Wo0RJiTAKYK2gdsaYTr7copdoP8iPNUoRCXikxRa3Dw=, 
o/h0JMiOn8Ccm9iW7AbOAHf7A2I6GwkvZ+rg2qTx7O8=,1

Once the QR is scanned from my device:

undefined,ONFBu+I2nnrPdCLEYLPxEbhukC5QlQLPMCboQEy882M=, Wo0RJiTAKYK2gdsaYTr7copdoP8iPNUoRCXikxRa3Dw=, 
o/h0JMiOn8Ccm9iW7AbOAHf7A2I6GwkvZ+rg2qTx7O8=,1

Expected Behavior

No response

Steps To Reproduce

const wa = require('@open-wa/wa-automate');

wa.create({
  sessionId: "COVID_HELPER",
  multiDevice: true, //required to enable multiDevice support
  authTimeout: 60, //wait only 60 seconds to get a connection with the host account device
  blockCrashLogs: true,
  disableSpins: true,
  headless: true,
  hostNotificationLang: 'PT_BR',
  logConsole: false,
  popup: true,
  qrTimeout: 0, //0 means it will wait forever for you to scan the qr code
}).then(client => start(client));

function start(client) {
  client.onMessage(async message => {
    if (message.body === 'Hi') {
      await client.sendText(message.from, 'πŸ‘‹ Hello!');
    }
  });
}
node index.jjs

create() code OR full CLI command + CONFIG

No response

DEBUG INFO

{
  "WA_VERSION": "2.3000.1013771556",
  "WA_AUTOMATE_VERSION": "4.71.11",
  "BROWSER_VERSION": "HeadlessChrome/112.0.5614.0",
  "START_TS": 1716697677223,
  "RAM_INFO": "Total: 8.33 GB | Free: 7.06 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": false
}

Environment

- OS: Linux 6.8
- Node: 18.19.1
- npm: 9.2.0

Screenshots/Logs

No response

Anything else?

No response