Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Exception: Authentication failed with Status code: 404 #178

Closed
cool-xuan opened this issue Mar 23, 2023 · 34 comments
Closed

Exception: Authentication failed with Status code: 404 #178

cool-xuan opened this issue Mar 23, 2023 · 34 comments

Comments

@cool-xuan
Copy link

cool-xuan commented Mar 23, 2023

Thanks a lot for your awesome work first.

Prior to this day, EdgeGPT was working well, but unexpectedly, an exception has arisen. Despite my attempts to upgrade EdgeGPT to the most newest version (0.1.3) and to refresh my cookie file, this exception persists.

Besides, a Status Code 404 is reported.

Precisely, when I try to run python -m EdgeGPT --cookie-file ./cookies.json, the shell outputs:

    EdgeGPT - A demo of reverse engineering the Bing GPT chatbot
    Repo: github.com/acheong08/EdgeGPT
    By: Antonio Cheong

    !help for help

    Type !exit to exit

    Initializing...
    Enter `alt+enter` or `escape+enter` to send a message
    Status code: 404
    A looooooooooooooooooooong code (like html codes)
    Traceback (most recent call last):
      File "/home/zhouyixuan/miniconda3/envs/edgegpt/lib/python3.8/runpy.py", line 194, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/home/zhouyixuan/miniconda3/envs/edgegpt/lib/python3.8/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/home/zhouyixuan/chatgpt/EdgeGPT/src/EdgeGPT.py", line 467, in <module>
        asyncio.run(main())
      File "/home/zhouyixuan/miniconda3/envs/edgegpt/lib/python3.8/asyncio/runners.py", line 44, in run
        return loop.run_until_complete(main)
      File "/home/zhouyixuan/miniconda3/envs/edgegpt/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
        return future.result()
      File "/home/zhouyixuan/chatgpt/EdgeGPT/src/EdgeGPT.py", line 378, in main
        bot = Chatbot()
      File "/home/zhouyixuan/chatgpt/EdgeGPT/src/EdgeGPT.py", line 308, in __init__
        self.chat_hub: ChatHub = ChatHub(Conversation(self.cookiePath, self.cookies))
      File "/home/zhouyixuan/chatgpt/EdgeGPT/src/EdgeGPT.py", line 220, in __init__
        raise Exception("Authentication failed")
    Exception: Authentication failed
@DreamMaoMao
Copy link

i have the same problem! what happen?

@cool-xuan
Copy link
Author

@DreamMaoMao I suspect that Edge is only available in specific regions and unfortunately, China is currently blocked. 😭

@yduanBioinfo
Copy link

I have the same problem too.

@Harry-Jing
Copy link
Contributor

Now you can't access https://edgeservices.bing.com/edgesvc/turing/conversation/create when you use China's IP

@DreamMaoMao
Copy link

Chinese IP addresses can access this link, but it seems that the link has been moved and is no longer valid, resulting in a 404 error @Harry-Jing

@yduanBioinfo
Copy link

yduanBioinfo commented Mar 23, 2023 via email

@KamiPasi
Copy link

需要加代理

@acheong08
Copy link
Owner

export all_proxy=socks5://127.0.0.1:1080/

@tom68-ll
Copy link

I have the same question

@chswy123
Copy link

Yes, I have the same problem

@WhitneyYan
Copy link

WhitneyYan commented Mar 23, 2023

如果用的是v2rayN做代理,而且报错

httpx.ConnectError: EOF occurred in violation of protocol (_ssl.c:997)

可以看看这个,然后把代理开了也不报错。
我没升级v2rayN,就用的这种方法。
image

@acheong08
Copy link
Owner

我用的是 https://github.com/p4gefau1t/trojan-go

@Meteor-Sage
Copy link

If you are using a Chinese IP, please use a proxy. If this still happens, please check the proxy rules. Some proxy rules set Microsoft services to be directly connected. Modify them to use a proxy instead.

@cool-xuan
Copy link
Author

