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

New error #336

Open
witchfindertr opened this issue Mar 29, 2024 · 22 comments
Open

New error #336

witchfindertr opened this issue Mar 29, 2024 · 22 comments

Comments

@witchfindertr
Copy link

Whatsapp ChatGPT & DALL-E
A Whatsapp bot that uses OpenAI's ChatGPT and DALL-E to generate text and images from a prompt.
-------------------------------------------------------------------------------------------------

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

@connorv001
Copy link
Contributor

Which version are you using?

@Cryptoverso
Copy link

Cryptoverso commented Apr 2, 2024

Alguma solução? estou tento o mesmo problema!! :(
└── [email protected]

/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

@hkvincent
Copy link

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

@GreenerX
Copy link

GreenerX commented Apr 4, 2024

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 :(
SCR-20240404-pudy

@rikuddo91
Copy link

rikuddo91 commented Apr 4, 2024

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`

@GreenerX
Copy link

GreenerX commented Apr 5, 2024

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..

@connorv001
Copy link
Contributor

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?

@rikuddo91
Copy link

Did you update?

Yes, I did.

@connorv001
Copy link
Contributor

Did you update?

Yes, I did.

what's the verison of whatsapp-webjs

@rikuddo91
Copy link

rikuddo91 commented Apr 5, 2024

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"

@connorv001
Copy link
Contributor

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

@connorv001
Copy link
Contributor

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?

@rikuddo91
Copy link

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.

@connorv001
Copy link
Contributor

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?

@hkvincent
Copy link

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 :( SCR-20240404-pudy

Did you run 'npm install' after changing to the new version? The issue is definitely related to the version of web.js.

@GreenerX
Copy link

GreenerX commented Apr 6, 2024

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 :( SCR-20240404-pudy

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:
SCR-20240406-iwyt

@GreenerX
Copy link

GreenerX commented Apr 6, 2024

Now its just stuck on this:
SCR-20240406-iyad

@ClaytonCassi
Copy link
Contributor

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?

@zzzeven
Copy link

zzzeven commented Apr 14, 2024

npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

@brumatx
Copy link

brumatx commented May 16, 2024

npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

The best aswer... works for me!!

@Isaakkamau
Copy link

Isaakkamau commented Jun 11, 2024

I will just drop my debugging steps here.

  1. First of all I deleted all this folders, if they are available in your project: node_modules, session, .wwebjs_cache
  2. Replace you package.json with this one:
{
	"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"
	}
}

  1. Re-run: npm install
  2. finally: npm run start

@Cryptoverso
Copy link

github:pedroslopez/whatsapp-web.js#webpack-exodus está fora,

como fazer agora?

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

10 participants