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

Error: Couldn't get access token #71

Closed
hiifeng opened this issue Dec 12, 2022 · 24 comments
Closed

Error: Couldn't get access token #71

hiifeng opened this issue Dec 12, 2022 · 24 comments

Comments

@hiifeng
Copy link

hiifeng commented Dec 12, 2022

Using the latest v0.2.4 version, the bot replies:
Error: Couldn't get access token: failed to decode response: invalid character '<' looking for beginning of value
Does anyone know what is the reason? Is it because OpenAI added cloudflare?

@R0uter
Copy link

R0uter commented Dec 12, 2022

same here with the docker img

@alastone
Copy link

同样的问题

@a1gx
Copy link

a1gx commented Dec 12, 2022

same question

1 similar comment
@bwmgd
Copy link

bwmgd commented Dec 12, 2022

same question

@jchby
Copy link

jchby commented Dec 12, 2022

same error

@tianlichunhong
Copy link

I think it is blocked by OpenAI. It doesn't want to be used too much.

@Wandering-Consciousness

Same issue here. Something changed on the OpenAI side in the last day or so.

@MichaelCutro
Copy link

@dhilman Any updates on this? Going to try and run it on a vm tomorrow but I am getting the same error on M1

@MichaelCutro
Copy link

The error is coming from line 148 of chatgpt.go - "failed to decode response: invalid character '<' looking for beginning of value" suggests that the response received from the OpenAI API when the bot attempts to retrieve an access token is not a valid JSON object, but instead contains an HTML page or other invalid content. This could be caused by a number of issues, such as a misconfigured server or endpoint, a network connectivity problem, or an issue with the bot's code or configuration.

@gaeduf
Copy link

gaeduf commented Dec 12, 2022

so how can we solve this problem?

@alastone
Copy link

那么我们如何解决这个问题呢?

It's caused by the addition of cloudflare protection

@win0113
Copy link

win0113 commented Dec 12, 2022

同样的问题

+1

@llegomark
Copy link

Just a few hours ago, OpenAI integrated Cloudflare security into their system.

@BlueSkyLT
Copy link

Same issue.

@msilenkov
Copy link

msilenkov commented Dec 12, 2022

Maybe we should plug in here, then.
https://beta.openai.com/playground

:)

@root-wang
Copy link

image
you can this
image

@Xiefengshang
Copy link

It seems to be the problem of Cloudflare Captcha. How about adding browser plugin?

@llegomark
Copy link

Aside from Cloudflare, ChatGPT no longer outputs long-form content, if you hit the limit, it will throw a network error, or the CLI Response not in correct format! peer closed connection without sending complete message body (incomplete chunked read)

@hiifeng
Copy link
Author

hiifeng commented Dec 12, 2022

Aside from Cloudflare, ChatGPT no longer outputs long-form content, if you hit the limit, it will throw a network error, or the CLI Response not in correct format! peer closed connection without sending complete message body (incomplete chunked read)

Yes, you are quite right. I also found this problem, when I use https://chat.openai.com/chat, "network error" also occurs. I am not familiar with the go language, is there a solution?

@gitk01n
Copy link

gitk01n commented Dec 12, 2022

you are quite right ,inside cf_cf_clearance token

@taxueqinyin
Copy link

get refreshAccessToken is 403 forbidden,because open ai does man-machine validation on the request,i thought we should find a way to around it

@waltcow
Copy link

waltcow commented Dec 12, 2022

acheong08/ChatGPT#261

@m1guelpf
Copy link
Owner

Closing in favor of #69 to keep everything in one place

@m1guelpf m1guelpf closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
@MichaelCutro
Copy link

MichaelCutro commented Dec 13, 2022

Aside from Cloudflare, ChatGPT no longer outputs long-form content, if you hit the limit, it will throw a network error, or the CLI Response not in correct format! peer closed connection without sending complete message body (incomplete chunked read)

Yes, you are quite right. I also found this problem, when I use https://chat.openai.com/chat, "network error" also occurs. I am not familiar with the go language, is there a solution?

Just a moment...

I'm not very familiar with Go either but I have built bots in the past and gotten past Cloudflare with Puppeteer-extra I don't think this is a Cloudflare problem though rather the incomplete chunked read that @llegomark mentioned above

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

No branches or pull requests