If you are using a Chinese IP, please use a proxy. If this still happens, please check the proxy rules. Some proxy rules set Microsoft services to be directly connected. Modify them to use a proxy instead.

Thanks for your reply. EdgeGPT works again when I set Proxy.

@Silhouette6
Copy link

It was used for none proxy,but now......

@Nu11Const
Copy link
Contributor

How can not use proxy to work?

@DreamMaoMao
Copy link

它曾经用于无代理,但现在......
The reason I use this interface is because I don't want to use proxy ...

@Nu11Const
Copy link
Contributor

I try to use python to reverse proxy it.

@Nu11Const
Copy link
Contributor

Nu11Const commented Mar 23, 2023

我解决这个问题了!
https://edgeservices.bing.com/edgesvc/turing/conversation/create 改成我搭建的镜像站https://bing.vmtask.repl.co/edgesvc/turing/conversation/create 就行了。不过最好不要用我的,要自己搭建。

Repository owner deleted a comment from ttyS0 Mar 23, 2023
@freedgw
Copy link

freedgw commented Mar 23, 2023

我解决这个问题了! 把 https://edgeservices.bing.com/edgesvc/turing/conversation/create 改成我搭建的镜像站https://bing.vmtask.repl.co/edgesvc/turing/conversation/create 就行了。不过最好不要用我的,要自己搭建。

如何搭建呢,反代吗

@acheong08
Copy link
Owner

acheong08 commented Mar 23, 2023

如何搭建呢,反代吗

Example: https://github.com/acheong08/EdgeGPT-Proxy

@acheong08
Copy link
Owner

@acheong08
Copy link
Owner

export BING_PROXY_URL="https://edge.churchless.tech/edgesvc/turing/conversation/create"

@acheong08
Copy link
Owner

@acheong08
Copy link
Owner

It automatically retries on error with a public proxy server.

@wong2
Copy link

wong2 commented Mar 25, 2023

So does the fallback proxy have access to the user cookie? I think that should be clarified.

@acheong08
Copy link
Owner

It does in order to authenticate. How should I ensure transparency?

@acheong08
Copy link
Owner

It runs https://github.com/acheong08/EdgeGPT-Proxy and doesn't log anything

@wong2
Copy link

wong2 commented Mar 25, 2023

Maybe not provide it as a fallback, but let user use it manually via
export BING_PROXY_URL="https://edge.churchless.tech/edgesvc/turing/conversation/create"

@wong2
Copy link

wong2 commented Mar 25, 2023

@acheong08 Can you add CORS headers to the proxy response? I'd like to use it in https://github.com/chathub-dev/chathub thanks!

@acheong08
Copy link
Owner

@acheong08 Can you add CORS headers to the proxy response? I'd like to use it in chathub-dev/chathub thanks!

Added

@acheong08
Copy link
Owner

Maybe not provide it as a fallback, but let user use it manually via export BING_PROXY_URL="https://edge.churchless.tech/edgesvc/turing/conversation/create"

I want the experience to be smooth. Most people don't read the readme properly. You can of course still set BING_PROXY_URL to override it.

@Darkluna999
Copy link

Darkluna999 commented Jun 17, 2023

我解决这个问题了! 把 https://edgeservices.bing.com/edgesvc/turing/conversation/create 改成我搭建的镜像站https://bing.vmtask.repl.co/edgesvc/turing/conversation/create 就行了。不过最好不要用我的,要自己搭建。

请问你是如何解决的?我自己部署之后会不断出现被新加坡微软云访问然后302。。。
image

image

头几个是直接浏览器访问和wget,没有任何问题
但使用python模块拉取就会触发302
部署的方式是

go install github.com/acheong08/EdgeGPT-Proxy@latest
go/bin/EdgeGPT-Proxy

尝试了反向代理和https都没效,我是不是比你少了某些设置?

@AthanaD
Copy link

AthanaD commented Jul 8, 2023

出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。
CaptchaChallenge: User needs to solve CAPTCHA to continue.

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