Alfex4936/Bard-rs

Cookie issue

Closed this issue · 5 comments

Hi, I built the code successfully and copied the token from the cookies using Firefox but I get

thread 'main' panicked at 'SNlM0e not found', /home/xxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/bard-rs-1.2.2/src/main.rs:134:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Is this related to dsdanielpark/Bard-API#99 ?

same issue i am facing @davidcortesortuno did you got any solution buddy? plus @Alfex4936 buddy can u guide for this :-)

No solution, I'm currently using the web interface only

I'm getting the same error after a short period of usage. After login out from bard (in browser) and deleting cookie __Secure-1PSID it would work again for short while.

After reading the linked thread, it seems like the __Secure-1PSIDTS might be needed (at least for some), So I played around a bit with the __Secure-1PSIDTS cookie. And it seems like it is changed after a while and after that the 'SNlM0e not found' error occurs. Updating the cookie to latest value (from browser) makes it work again.

I have not figured out how to automagically get the updated value of __Secure-1PSIDTS. That would probably solve our problems (?).

If you wanna try it out, just find the value of __Secure-1PSIDTS in the same way you found __Secure-1PSID. Then add it to the session key as a comma separated list. When you get a 'SNlM0e not found' error, update only the __Secure-1PSIDTS and it should work again. No google logout/login needed.

Example:
bard-rs -s ", __Secure-1PSIDTS="

(Maybe unrelated note: Seems like __Secure-1PSIDTS and __Secure-3PSIDTS have the same value)

Thanks tedsamu . I confirm that works. i.e.
bard-rs --session "<__Secure-1PSID value>, __Secure-1PSIDTS=<__Secure-1PSIDTS value>"
or put in .env:
SESSION_ID=<__Secure-1PSID value>,__Secure-1PSIDTS=<__Secure-1PSIDTS value>
then
bard-rs

Sorry for the late! just uploaded the new version!

cargo install bard-rs -f

image