EdgeGPT icon indicating copy to clipboard operation
EdgeGPT copied to clipboard

[Bug]: Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.

Open a37836323 opened this issue 1 year ago • 56 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

After using it 30 times, it prompts this, what should I do?

Steps to reproduce the problem

  1. After using it 30 times, it prompts this, what should I do?

What should have happened?

After using it 30 times, it prompts this, what should I do?

Version where the problem happens

3.9

What Python version are you running this with?

3.9

What is your operating system ?

Linux

Command Line Arguments

no

Console logs

Traceback (most recent call last):
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/www/wwwroot/ceshi701/EdgeGPT/bbb.py", line 31, in chat
    responses = loop.run_until_complete(get_responses())
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/www/wwwroot/ceshi701/EdgeGPT/bbb.py", line 18, in get_responses
    async for final, response in bot.ask_stream(prompt=question, conversation_style=ConversationStyle.creative):
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/EdgeGPT/EdgeGPT.py", line 185, in ask_stream
    async for response in self.chat_hub.ask_stream(
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/EdgeGPT/chathub.py", line 197, in ask_stream
    raise Exception(
Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.
[2023-07-02 01:31:19,185] ERROR in app: Exception on /chat [POST]
Traceback (most recent call last):
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/www/wwwroot/ceshi701/EdgeGPT/bbb.py", line 31, in chat
    responses = loop.run_until_complete(get_responses())
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/www/wwwroot/ceshi701/EdgeGPT/bbb.py", line 18, in get_responses
    async for final, response in bot.ask_stream(prompt=question, conversation_style=ConversationStyle.creative):
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/EdgeGPT/EdgeGPT.py", line 185, in ask_stream
    async for response in self.chat_hub.ask_stream(
  File "/www/wwwroot/ceshi701/EdgeGPT/7815696ecbf1c96e6894b779456d330e_venv/lib/python3.9/site-packages/EdgeGPT/chathub.py", line 197, in ask_stream
    raise Exception(
Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.

Additional information

ok

a37836323 avatar Jul 01 '23 17:07 a37836323

mee too

kang121209 avatar Jul 02 '23 02:07 kang121209

Same here, when ever i try to create a new conversation it shows this error

Traceback (most recent call last):
  File "p:\Python\J.A.R.V.I.S\Jarvis Using Python\Brain\Qna.py", line 63, in <module>
    name = Qna()
           ^^^^^
  File "p:\Python\J.A.R.V.I.S\Jarvis Using Python\Brain\Qna.py", line 60, in Qna
    app = asyncio.run(Starting_prompt(data))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\vandu\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\vandu\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\vandu\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete        
    return future.result()
           ^^^^^^^^^^^^^^^
  File "p:\Python\J.A.R.V.I.S\Jarvis Using Python\Brain\Qna.py", line 40, in Starting_prompt
    response = await bot1.ask(prompt=prompt, conversation_style=ConversationStyle.creative, simplify_response=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\vandu\AppData\Local\Programs\Python\Python311\Lib\site-packages\EdgeGPT\EdgeGPT.py", line 116, in ask
    async for final, response in self.chat_hub.ask_stream(
  File "C:\Users\vandu\AppData\Local\Programs\Python\Python311\Lib\site-packages\EdgeGPT\chathub.py", line 197, in ask_stream      
    raise Exception(
Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.

Meshwa428 avatar Jul 02 '23 12:07 Meshwa428

I solve this problem by using a proxy

Eikosa avatar Jul 02 '23 13:07 Eikosa

I solve this problem by using a proxy

@Eikosa , hello! Which country did you use as a proxy server location?

adekability avatar Jul 02 '23 21:07 adekability

I solve this problem by using a proxy

@Eikosa , hello! Which country did you use as a proxy server location?

I try with the https://pypi.org/project/free-proxy/ module until I find a suitable https proxy, one of them always works

Eikosa avatar Jul 02 '23 22:07 Eikosa

Is it possible to create a captcha solver, so that we don't have to use a proxy, by the way there is another way to solve this issue. Before running your script you can just go to bing.com/chat and then it will automatically solve the captcha, then you can run your script, and it will work as good as new

Meshwa428 avatar Jul 03 '23 04:07 Meshwa428

What does the captcha look like? Is it arkose/funcaptcha? I haven't triggered it yet so can't fix. If it is indeed arkose/funcaptcha, I got it reversed at https://github.com/acheong08/funcaptcha

acheong08 avatar Jul 03 '23 08:07 acheong08

WechatIMG202 User needs to solve CAPTCHA to continue.

YonQua avatar Jul 04 '23 06:07 YonQua

I'm sorry to say that using a proxy doesn't seem to solve this problem anymore

Eikosa avatar Jul 04 '23 18:07 Eikosa

Many verification codes have been encountered,A headache problem

lovelf avatar Jul 06 '23 01:07 lovelf

Has there been any progress on this issue

DreamMaoMao avatar Jul 08 '23 02:07 DreamMaoMao

also met this problem

plageon avatar Jul 08 '23 13:07 plageon

me too

wangyu1997 avatar Jul 08 '23 13:07 wangyu1997

Me three

mayuqianjg avatar Jul 08 '23 16:07 mayuqianjg

Me four

ProfDrLuigi avatar Jul 09 '23 07:07 ProfDrLuigi

Me five

Qewertyy avatar Jul 09 '23 08:07 Qewertyy

Interesting。。。

wangyu1997 avatar Jul 09 '23 13:07 wangyu1997

Interesting。。。

I want to ask how do you use it? I always got a problem: raise TooManyRedirects( httpx.TooManyRedirects: Exceeded maximum allowed redirects.

DrowskoytayhulGuider avatar Jul 09 '23 15:07 DrowskoytayhulGuider

Interesting。。。

I want to ask how do you use it? I always got a problem: raise TooManyRedirects( httpx.TooManyRedirects: Exceeded maximum allowed redirects.

You can use a us proxy or directly deploy on a us machine

wangyu1997 avatar Jul 09 '23 15:07 wangyu1997

Interesting。。。

I want to ask how do you use it? I always got a problem: raise TooManyRedirects( httpx.TooManyRedirects: Exceeded maximum allowed redirects.

您可以使用美国代理或直接部署在美国计算机上

You mean I need to get a valid US proxy IP and add it in "--proxy" parameter? I have to build a proxy pool?

DrowskoytayhulGuider avatar Jul 09 '23 15:07 DrowskoytayhulGuider

The free-proxy library give proxies but they doesn't worked for me:

from EdgeGPT.EdgeGPT import Chatbot
from fp.fp import FreeProxy

import json, asyncio

async def main():
    proxy = FreeProxy().get()
    cookies = json.load(open("cookies.json"))
    bot = Chatbot.create(cookies=cookies, proxy=proxy)
    response = await bot.ask(prompt="hello")
    print(response)
if __name__ == "__main__":
    asyncio.run(main())

I get SSL Verification failed or Captcha error

nacho00112 avatar Jul 09 '23 15:07 nacho00112

The free-proxy library give proxies but they doesn't worked for me:

from EdgeGPT.EdgeGPT import Chatbot
from fp.fp import FreeProxy

import json, asyncio

async def main():
    proxy = FreeProxy().get()
    cookies = json.load(open("cookies.json"))
    bot = await Chatbot.create(cookies=cookies, proxy=proxy)
    response = bot.ask(prompt="hello")
    print(response)
if __name__ == "__main__":
    asyncio.run(main())

I get SSL Verification failed or Captcha error

use freeproxy with https, it is unlikely, but sometimes it works

Eikosa avatar Jul 09 '23 16:07 Eikosa

The free-proxy library give proxies but they doesn't worked for me:

from EdgeGPT.EdgeGPT import Chatbot
from fp.fp import FreeProxy

import json, asyncio

async def main():
    proxy = FreeProxy().get()
    cookies = json.load(open("cookies.json"))
    bot = await Chatbot.create(cookies=cookies, proxy=proxy)
    response = bot.ask(prompt="hello")
    print(response)
if __name__ == "__main__":
    asyncio.run(main())

I get SSL Verification failed or Captcha error

When I use free proxies, I often get SSL Verification failed, too. And sometimes I also get "all connections failed." and "connectError"

DrowskoytayhulGuider avatar Jul 09 '23 16:07 DrowskoytayhulGuider

I tried many free proxies, but all didn't work.

DrowskoytayhulGuider avatar Jul 09 '23 16:07 DrowskoytayhulGuider

I'm using gpt_academic and I met the same problem. My solution is modified the user-agent and other information showed in this file. You can try the instruction below:

  1. Using the exactly same header as your browser (Mircrosoft edge), including user-agent and browser version informaiton.
  2. Using your code to ask any question (normally you will get the exception as this issue said).
  3. Using your browser to ask any question with new bing (manually solve the captcha).
  4. Free to use your code to ask with new bing.

watashihame avatar Jul 10 '23 02:07 watashihame

I have the same problem.The only temporary fix I can come up with at the moment is to log in and visit new bing via the edge browser, and click the CAPTCHA. This can let my edgeGPT work for one day.

tianlichunhong avatar Jul 11 '23 07:07 tianlichunhong

same i have to do this process before running the script and it lets me use it for 1 day, just open edge browser and then solve the captcha it manualy, and then it lets me do the job done

Meshwa428 avatar Jul 11 '23 12:07 Meshwa428

same i have to do this process before running the script and it lets me use it for 1 day, just open edge browser and then solve the captcha it manualy, and then it lets me do the job done

But when I open the browser no captcha appears

ustedestaaqui avatar Jul 12 '23 06:07 ustedestaaqui

I have the same problem.The only temporary fix I can come up with at the moment is to log in and visit new bing via the edge browser, and click the CAPTCHA. This can let my edgeGPT work for one day.

But when I open the browser no captcha appears

ustedestaaqui avatar Jul 12 '23 06:07 ustedestaaqui

I have the same problem.The only temporary fix I can come up with at the moment is to log in and visit new bing via the edge browser, and click the CAPTCHA. This can let my edgeGPT work for one day.

But when I open the browser no captcha appears

You need to ask a question, then you can see the captcha.

tianlichunhong avatar Jul 12 '23 08:07 tianlichunhong