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.12k stars 590 forks source link

await Client.getAllUnreadMessages() returning "Error [TypeError]: _0x30d707[("NyC" + "SU")](...) is not a function" #3188

Closed TVARecordings closed 5 months ago

TVARecordings commented 5 months 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

EASY API/CLI

Current Behavior

Whenever using await Client.getAllUnreadMessages();, it returns this error:

Error [TypeError]: _0x30d707("NyC" + "SU") is not a function window.. (pptr:evaluate;E%3A%5CAmecaCore%5Cnode_modules%5C%40open-wa%5Cwa-automate%5Cdist%5Ccontrollers%5Cpatch_manager.js%3A127%3A50:1:270204) async Promise.all (index 1) at window.. (evaluate at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\controllers\patch_manager.js:127:50, :0:270203) at #evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\ExecutionContext.js:222:56) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ExecutionContext.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\ExecutionContext.js:117:16) at async IsolatedWorld.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\IsolatedWorld.js:124:16)

Code:

conLog(`Fetching unreadMessages`);
const unreadMessages = await Client.getAllUnreadMessages();

Expected Behavior

Fetch the unread messages.

Steps To Reproduce

Use await Client.getAllUnreadMessages();

create() code OR full CLI command + CONFIG

const configObject = {
  sessionId: 'aName',
  authTimeout: 0,
  cacheEnabled: true,
  useChrome: true,
  cachedPatch: true,
  devtools: false,
  chromiumArgs: ['--no-sandbox'],
  disableSpins: true,
  headless: false, //new
  popup: false,
  qrTimeout: 0,
  messagePreprocessor: "AUTO_DECRYPT", //"AUTO_DECRYPT","SCRUB"
  linkParser: "https://link.openwa.cloud/api",
  restartOnCrash: true,
  logInternalEvents: false, //ONLY TURN THIS ON IF ASKED TO!
  discord: 'Mine',
  ezqr: true,
  callTimeout: 0, // 600000
  licenseKey: "Mine"
  screenshotOnInitializationBrowserError: false,
  hostNotificationLang: 'nl-nl',
  killProcessOnBrowserClose: true,
  killProcessOnTimeout: false,
  logConsole: false,
  logConsoleErrors: true,
  logFile: true,
  onError: "LOG_AND_FALSE",
};

DEBUG INFO

{
  "WA_VERSION": "2.3000.1012612339",
  "WA_AUTOMATE_VERSION": "4.71.1",
  "BROWSER_VERSION": "Chrome/123.0.6312.106",
  "START_TS": 1712601979642,
  "RAM_INFO": "Total: 68.62 GB | Free: 46.15 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": false,
  "PATCH_HASH": "bff5f",
  "LAUNCH_TIME_MS": 23280,
  "ACC_TYPE": "BUSINESS",
  "chats": 337,
  "messages": 616,
  "contacts": 945,
  "isBiz": true,
  "isMd": true,
  "INSTANCE_ID": "de91b048-d867-4c19-bcfe-1cb786f25cdf"
}

Environment

- OS: Windows 10
- Node: 20.11.1
- npm: 10.2.4

Screenshots/Logs

No response

Anything else?

No response

smashah commented 5 months ago

please double check this.i think this is fixed