Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client.syncContacts(); returns Store.Contact.sync is not a function #3176

Closed
1 task done
TVARecordings opened this issue Mar 13, 2024 · 1 comment
Closed
1 task done

Comments

@TVARecordings
Copy link

Are you using the latest version of the library?

  • I have checked and am 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

Upon executing the command 'Client.syncContacts()', it errors:
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^

Error [TypeError]: Store.Contact.sync is not a function
at window.WAPI.syncContacts (evaluate at E:\AmecaCore\node_modules@open-wa\wa-automate\dist\controllers\browser.js:381:94, :256:18)
at evaluate (evaluate at Client. (E:\AmecaCore\node_modules@open-wa\wa-automate\dist\api\Client.js:565:44), :0:12)
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)
at async CdpFrame.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Frame.js:343:20)
at async CdpPage.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Page.js:828:20)

Node.js v20.11.1

Expected Behavior

Expected the script to just synchronise the contacts.
Yes, the mobile phone is online, WA-Business has access to all contacts and runs the latest version of WA-Business

Steps To Reproduce

Client.syncContacts()

create() code OR full CLI command + CONFIG

const configObject = {
  sessionId: '???',
  authTimeout: 0,
  cacheEnabled: false,
  useChrome: true,
  cachedPatch: true,
  devtools: false,
  // chromiumArgs: ['--no-sandbox'],
  disableSpins: true,
  headless: true, //new
  popup: false,
  qrTimeout: 0,
  messagePreprocessor: "AUTO_DECRYPT", //"AUTO_DECRYPT","SCRUB"
  linkParser: "https://link.openwa.cloud/api",
  restartOnCrash: startBot,
  logInternalEvents: false, //ONLY TURN THIS ON IF ASKED TO!
  discord: '???',
  ezqr: true,
  //callTimeout: 60000, // 600000
  licenseKey: "E7C3D6A1-8F2B7E9C-4A6D1B5F-0258C8E2", //jk
  screenshotOnInitializationBrowserError: false,
  //maxchats: 15,
  ensureHeadfulIntegrity: true,
  hostNotificationLang: 'nl-nl',
  killProcessOnBrowserClose: true,
  killProcessOnTimeout: false,
  logConsole: false,
  logConsoleErrors: true,
  logFile: true,
  onError: "LOG_AND_FALSE",
  //pQueueDefault: true,
  //intervalCap: 4, //process 5 events
  // interval: 2000, //within every three second window
  // concurrency: 1, //make sure to process, at most, 2 events at any one time
  // timeout: 100, //make sure there is a 100ms gap between each event processing.
  // carryoverConcurrencyCount: true //If there are more than 5 events in that period, process them within the next 3 second period. Make sure this is always set to true!!!
};

DEBUG INFO

{
  "WA_VERSION": "2.2411.2",
  "WA_AUTOMATE_VERSION": "4.68.0",
  "BROWSER_VERSION": "Chrome/122.0.6261.112",
  "START_TS": 1710291502819,
  "RAM_INFO": "Total: 68.62 GB | Free: 47.16 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": false,
  "PATCH_HASH": "CACHED-67662",
  "LAUNCH_TIME_MS": 15004,
  "ACC_TYPE": "BUSINESS",
  "chats": 112,
  "messages": 148,
  "contacts": 3173,
  "isBiz": true,
  "isMd": true,
  "INSTANCE_ID": "ecf02d01-b014-4ebf-8053-2a59ef7898b2"
}

Environment

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

Screenshots/Logs

No response

Anything else?

Keep up the good work :3

@smashah
Copy link
Member

smashah commented Apr 7, 2024

patched

@smashah smashah closed this as completed Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants