-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
TypeError: Cannot read properties of undefined (reading '0') #21
Comments
Me too |
yea, I have the same issue, it works with my local machine. but once the code pushed to cloud server, it throws this error. is it because the server is behind the reverse proxy ? |
this is the error message I'm getting
I'm pretty sure, my server is deployed under US-central-1 region and the cookie value is presented in the code. and it works on the local machine. |
Hello @Ja-Sa-La! Could you please share your source code so that I can pinpoint the cause of this issue? |
Hey @mehul-srivastava, relevant parts to the code are here:
Edit: |
This exact piece of code works perfectly for me. I still think there might be an issue with the cookie. This may happen if you are using some other google account to interact with bard.google.com but using the cookie as I have written about it here - https://github.com/PawanOsman/GoogleBard#prerequisite---how-to-get-cookies. (how different account corresponds to a different cookie like If you followed the documentation well but still receiving an error, maybe try clearing cookies from your browser once and copy the new cookie from the official website. |
yeah, i was able to confirm it as working as well. on my local machine. though still on the VPS it fails to get any info using the same IP. Bing/chatgpt queries are working fine with chatgpt-api & bing-chat & Imagen via api.pawan.krd. vps is running almalinux 8 |
Hello, I'm not sure what happened, but after using this fine for a month or so all of a sudden, I keep getting the following error. Also as an attachment is a response for the request (cookie censored), using node 18.16.0 with googlebard 1.0.6
response.txt
file:///root/nodejs/yetanotherbot/node_modules/googlebard/dist/classes/bard.js:175
return resData[0];
^
TypeError: Cannot read properties of undefined (reading '0')
at Bard.ask (file:///root/nodejs/yetanotherbot/node_modules/googlebard/dist/classes/bard.js:175:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///root/nodejs/yetanotherbot/aiHelper.js:58:21
The text was updated successfully, but these errors were encountered: