Open witchfindertr opened 8 months ago
Which version are you using?
Alguma solução? estou tento o mesmo problema!! :( └── whatsapp-web.js@1.22.1
/Users/guilhermemelo/Codes/CoinNodes/chatbot/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34 const version = indexHtml.match(/manifest-([\d\.]+).json/)[1]; ^
TypeError: Cannot read properties of null (reading '1') at LocalWebCache.persist (/Users/guilhermemelo/Codes/CoinNodes/chatbot/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34:69) at /Users/guilhermemelo/Codes/CoinNodes/chatbot/node_modules/whatsapp-web.js/src/Client.js:729:36 at processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.12.0
need to change the "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7" to "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_11" in package.json
need to change the "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7" to "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_11" in package.json
This didn't help :(
This worked for me:
npm update whatsapp-web.js
Still giving me the error after scanning the QR Code,
`E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221 throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails)); ^
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') at puppeteer_evaluation_script:5:95 at ExecutionContext._evaluateInternal (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\src\common\ExecutionContext.ts:273:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecutionContext.evaluate (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\src\common\ExecutionContext.ts:140:12) at Client.initialize (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\src\Client.js:327:9)
Node.js v18.18.0`
This worked for me: npm update whatsapp-web.js
Still giving me the error after scanning the QR Code,
`E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221 throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails)); ^
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') at puppeteer_evaluation_script:5:95 at ExecutionContext._evaluateInternal (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\src\common\ExecutionContext.ts:273:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecutionContext.evaluate (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\src\common\ExecutionContext.ts:140:12) at Client.initialize (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\src\Client.js:327:9)
Node.js v18.18.0`
Yeah still not working for me either after the update..
This worked for me: npm update whatsapp-web.js
Still giving me the error after scanning the QR Code,
E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221 throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails)); ^ Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') at **puppeteer_evaluation_script**:5:95 at ExecutionContext._evaluateInternal (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\src\common\ExecutionContext.ts:273:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecutionContext.evaluate (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\node_modules\puppeteer\src\common\ExecutionContext.ts:140:12) at Client.initialize (E:\Temp\whatsapp-chatgpt\node_modules\whatsapp-web.js\src\Client.js:327:9) Node.js v18.18.0
Yeah still not working for me either after the update..
Did you update?
Did you update?
Yes, I did.
Did you update?
Yes, I did.
what's the verison of whatsapp-webjs
Did you update?
Yes, I did.
what's the verison of whatsapp-webjs
So I ran npm update whatsapp-web.js
and it updated to version": "1.22.1"
Did you update?
Yes, I did.
what's the verison of whatsapp-webjs
So I ran
npm update whatsapp-web.js
and it updated to version": "1.22.1"
Try updating puppeteer aslo
Did you update?
Yes, I did.
what's the verison of whatsapp-webjs
So I ran
npm update whatsapp-web.js
and it updated to version": "1.22.1"
Are you running linux/dockeR?
Did you update?
Yes, I did.
what's the verison of whatsapp-webjs
So I ran
npm update whatsapp-web.js
and it updated to version": "1.22.1"Are you running linux/dockeR?
No, simple Windows 10.
Did you update?
Yes, I did.
what's the verison of whatsapp-webjs
So I ran
npm update whatsapp-web.js
and it updated to version": "1.22.1"Are you running linux/dockeR?
No, simple Windows 10.
Tried updating pupetter? waht's ypour node verison?
need to change the "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7" to "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_11" in package.json
This didn't help :(
Did you run 'npm install' after changing to the new version? The issue is definitely related to the version of web.js.
need to change the "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7" to "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_11" in package.json
This didn't help :(
Did you run 'npm install' after changing to the new version? The issue is definitely related to the version of web.js.
My JSON looks like this after the npm update and npm install:
Now its just stuck on this:
doing this step:
const client = new Client({
puppeteer: {
args: ["--no-sandbox"]
},
webVersionCache: {
type: 'remote',
remotePath: `https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html`,
},
authStrategy: new LocalAuth({
dataPath: constants.sessionPath
})
});
I solve this error -> const version = indexHtml.match(/manifest-([\d\.]+).json/)[1]; TypeError: Cannot read properties of null (reading '1')
but its raise a new puppetter error - > throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
^
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'push') this error persist even when u update puppeteer and whatsappweb.js to lastest version.
Has anyone managed to get the application to work?
npm install github:pedroslopez/whatsapp-web.js#webpack-exodus
npm install github:pedroslopez/whatsapp-web.js#webpack-exodus
The best aswer... works for me!!
I will just drop my debugging steps here.
node_modules
, session
, .wwebjs_cache
{
"name": "whatsapp-chatgpt",
"version": "1.0.0",
"description": "Whatsapp bot that uses OpenAI's GPT & DALLE to respond to user inputs",
"main": "src/index.ts",
"author": "Askrella Software Agency UG (haftungsbeschränkt)",
"scripts": {
"start": "npx vite-node src/index.ts",
"prettier": "prettier --write ./src"
},
"license": "MIT",
"dependencies": {
"aws-sdk": "^2.1467.0",
"chatgpt": "^5.2.5",
"dotenv": "^16.3.1",
"fetch-blob": "^4.0.0",
"ffmpeg": "^0.0.4",
"langchain": "^0.0.156",
"openai": "^3.3.0",
"picocolors": "^1.0.0",
"qrcode": "^1.5.3",
"whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#webpack-exodus"
},
"engines": {
"node": ">=18.0.0"
},
"devDependencies": {
"@types/qrcode": "^1.5.2",
"prettier": "^3.0.3"
}
}
3. Re-run: `npm install`
4. finally: `npm run start`
github:pedroslopez/whatsapp-web.js#webpack-exodus está fora,
como fazer agora?
C:\Users\Administrator\Desktop\a\whatsapp-chatgpt-master\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34 const version = indexHtml.match(/manifest-([\d\.]+).json/)[1]; ^
TypeError: Cannot read properties of null (reading '1') at LocalWebCache.persist (C:\Users\Administrator\Desktop\a\whatsapp-chatgpt-master\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69) at C:\Users\Administrator\Desktop\a\whatsapp-chatgpt-master\node_modules\whatsapp-web.js\src\Client.js:729:36 at processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.17.0