canove / whaticket-community

A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
MIT License
1.67k stars 841 forks source link

updated whatsapp-web.js - 1.23.0 after not working #631

Open mallikharjuna-wq opened 7 months ago

mallikharjuna-wq commented 7 months ago

image_2024_04_05T05_50_34_882Z image

step1: add connection throw error below

UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null at LocalWebCache.persist (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69) at C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\Client.js:744:36 at processTicksAndRejections (internal/process/task_queues.js:95:5) (node:10512) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:10512) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:10512) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'push') at fillModuleArray (eval at (:2:5), :6:74) at moduleRaid (eval at (:2:5), :15:3) at puppeteer_evaluation_script:4:17 at ExecutionContext._evaluateInternal (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async ExecutionContext.evaluate (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16) at async Client.initialize (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\Client.js:323:9) (node:10512) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

ste 2: connect on mobile connection added but whatsapp qr show not show connected or signal marks

UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null at LocalWebCache.persist (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69) at C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\Client.js:744:36 at processTicksAndRejections (internal/process/task_queues.js:95:5) (node:10512) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7) (node:10512) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') at puppeteer_evaluation_script:5:95 at ExecutionContext._evaluateInternal (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at async ExecutionContext.evaluate (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16) at async Client.initialize (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\Client.js:323:9) (node:10512) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8) (node:10512) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null at LocalWebCache.persist (C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69) at C:\malli backup\Travel Projects\travel-wtchat-backend\node_modules\whatsapp-web.js\src\Client.js:744:36 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) (node:10512) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 10)

lidernetworktecnologia commented 7 months ago

Mesmo problema aqui

mallikharjuna-wq commented 7 months ago

Same problem here

any other solutions

caiot5 commented 7 months ago

Mesma coisa aqui.

mallikharjuna-wq commented 7 months ago

Same problem here

The tip of @lidernetworktecnologia. It worked for me, but for it to work I didn't use npm install, I directly changed the package.json file with the correct version, getting: "whatsapp-web.js": "^1.23.1-alpha.5" then removed the directory node_modules and installed it, after that I changed the src/libs/wbot.ts file as below:

const wwebVersion = '2.2407.3'; const wbot: Session = new Client({ session: sessionCfg, authStrategy: new LocalAuth({clientId: 'bd_'+whatsapp.id}), puppeteer: { executablePath: process.env.CHROME_BIN || undefined, // @ts-ignore browserWSEndpoint: process.env.CHROME_WS || undefined, args: args.split(' ') }, webVersionCache: { type: 'remote', remotePath: https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html, }, }); It works, thanks for your assistance.

lidernetworktecnologia commented 6 months ago

Hoje voltou o problema e agora saiu a whatsapp-web.js1.23.1-alpha.6 e mesmo usando a ultima versao nao funciona mais retorna mesmo erro ao ler qrcode. Alguem conseguiu resolver apos cair novamente?

rogeriosims commented 6 months ago

Estou com o mesmo problema.

Revolutionnnn commented 6 months ago

I have the same error

DukazzCruz commented 5 months ago

const wbot: Session = new Client({ session: sessionCfg, webVersion: "2.2412.54v2", puppeteer: { browserWSEndpoint: ${process.env.CHROME_WS}${lauchOptions} || undefined, args: [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu-driver-bug-workarounds", "--disable-accelerated-2d-canvas", "--disable-background-timer-throttling", "--disable-backgrounding-occluded-windows", --user-data-dir=${userDataDir} // Specify the dynamic user data directory here ], headless: true, userDataDir: process.env.CHROME_WS ? userDataDir : undefined }, sessionName, webVersionCache: { type: "remote", remotePath:https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html } });

I apply this patch:

whatsapp-web.js+1.23.1-alpha.5.patch

"whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#webpack-exodus",

this is working me.