yoori / flare-bypasser

Server to bypass CloudFlare protection (solve challenges after Oct 2024)
MIT License
29 stars 9 forks source link

Problem with ygg.re challenge solving #17

Open yoori opened 5 hours ago

yoori commented 5 hours ago
          I cloned the repo fresh again, got this again. Note: I'm trying to use this project as a replacement for FlareSolverr, via Jackett.

I ran two tries:

> flare_bypass_server
INFO:     Started server process [28652]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
2024-11-14 17:50:18,807 [nodriver.core.browser] [INFO]: starting
        executable :C:\Program Files\Google\Chrome\Application\chrome.exe

arguments:
--remote-allow-origins=*
        --no-first-run
        --no-service-autorun
        --no-default-browser-check
        --homepage=about:blank
        --no-pings
        --password-store=basic
        --disable-infobars
        --disable-breakpad
        --disable-component-update
        --disable-backgrounding-occluded-windows
        --disable-renderer-backgrounding
        --disable-background-networking
        --disable-dev-shm-usage
        --disable-features=IsolateOrigins,site-per-process
        --disable-session-crashed-bubble
        --disable-search-engine-choice-screen
        --user-data-dir=C:\Users\extre\AppData\Local\Temp\uc_imd0t3_p
        --disable-features=IsolateOrigins,site-per-process
        --disable-session-crashed-bubble
        --headless
        --no-sandbox
        --remote-debugging-host=127.0.0.1
        --remote-debugging-port=53774
