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

leaveGroup broken #3217

Closed PrevosHD closed 6 days ago

PrevosHD commented 3 weeks 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?

Personal account (normal)

Mode

My own code

Current Behavior

Test Code:

if (message.body.toLowerCase() == '/leave2') {
await bocchi.leaveGroup(message.from)
return
}

error:

Error [TypeError]: Cannot read properties of undefined (reading 'sendExitGroup')
    at window.<computed>.<computed> (evaluate at /home/whatsapp/BOT/node_modules/@open-wa/wa-automate/dist/controllers/patch_manager.js:127:50, <anonymous>:0:540439)
    at evaluate (evaluate at Client.<anonymous> (/home/whatsapp/BOT/node_modules/@open-wa/wa-automate/dist/api/Client.js:564:44), <anonymous>:0:17)
    at #evaluate (/home/whatsapp/BOT/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:252:55)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext.evaluate (/home/whatsapp/BOT/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:149:16)

Expected Behavior

leave group

Steps To Reproduce

execute above code

create() code OR full CLI command + CONFIG

nothing special

DEBUG INFO

{
  "WA_VERSION": "2.3000.1014086763",
  "WA_AUTOMATE_VERSION": "4.71.12",
  "BROWSER_VERSION": "HeadlessChrome/125.0.6422.141",
  "START_TS": 1717961402520,
  "RAM_INFO": "Total: 134.98 GB | Free: 12.06 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": false,
  "PATCH_HASH": "81ba5",
  "LAUNCH_TIME_MS": 8364,
  "ACC_TYPE": "BUSINESS",
  "chats": 22,
  "messages": 99,
  "contacts": 611,
  "isBiz": true,
  "isMd": true,
  "INSTANCE_ID": "8826b1ba-07b2-4fbc-b37c-d263bfbc4a19"
}

Environment

- OS: Linux 5.15
- Node: 18.0.0
- npm: 9.8.1

Screenshots/Logs

No response

Anything else?

No response

smashah commented 6 days ago

this is working. please restart and try again