Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

One particular user's cookie gets invalidated after few calls (2/3/4/5) #58

Closed
rudrajyotibhattacharya opened this issue Jun 8, 2023 · 5 comments

Comments

@rudrajyotibhattacharya
Copy link

There has not been any excessive usage for 3 users but one particular user's cookie gets invalidated after few calls. Once I log out and log in once again, it again works for a few times and then again returns "Check __Secure-1PSID value." Is this a user ban or a recent phenomenon or anybody else facing this?

@dsdanielpark
Copy link
Owner

Have you checked if the __Secure-1PSID value has changed? Although it is user-specific, it can also be tied to the IP address. There is also a possibility that the __Secure-1PSID value may change intermittently.

@MeemeeLab
Copy link
Contributor

I think you have problem that I have. it sometimes works with only __Secure-1PSID, sometimes needs __Secure-1PSIDTS, sometimes __Secure-1PSIDTS changes (like once in a day)
Confusing thing is that __Secure-1PSID does not change unless logging out and login again, but browser seems to be handling this __Secure-1PSIDTS cookie rotation because I don't have to log back in.
I'm not sure why that's happening, it might be rolled out to specific user or something.

@rudrajyotibhattacharya
Copy link
Author

Hi Daniel,
I did not check if the cookie changed even when I was logged in. I straightaway logged out and logged in and tried with the new cookie value but the same problem happened. I have a suspicion which I am sharing just in case somebody else faces the same issue. I installed a metamask extension (a crypto wallet connect) in the chrome instance where the "problematic" user was logged in, after which this problem started. It might just be a coincidence but when I logged in from edge with the same "problematic" user and used the cookie, this particular problem went away. Although, the intermittent "Response error" is coming now, which other people have also reported.

Hi @MeemeeLab, do you mean you use '__Secure-1PSIDTS' cookie value while making Bard calls? Does that work?

@MeemeeLab
Copy link
Contributor

With recent update you can do something like this:

from bardapi import BardCookies

cookie_dict = {
    "__Secure-1PSID": "...",
    "__Secure-1PSIDTS": "...",
}

bard = BardCookies(cookie_dict=cookie_dict)

print(bard.get_answer("Hello"))

This commit is not published to pip so you have to install via pip install git+https://github.com/dsdanielpark/Bard-API.git

@rudrajyotibhattacharya
Copy link
Author

Thanks @MeemeeLab
Closing the issue as it is not appearing anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants