m1guelpf / chatgpt-telegram

Run your own GPTChat Telegram bot, with a single command!
MIT License
3.9k stars 560 forks source link

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

Open ansge88 opened 1 year ago

ansge88 commented 1 year ago

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

Mogured commented 1 year ago

image same here

maksimkustreev commented 1 year ago

image yep!

RoninReilly commented 1 year ago

same

LyghtCode commented 1 year ago

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

pupubird commented 1 year ago

Facing the same issue now

pupubird commented 1 year ago
image
Leask commented 1 year ago

Same here...

klt14 commented 1 year ago

same here

achel7ey commented 1 year ago

Same here, any solution ?

denda188 commented 1 year ago

same

delta-whiplash commented 1 year ago

same lmao

davidanger commented 1 year ago

Any solutions?

JDoxian commented 1 year ago

May i know this still have any solution

mmospanenko commented 1 year ago

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

Daankrol commented 1 year ago

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.

dionisvl commented 1 year ago

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

DegenComedian commented 1 year ago

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

huy2212 commented 1 year ago

any solution?

elvisisvan commented 1 year ago

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

nPokemon commented 1 year ago

Any update on this ?

georgijspi commented 1 year ago

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.

elvisisvan commented 1 year ago

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

nnhieu97 commented 1 year ago

have same problem

nnhhuu commented 1 year ago

same here

NikitaKosolapov commented 1 year ago

same issue

Screenshot 2023-01-26 at 15 54 57

dop1e commented 1 year ago

same

swcool76 commented 1 year ago

same

chryseosTang commented 1 year ago

same

madmaxxx89 commented 1 year ago

same, any ideas?

idrisawad commented 1 year ago
image

Logic Level 100 👍

cgonIT commented 1 year ago

@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.

MrPeterJin commented 1 year ago

Same here

presslxqii commented 1 year ago

same

IAliceBobI commented 1 year ago

same

wang182 commented 1 year ago

same,any solution?

farhadhamed commented 1 year ago

Same issue

yangyongyongyong commented 1 year ago

一模一样的问题.

Leask commented 1 year ago

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

GitHub
GitHub - Leask/halbot: Just another ChatGPT/Bing Chat Telegram bob, which is simple design, easy to use, extendable and fun.
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...