askrella / whatsapp-chatgpt

ChatGPT + DALL-E + WhatsApp = AI Assistant :rocket: :robot:
3.49k stars 842 forks source link

whatsapp chatgpt new session bug #285

Closed e-pano closed 1 year ago

e-pano commented 1 year ago

I've been having problems logging in for the last week. The bot doesn't work. After the client says ready, there is no login screen.

Bug

dermyhzo commented 1 year ago

same issues :

│
◇  Authenticated!
│
◑  Logging in.     
/root/whatsapp-chatgpt-2/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 'CallCollection')
    at __puppeteer_evaluation_script__:9:66
    at ExecutionContext._evaluateInternal (/root/whatsapp-chatgpt-2/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 (/root/whatsapp-chatgpt-2/node_modules/whatsapp-web.js/node_modules/puppeteer/src/common/ExecutionContext.ts:140:12)
    at Client.initialize (/root/whatsapp-chatgpt-2/node_modules/whatsapp-web.js/src/Client.js:278:9)

Node.js v18.13.0
root@wa-gpt-debian:~/whatsapp-chatgpt-2# 
dermyhzo commented 1 year ago

problem fixed

npm i whatsapp-web.js

e-pano commented 1 year ago

npm i whatsapp-web.js

Hi dermyhzo,

npm i whatsapp-web.js

I ran this command but it didn't fix it. Session process does not start 123

If you have the possibility to send me all working files, that would be great.

e-pano commented 1 year ago

I have reinstalled the script and I am trying to solve the problems step by step. The first error is below.

PS C:\8> npm run start

whatsapp-chatgpt@1.0.0 start npx vite-node src/index.ts

(node:5472) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3). For more information, check the migration guide at https://a.co/7PzMCcy (Use node --trace-warnings ... to show where the warning was created) C:\8\node_modules\langchain\dist\callbacks\handlers\console.js:25 const { color } = __vite_ssr_import_0__.default; ^

TypeError: Cannot destructure property 'color' of '__vite_ssr_import_0__.default' as it is undefined. at C:\8\node_modules\langchain\dist\callbacks\handlers\console.js:25:9 at ViteNodeRunner.directRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:328:5) at ViteNodeRunner.cachedRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:186:14) at ViteNodeRunner.dependencyRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:221:12) at C:\8\node_modules\langchain\dist\callbacks\manager.js:3:31 at ViteNodeRunner.directRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:328:5) at ViteNodeRunner.cachedRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:186:14) at ViteNodeRunner.dependencyRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:221:12) at C:\8\node_modules\langchain\dist\llms\base.js:4:31 at ViteNodeRunner.directRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:328:5) at ViteNodeRunner.cachedRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:186:14) at ViteNodeRunner.dependencyRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:221:12) at C:\8\node_modules\langchain\dist\llms\index.js:1:31 at ViteNodeRunner.directRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:328:5) at ViteNodeRunner.cachedRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:186:14) at ViteNodeRunner.dependencyRequest (file:///C:/8/node_modules/vite-node/dist/client.mjs:221:12)

Node.js v18.16.0 PS C:\8>

adamshand commented 1 year ago

problem fixed npm i whatsapp-web.js

Didn't work for me either.

e-pano commented 1 year ago

Can anyone solve this problem? The bot is not working.

navopw commented 1 year ago

I fixed lots of issues. It currently works on my side.

I will close this PR for now. If you still have issues, please open another PR.

Thanks!