2024-11-14 17:50:19,382 [nodriver.core.browser] [INFO]: enabling autodiscover targets
2024-11-14 17:50:19,391 [root] [INFO]: New instance of webdriver has been created to perform the request (proxy=None), timeout=60.0
2024-11-14 17:50:20,083 [root] [INFO]: Screenshot saved to '0_evil_logic'
2024-11-14 17:50:20,294 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:20,632 [root] [INFO]: Screenshot saved to '1_after_challenge_check'
2024-11-14 17:50:20,632 [root] [INFO]: Challenge detected, to solve it
2024-11-14 17:50:20,632 [root] [INFO]: Challenge step #0
2024-11-14 17:50:20,953 [root] [INFO]: Screenshot saved to '2_attempt'
2024-11-14 17:50:21,177 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:22,544 [root] [INFO]: Challenge step #1
2024-11-14 17:50:22,859 [root] [INFO]: Screenshot saved to '3_attempt'
2024-11-14 17:50:23,081 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:24,403 [root] [INFO]: Challenge step #2
2024-11-14 17:50:24,702 [root] [INFO]: Screenshot saved to '4_attempt'
2024-11-14 17:50:24,921 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:26,274 [root] [INFO]: Challenge step #3
2024-11-14 17:50:26,567 [root] [INFO]: Screenshot saved to '5_attempt'
2024-11-14 17:50:26,792 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:28,127 [root] [INFO]: Challenge step #4
2024-11-14 17:50:28,439 [root] [INFO]: Screenshot saved to '6_attempt'
2024-11-14 17:50:28,665 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:30,000 [root] [INFO]: Challenge step #5
2024-11-14 17:50:30,308 [root] [INFO]: Screenshot saved to '7_attempt'
2024-11-14 17:50:30,535 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:31,840 [root] [INFO]: Challenge step #6
2024-11-14 17:50:32,159 [root] [INFO]: Screenshot saved to '8_attempt'
2024-11-14 17:50:32,371 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:33,680 [root] [INFO]: Challenge step #7
2024-11-14 17:50:33,990 [root] [INFO]: Screenshot saved to '9_attempt'
2024-11-14 17:50:34,216 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:35,524 [root] [INFO]: Challenge step #8
2024-11-14 17:50:35,830 [root] [INFO]: Screenshot saved to '10_attempt'
2024-11-14 17:50:36,062 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:37,410 [root] [INFO]: Challenge step #9
2024-11-14 17:50:37,743 [root] [INFO]: Screenshot saved to '11_attempt'
2024-11-14 17:50:37,985 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:39,324 [root] [INFO]: Challenge step #10
2024-11-14 17:50:39,639 [root] [INFO]: Screenshot saved to '12_attempt'
2024-11-14 17:50:39,861 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:41,211 [root] [INFO]: Challenge step #11
2024-11-14 17:50:41,519 [root] [INFO]: Screenshot saved to '13_attempt'
2024-11-14 17:50:41,766 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:43,104 [root] [INFO]: Challenge step #12
2024-11-14 17:50:43,420 [root] [INFO]: Screenshot saved to '14_attempt'
2024-11-14 17:50:43,667 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:45,006 [root] [INFO]: Challenge step #13
2024-11-14 17:50:45,338 [root] [INFO]: Screenshot saved to '15_attempt'
2024-11-14 17:50:45,570 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:46,891 [root] [INFO]: Challenge step #14
2024-11-14 17:50:47,201 [root] [INFO]: Screenshot saved to '16_attempt'
2024-11-14 17:50:47,428 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:48,777 [root] [INFO]: Challenge step #15
2024-11-14 17:50:49,074 [root] [INFO]: Screenshot saved to '17_attempt'
2024-11-14 17:50:49,295 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:50,630 [root] [INFO]: Challenge step #16
2024-11-14 17:50:50,951 [root] [INFO]: Screenshot saved to '18_attempt'
2024-11-14 17:50:51,166 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:52,501 [root] [INFO]: Challenge step #17
2024-11-14 17:50:52,802 [root] [INFO]: Screenshot saved to '19_attempt'
2024-11-14 17:50:53,039 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:54,386 [root] [INFO]: Challenge step #18
2024-11-14 17:50:54,701 [root] [INFO]: Screenshot saved to '20_attempt'
2024-11-14 17:50:54,922 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:56,259 [root] [INFO]: Challenge step #19
2024-11-14 17:50:56,573 [root] [INFO]: Screenshot saved to '21_attempt'
2024-11-14 17:50:56,795 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:50:58,146 [root] [INFO]: Challenge step #20
2024-11-14 17:50:58,452 [root] [INFO]: Screenshot saved to '22_attempt'
2024-11-14 17:50:58,695 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:00,060 [root] [INFO]: Challenge step #21
2024-11-14 17:51:00,377 [root] [INFO]: Screenshot saved to '23_attempt'
2024-11-14 17:51:00,617 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:01,980 [root] [INFO]: Challenge step #22
2024-11-14 17:51:02,294 [root] [INFO]: Screenshot saved to '24_attempt'
2024-11-14 17:51:02,516 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:03,860 [root] [INFO]: Challenge step #23
2024-11-14 17:51:04,176 [root] [INFO]: Screenshot saved to '25_attempt'
2024-11-14 17:51:04,426 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:05,773 [root] [INFO]: Challenge step #24
2024-11-14 17:51:06,089 [root] [INFO]: Screenshot saved to '26_attempt'
2024-11-14 17:51:06,296 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:07,624 [root] [INFO]: Challenge step #25
2024-11-14 17:51:07,929 [root] [INFO]: Screenshot saved to '27_attempt'
2024-11-14 17:51:08,177 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:09,532 [root] [INFO]: Challenge step #26
2024-11-14 17:51:09,852 [root] [INFO]: Screenshot saved to '28_attempt'
2024-11-14 17:51:10,093 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:11,447 [root] [INFO]: Challenge step #27
2024-11-14 17:51:11,756 [root] [INFO]: Screenshot saved to '29_attempt'
2024-11-14 17:51:11,976 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:13,302 [root] [INFO]: Challenge step #28
2024-11-14 17:51:13,621 [root] [INFO]: Screenshot saved to '30_attempt'
2024-11-14 17:51:13,836 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:15,172 [root] [INFO]: Challenge step #29
2024-11-14 17:51:15,470 [root] [INFO]: Screenshot saved to '31_attempt'
2024-11-14 17:51:15,688 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:17,034 [root] [INFO]: Challenge step #30
2024-11-14 17:51:17,343 [root] [INFO]: Screenshot saved to '32_attempt'
2024-11-14 17:51:17,570 [root] [INFO]: Challenge detected. Title found: Just a moment...
2024-11-14 17:51:18,825 [root] [INFO]: Close webdriver
2024-11-14 17:51:18,827 [nodriver.core.browser] [INFO]: terminated browser with pid 7032 successfully
Processing timeout (max_timeout=60.0)
Traceback (most recent call last):
  File "C:\Python312\Lib\asyncio\tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 257, in _resolve_challenge
    return await self._resolve_challenge_impl(req, start_time)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 413, in _resolve_challenge_impl
    await self._challenge_wait_and_click_loop()
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 354, in _challenge_wait_and_click_loop
    await asyncio.sleep(_SHORT_TIMEOUT)
  File "C:\Python312\Lib\asyncio\tasks.py", line 665, in sleep
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 226, in solve
    res = await asyncio.wait_for(self._resolve_challenge(req), req.max_timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "C:\Python312\Lib\asyncio\timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypass_server.py", line 83, in process_solve_request
    solve_response = await solver.solve(solve_request)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 229, in solve
    raise Exception("Processing timeout (max_timeout=" + str(req.max_timeout) + ")")
Exception: Processing timeout (max_timeout=60.0)

INFO:     127.0.0.1:53773 - "POST /v1 HTTP/1.1" 200 OK
2024-11-14 17:51:18,882 [asyncio] [ERROR]: Task exception was never retrieved
future: <Task finished name='Task-20' coro=<Connection.aclose() done, defined at C:\Python312\Lib\site-packages\nodriver\core\connection.py:305> exception=ConnectionClosedError(None, Close(code=1000, reason=''), None)>
Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\nodriver\core\connection.py", line 313, in aclose
    await self.websocket.close()
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 766, in close
    await self.write_close_frame(Close(code, reason))
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 1232, in write_close_frame
    await self.write_frame(True, OP_CLOSE, data, _state=State.CLOSING)
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 1205, in write_frame
    await self.drain()
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 1194, in drain
    await self.ensure_open()
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 935, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1000 (OK); no close frame received
2024-11-14 17:52:45,033 [nodriver.core.browser] [INFO]: starting
        executable :C:\Program Files\Google\Chrome\Application\chrome.exe

arguments:
--remote-allow-origins=*
        --no-first-run
        --no-service-autorun
        --no-default-browser-check
        --homepage=about:blank
        --no-pings
        --password-store=basic
        --disable-infobars
        --disable-breakpad
        --disable-component-update
        --disable-backgrounding-occluded-windows
        --disable-renderer-backgrounding
        --disable-background-networking
        --disable-dev-shm-usage
        --disable-features=IsolateOrigins,site-per-process
        --disable-session-crashed-bubble
        --disable-search-engine-choice-screen
        --user-data-dir=C:\Users\extre\AppData\Local\Temp\uc_lwmerfau
        --disable-features=IsolateOrigins,site-per-process
        --disable-session-crashed-bubble
        --headless
        --no-sandbox
        --remote-debugging-host=127.0.0.1
        --remote-debugging-port=58498
2024-11-14 17:52:45,290 [nodriver.core.browser] [INFO]: enabling autodiscover targets
2024-11-14 17:52:45,294 [root] [INFO]: New instance of webdriver has been created to perform the request (proxy=None), timeout=60.0
2024-11-14 17:53:45,008 [root] [INFO]: Close webdriver
2024-11-14 17:53:45,009 [nodriver.core.browser] [INFO]: terminated browser with pid 31412 successfully
Processing timeout (max_timeout=60.0)
Traceback (most recent call last):
  File "C:\Python312\Lib\asyncio\tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 257, in _resolve_challenge
    return await self._resolve_challenge_impl(req, start_time)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 389, in _resolve_challenge_impl
    await self.save_screenshot('evil_logic')
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 206, in save_screenshot
    await self._driver.save_screenshot(screenshot_file_without_ext + ".png")
  File "C:\Python312\Lib\site-packages\flare_bypasser\browser_wrapper.py", line 153, in save_screenshot
    await self._page.save_screenshot(image_path)
  File "C:\Python312\Lib\site-packages\nodriver\core\tab.py", line 1218, in save_screenshot
    data = await self.send(
           ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\nodriver\core\connection.py", line 434, in send
    return await tx
           ^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 226, in solve
    res = await asyncio.wait_for(self._resolve_challenge(req), req.max_timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "C:\Python312\Lib\asyncio\timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypass_server.py", line 83, in process_solve_request
    solve_response = await solver.solve(solve_request)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flare_bypasser\flare_bypasser.py", line 229, in solve
    raise Exception("Processing timeout (max_timeout=" + str(req.max_timeout) + ")")
Exception: Processing timeout (max_timeout=60.0)

INFO:     127.0.0.1:58495 - "POST /v1 HTTP/1.1" 200 OK
2024-11-14 17:53:45,046 [asyncio] [ERROR]: Task exception was never retrieved
future: <Task finished name='Task-36' coro=<Connection.aclose() done, defined at C:\Python312\Lib\site-packages\nodriver\core\connection.py:305> exception=ConnectionClosedError(None, Close(code=1000, reason=''), None)>
Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\nodriver\core\connection.py", line 313, in aclose
    await self.websocket.close()
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 766, in close
    await self.write_close_frame(Close(code, reason))
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 1232, in write_close_frame
    await self.write_frame(True, OP_CLOSE, data, _state=State.CLOSING)
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 1205, in write_frame
    await self.drain()
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 1194, in drain
    await self.ensure_open()
  File "C:\Python312\Lib\site-packages\websockets\legacy\protocol.py", line 935, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1000 (OK); no close frame received

Originally posted by @LightSeek3r in https://github.com/yoori/flare-bypasser/issues/8#issuecomment-2476953886

yoori commented 5 hours ago

@LightSeek3r can I ask you to reproduce problem with latest version (here much strange moments in output, that confuse me and don't allow to understand version of library, that you use) In latest version I added logging of information, that will simplify debugging of your case. thanks !