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

🐛 [BUG]: Upon using Bard-ai for a few minutes or so, it will invalidate the cookie or return NULL #61

Open
3 tasks done
malice-cli opened this issue Sep 3, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@malice-cli
Copy link

Prerequisites

  • I have searched the issues and believe that it has not already been reported
  • It occurs on the latest version of bard-ai
  • I have read the FAQ and there are no solutions there

Bug Description

As said in the title, when you are using it for more than 5 minutes, it will start returning null responses or have a invalidated cookie.
image
and I use a new cookie every time, it would work, but after 5 minutes, it gets invalidated.
Im not sure if this is a issue with the library itself, or bard.

Reproduction Steps

  1. Getting a new cookie
  2. Using bard for 5 minutes or so
  3. It gets invalidated and returns null

Other information

No response

Occurance Rate

I can reproduce this bug 100% of the time.

@malice-cli malice-cli added the bug Something isn't working label Sep 3, 2023
@EvanZhouDev
Copy link
Owner

Are you using the __Secure-1PSIDTS cookie as well? See docs here: https://bard-ai.js.org/faq/#cant-use-bard

@malice-cli
Copy link
Author

yes. it still returns a invalidation.

@ziuss76
Copy link

ziuss76 commented Sep 7, 2023

I have same error here, also tried using __Secure-3PSID and __Secure-3PSIDTS, and few minutes after it returns same error above.
I think google constantly changes the cookie to shut down 3rd party apis, just like you mentioned in github readme.

@jonvicbarcenas
Copy link

Is there a way to auto fetch cookies using gmail and passwords? It invalidates mine after minutes

@Goldp-js
Copy link

Goldp-js commented Oct 8, 2023

After some research I saw that in this line where all the login is in charge, it looks for variable 1, and then when the cookie does not work it will return Error: TypeError: Cannot read properties of null (reading '1')

const SNlM0e = ResponseText.match(/SNlM0e":"(.*?)"/)[1];

@Goldp-js
Copy link

Goldp-js commented Oct 9, 2023

The problem is that the cookies mentioned change constantly and since it is not a good idea to automate that, since, if the process of obtaining cookies could be automated, a captcha will always appear on the bard website so it is not possible to work in obtaining automatic cookies.

@EvanZhouDev
Copy link
Owner

EvanZhouDev commented Oct 10, 2023

Yes, please migrate to the PaLM API. The simulated Bard API interface is no longer stable (it's only working for some people)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants