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

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

Open
mallikharjuna-wq opened this issue Apr 5, 2024 · 8 comments
Open

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

mallikharjuna-wq opened this issue Apr 5, 2024 · 8 comments

Comments

@mallikharjuna-wq
Copy link

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
Copy link

Mesmo problema aqui

@mallikharjuna-wq
Copy link
Author

Same problem here

any other solutions

@caiot5
Copy link

caiot5 commented Apr 26, 2024

Mesma coisa aqui.

@mallikharjuna-wq
Copy link
Author

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
Copy link

lidernetworktecnologia commented May 16, 2024

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
Copy link

Estou com o mesmo problema.

@Revolutionnnn
Copy link

I have the same error

@DukazzCruz
Copy link

DukazzCruz commented May 28, 2024

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.

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

6 participants