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

ProtocolError: Protocol error (Runtime.callFunctionOn): Promise was collected #3214

Open demartinoalexis opened 4 months ago

demartinoalexis commented 4 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

My own code

Current Behavior

SnedText randomly fails

Expected Behavior

senttext to work

Steps To Reproduce

using sendText

create() code OR full CLI command + CONFIG

create({
    sessionId: sessionName,
    authTimeout: 60, 
    restartOnCrash: start,
    blockCrashLogs: true,
    disableSpins: true,
    headless: false,
    useChrome: true,
    hostNotificationLang: 'ES_AR',
    licenseKey: 'xxxx',
    //logConsole: true,
    sessionDataPath: 'open-wa/sessiones',
    popup: false,
    qrTimeout: 0, //0 means it will wait forever for you to scan the qr code
    killProcessOnBrowserClose: true,
    skipUpdateCheck: false,
    useStealth: true,
    //throwErrorOnTosBlock:true,
    multiDevice: true,
    //deleteSessionDataOnLogout: true,
    //qrLogSkip: true,
    //skipSessionSave: true,

  }).then(client => start(client));

DEBUG INFO

{
  "WA_VERSION": "2.3000.1013779025",
  "WA_AUTOMATE_VERSION": "4.71.11",
  "BROWSER_VERSION": "Chrome/124.0.6367.207",
  "START_TS": 1716831534497,
  "RAM_INFO": "Total: 7.75 GB | Free: 5.31 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": false,
  "PATCH_HASH": "b94ec",
  "LAUNCH_TIME_MS": 27513,
  "ACC_TYPE": "BUSINESS",
  "chats": 601,
  "messages": 86,
  "contacts": 3923,
  "isBiz": true,
  "isMd": true,
  "INSTANCE_ID": "c3eb941b-ff34-4f62-8574-382a6ce5f719"
}

Environment

- OS: Linux 5.15
- Node: 19.8.1
- npm: 9.5.1

Screenshots/Logs

home/ipas/interfaces/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:61 _Callback_error.set(this, new Errors_js_1.ProtocolError()); ^

ProtocolError: Protocol error (Runtime.callFunctionOn): Promise was collected at new Callback (/home/ipas/interfaces/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:61:35) at CallbackRegistry.create (/home/ipas/interfaces/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:106:26) at Connection._rawSend (/home/ipas/interfaces/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:216:26) at CDPSessionImpl.send (/home/ipas/interfaces/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:425:78) at ExecutionContext._ExecutionContext_evaluate (/home/ipas/interfaces/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:240:46) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ExecutionContext.evaluate (/home/ipas/interfaces/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:146:16)

Node.js v19.8.1

Anything else?

No response