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 589 forks source link

Erro ao remover participante do grupo #3129

Open Everton-Lourens opened 1 year ago

Everton-Lourens commented 1 year 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

  await client.removeParticipant('120313157394057966@g.us', '000000000000@c.us').then(async (result) => {
     console.log(result);
     console.log(`-------------REMOVIDO-------------`);
  }).catch((error) => {
     console.error(error);
  });

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'formattedShortName') at https://web.whatsapp.com/main.3d5ecd352640394ea7e4.js:5:555624 at Array.map () at https://web.whatsapp.com/main.3d5ecd352640394ea7e4.js:5:555606 at Generator.next () at t (https://web.whatsapp.com/vendor1~app.a91035d81a749b3d5627.js:2:66483) at s (https://web.whatsapp.com/vendor1~app.a91035d81a749b3d5627.js:2:66694) at https://web.whatsapp.com/vendor1~app.a91035d81a749b3d5627.js:2:66753 at new Promise () at https://web.whatsapp.com/vendor1~app.a91035d81a749b3d5627.js:2:66634 at M (https://web.whatsapp.com/main.3d5ecd352640394ea7e4.js:5:556139) at ExecutionContext._ExecutionContext_evaluate (C:\Users\vegor\OneDrive - Educacional\Área de Trabalho\MeganCenter\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:286:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ExecutionContext.evaluate (C:\Users\vegor\OneDrive - Educacional\Área de Trabalho\MeganCenter\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:117:16)

Expected Behavior

"Participante removido com sucesso"

Steps To Reproduce

Create> start> await client.removeParticipant error...

create() code OR full CLI command + CONFIG

await client.removeParticipant('120313157394057966@g.us', '000000000000@c.us').then(async (result) => {
         console.log(result);
         console.log(`-------------REMOVIDO-------------`);
      }).catch((error) => {
         console.error(error);
      });

DEBUG INFO

{
  "WA_VERSION": "2.2321.6",
  "WA_AUTOMATE_VERSION": "4.66.3",
  "BROWSER_VERSION": "HeadlessChrome/112.0.5614.0",
  "START_TS": 1684851160610,
  "RAM_INFO": "Total: 17.06 GB | Free: 10.19 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": false,
  "PATCH_HASH": "9f38b",
  "LAUNCH_TIME_MS": 19150,
  "ACC_TYPE": "BUSINESS",
  "chats": 37,
  "messages": 59,
  "contacts": 1095,
  "isBiz": true,
  "isMd": true,
  "INSTANCE_ID": "d1a38be1-dfc3-40cc-b438-b91ef1fb60e2"
}

Environment

- OS: Windows 10
- Node: 18.15.0
- npm: 9.5.0

Screenshots/Logs

No response

Anything else?

No response

luizbizzio commented 1 year ago

Did you try run the bot in an normal account? Not business acount