m1guelpf/chatgpt-telegram

Error: Couldn't get access token: failed to decode response: invalid character '<' looking for beginning of value

ansge88 opened this issue · 38 comments

Keep getting this error
Checked all the files that can be which may be related to this, but didn't find anything.
Does anyone know how to fix this issue?
image

image
same here

same

Guys read other issues first it's all in #69

Facing the same issue now

image

Leask commented

Same here...

klt14 commented

same here

Same here, any solution ?

same

same lmao

Any solutions?

May i know this still have any solution

I think we should use login/password as env vars for getting correct cookies

This is because of the CloudFlare bot detection. The cloudflare cookie should also be used but note that this gets refreshed every two hours. So you have to copy the key every 2 hours.

Please stop mentioning that it doesn't work. Just upvote the first post.

@Daankrol hi
i copied the __Secure-next-auth.session-token but it doesn't help

Guys read other issues first it's all in #69

I did the changes mentioned in the error #69 and recompiled the code successfully. Now the cloudflare captcha and login works (did not before) in the chromium browser, however the error remains after that when I call the bot in telegram:
Error: Couldn't get access token: failed to decode response: invalid character '<' looking for beginning of value

any solution?

This is because of the CloudFlare bot detection. The cloudflare cookie should also be used but note that this gets refreshed every two hours. So you have to copy the key every 2 hours.

Please stop mentioning that it doesn't work. Just upvote the first post.

"first post"? what first post? link it now please

Any update on this ?

Also having trouble with this, I am getting the OPs error.

I initially tried to run the bot regularly without setting up the config on my ubuntu VM, however, I couldn't get past the human verification screen as it would close the browser window before getting to the login screen.

I copied the __Secure-next-auth.session-token into ~/.config/chatgpt.json however that's when I got the OPs "Error: Couldn't get access token: failed to decode response: invalid character '<' looking for beginning of value" Error. The tele bot seems to run within the terminal but within tele just gives that error.

I don't quite understand what this line in the README means "You will then have to create a config file in the following location depending on your OS (replace YOUR_USERNAME_HERE with your username". There is no notation as to what the username is for (tele, chatgpt) and how to add it into the config.

Any help would be appreciated as I would love to get this working.

I don't quite understand what this line in the README means "You will then have to create a config file in the following location depending on your OS (replace YOUR_USERNAME_HERE with your username". There is no notation as to what the username is for (tele, chatgpt) and how to add it into the config.

@georgijspi username is simply name of the user folder in your computer, mine is "Elvis" and im running windows 10 so the path will be C:\Users\Elvis\AppData\Roaming\chatgpt.json

have same problem

same here

same issue

Screenshot 2023-01-26 at 15 54 57

dop1e commented

same

same

same, any ideas?

image

Logic Level 100 👍

@m1guelpf do you think you can spend a couple of mins answering how to solve this problem?

My enviroment:
Windows 11, dowloaded your windows pack, filled up the .env file, renamend as you tell (.env), also did the cookie "chatgpt.json" file..but same problem here.

image

Thank you so much in advanced!
And if i can help with something just tell me.

Same here

same

same

same,any solution?

Same issue

一模一样的问题.

Leask commented

You guys can also try this project: https://github.com/Leask/halbot

GitHub
Just another ChatGPT/Bing Chat Telegram bob, which is simple design, easy to use, extendable and fun. - GitHub - Leask/halbot: Just another ChatGPT/Bing Chat Telegram bob, which is simple design, e...