Skip to content

radical solution to the shadow root problem#1300

Open
AlexFozor wants to merge 15 commits intoFlareSolverr:masterfrom
AlexFozor:drission-page
Open

radical solution to the shadow root problem#1300
AlexFozor wants to merge 15 commits intoFlareSolverr:masterfrom
AlexFozor:drission-page

Conversation

@AlexFozor
Copy link
Copy Markdown

@AlexFozor AlexFozor commented Jul 29, 2024

I dared to replace selenium with DrissionPage. For me it solves the latest shadow root problem in 100% of tests, better than #1272 with 60% (for me).

I suggest putting this code in a separate branch drission-page and making a docker build.

I have very little experience writing in Python, so don't judge me too harshly. I am open to criticism and suggestions for improving the code.

Important!
If you encounter any errors, please check that you are using the latest image / latest commit of the branch
Along with the error description and logs, please write full information:

  • architecture on which the problems occurred
  • operating system
  • docker / other options
  • site or sites that are causing the error
  • any other information that may help to understand the issue

Latest builds:
alexfozor/flaresolverr:pr-1300 - always latest multi-platform build (amd64, arm64)
alexfozor/flaresolverr:pr-1300-experimental - experimental image with Cloudflare Turnstile transform by browser extension

Community builds with unknown version, check update time:
nexter92/flaresolverr:amd64 - amd64
nexter92/flaresolverr:arm64 - arm64

Thanks:
@TheNexter for the first working docker image

Notes:

  • latest worked chromium version is 126.0.6478.182, 127.0.6533.88 is not working now and hangs on startup.

UPD:

  1. Fixed Status code always 200 // Response headers always empty #1162
  2. Dockerfile update b8639bc
  3. Proxy fixed and can be used for single requests or in the sessions 9970804
  4. DrissionPage updated to latest 4.1.0.0b19 1925055
  5. Experimental Cloudflare Turnstile click from can't baypass cf with drissionpage g1879/DrissionPage#294 in new branch https://github.com/AlexFozor/FlareSolverr/tree/drission-page-experimental. New image for testing: alexfozor/flaresolverr:pr-1300-experimental

@Nodens-
Copy link
Copy Markdown

Nodens- commented Jul 29, 2024

This is seems to be working and with much faster response time.

Chrome / Chromium major version: 126
2024-07-29 20:25:34 INFO     Launching web browser...
2024-07-29 20:25:36 INFO     FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
2024-07-29 20:25:36 INFO     Test successful!
2024-07-29 20:25:36 INFO     Serving on http://127.0.0.1:8191
2024-07-29 20:25:47 INFO     Incoming request => POST /v1 body: {'maxTimeout': 60000, 'cmd': 'request.get', 'url': 'https://idope.se/browse.html', 'proxy': {}}
2024-07-29 20:26:12 INFO     Challenge detected.
2024-07-29 20:26:16 INFO     Challenge solved!
2024-07-29 20:26:17 INFO     Response in 30.229 s
2024-07-29 20:26:17 INFO     127.0.0.1 POST http://localhost:8191/v1 200 OK

@JMuller88
Copy link
Copy Markdown

It's working with YGG

How to do with docker image :
Clone repo :

git clone https://github.com/FlareSolverr/FlareSolverr.git
cd FlareSolverr
git fetch origin pull/1300/head:pr-1300
git checkout pr-1300

Build image :
docker build -t flaresolverr:pr-1300 .

Update docker compose file :

services:
  flaresolverr:
    image: flaresolverr:pr-1300

@TheNexter
Copy link
Copy Markdown

TheNexter commented Jul 29, 2024

Prebuild image in AMD64 :
nexter92/flaresolverr:amd64

Prebuild image in ARM64 :
nexter92/flaresolverr:arm64

image

@ilike2burnthing ilike2burnthing mentioned this pull request Jul 29, 2024
@ilike2burnthing

This comment was marked as outdated.

@tifo71

This comment was marked as duplicate.

@tifo71

This comment was marked as outdated.

@TheNexter

This comment was marked as outdated.

@tifo71

This comment was marked as duplicate.

@superop78
Copy link
Copy Markdown

nexter92/flaresolverr:amd64

Yes your image work perfectly. A big thanks @TheNexter

Hello,

For me is not good :

Launching web browser...
2024-07-29 22:36:24 DEBUG ReqId 140070279812864 New instance of webdriver has been created to perform the request
2024-07-29 22:36:24 DEBUG ReqId 140069729978112 Navigating to... https://www.ygg.re/engine/search?do=search&order=desc&sort=publish_date&category=all
2024-07-29 22:36:26 DEBUG ReqId 140070279812864 A used instance of webdriver has been destroyed
2024-07-29 22:36:26 ERROR ReqId 140070279812864 Error: Error solving the challenge. 'ChromiumPage' object has no attribute 'page_source'
2024-07-29 22:36:26 DEBUG ReqId 140070279812864 Response => POST /v1 body: {'status': 'error', 'message': "Error: Error solving the challenge. 'ChromiumPage' object has no attribute 'page_source'", 'startTimestamp': 1722285384197, 'endTimestamp': 1722285386695, 'version': '3.3.21'}
2024-07-29 22:36:26 INFO ReqId 140070279812864 Response in 2.498 s

@TheNexter
Copy link
Copy Markdown

nexter92/flaresolverr:amd64

Yes your image work perfectly. A big thanks @TheNexter

Hello,

For me is not good :

Launching web browser... 2024-07-29 22:36:24 DEBUG ReqId 140070279812864 New instance of webdriver has been created to perform the request 2024-07-29 22:36:24 DEBUG ReqId 140069729978112 Navigating to... https://www.ygg.re/engine/search?do=search&order=desc&sort=publish_date&category=all 2024-07-29 22:36:26 DEBUG ReqId 140070279812864 A used instance of webdriver has been destroyed 2024-07-29 22:36:26 ERROR ReqId 140070279812864 Error: Error solving the challenge. 'ChromiumPage' object has no attribute 'page_source' 2024-07-29 22:36:26 DEBUG ReqId 140070279812864 Response => POST /v1 body: {'status': 'error', 'message': "Error: Error solving the challenge. 'ChromiumPage' object has no attribute 'page_source'", 'startTimestamp': 1722285384197, 'endTimestamp': 1722285386695, 'version': '3.3.21'} 2024-07-29 22:36:26 INFO ReqId 140070279812864 Response in 2.498 s

AMD or ARM ? I have try only my ARM build to be honest

@tifo71
Copy link
Copy Markdown

tifo71 commented Jul 29, 2024

@TheNexter the AMD64 image work perfectly too. I use this one

@superop78

This comment was marked as duplicate.

@ppfeister
Copy link
Copy Markdown

One note:

DrissionPage seems to be Chinese. Aside from the international relations concerns that some people may have, leading some users to be hesitant to integrate FS into their workflows, most of the development for FlareSolverr is in English. Do we want to introduce a major dependency that's (about half) written in another language?

For instance, one of the docstrings for a Drission function:

        """调用获取元素的方法
        :param locator: 定位符
        :param timeout: 超时时间(秒)
        :param index: 获取第几个,从1开始,可传入负数获取倒数第几个
        :param raise_err: 找不到时是否抛出异常
        :param method: 调用的方法名
        :return: 元素对象或它们组成的列表
        """

The param names are understandable because that's just how Python is written, but will the average contributor have any idea what these take? Timeout is obvious, but what's the method param? What does this function return?

We could translate as needed, but that's less than ideal

Just raising this to see how other people feel about the inclusion of other languages. It certainly complicates things as you get further down the line and need to work on bug fixes, patches, etc.

@LorisFriedel

This comment was marked as duplicate.

@AlexFozor
Copy link
Copy Markdown
Author

One note:

DrissionPage seems to be Chinese. Aside from the international relations concerns that some people may have, leading some users to be hesitant to integrate FS into their workflows, most of the development for FlareSolverr is in English. Do we want to introduce a major dependency that's (about half) written in another language?

For instance, one of the docstrings for a Drission function:

        """调用获取元素的方法
        :param locator: 定位符
        :param timeout: 超时时间(秒)
        :param index: 获取第几个,从1开始,可传入负数获取倒数第几个
        :param raise_err: 找不到时是否抛出异常
        :param method: 调用的方法名
        :return: 元素对象或它们组成的列表
        """

The param names are understandable because that's just how Python is written, but will the average contributor have any idea what these take? Timeout is obvious, but what's the method param? What does this function return?

We could translate as needed, but that's less than ideal

Just raising this to see how other people feel about the inclusion of other languages. It certainly complicates things as you get further down the line and need to work on bug fixes, patches, etc.

That's exactly it, I agree.
But between the unstable working of other branches and the Chinese language, I chose the second.

The author of drissionpage has a separate website with documentation. Machine translation is not so bad now, it was enough to create this working version.
Chinese in the logs? Yes, this sometimes happens, but here machine translation and searching for a string of logs in the source code with further translation also helps.

@sjn4048

This comment was marked as duplicate.

@tatooye

This comment was marked as duplicate.

@MCG-pok

This comment was marked as duplicate.

@Nodens-

This comment was marked as duplicate.

@AlexFozor

This comment was marked as duplicate.

@ppfeister

This comment was marked as off-topic.

@ppfeister
Copy link
Copy Markdown

ppfeister commented Jul 30, 2024

Getting this thread back on track, @AlexFozor do you have any idea if this project supports the return of status codes and response headers? There's an open issue #1162 relating to this, due to Selenium's refusal to add support. Bringing proper status code and response header support back to FlareSolverr would open up the door for its inclusion in quite a few more workflows

There are several that I work on myself that would see a huge benefit from FlareSolverr, but rely on returned status codes rather than text, so they haven't been able to benefit yet.

@AlexFozor
Copy link
Copy Markdown
Author

I have already implemented this, and according to my tests it works as it should. There is a risk of getting a timeout when waiting for http responses, then the header and response code will not be transmitted correctly, but I have not encountered any problems in my tests.

Waiting for a response now occurs with a timeout of 5 seconds, it is possible to make it longer.

@Nodens-

This comment was marked as off-topic.

@ppfeister

This comment was marked as off-topic.

@ChristophorusReyhan
Copy link
Copy Markdown

Doesn't work for me

flaresolverr  | 2024-11-25 09:14:27 INFO     FlareSolverr 3.3.21
flaresolverr  | 2024-11-25 09:14:27 INFO     Testing web browser installation...
flaresolverr  | 2024-11-25 09:14:27 INFO     Platform: Linux-6.8.12-3-pve-x86_64-with-glibc2.40
flaresolverr  | 2024-11-25 09:14:27 INFO     Chrome / Chromium path: /bin/chromium
flaresolverr  | 2024-11-25 09:14:31 INFO     Chrome / Chromium major version: 130
flaresolverr  | 2024-11-25 09:14:31 INFO     Launching web browser...
flaresolverr  | Traceback (most recent call last):
flaresolverr  |   File "/app/utils.py", line 351, in get_user_agent
flaresolverr  |     driver = get_webdriver(user_data_path=user_path)
flaresolverr  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr  |   File "/app/utils.py", line 205, in get_webdriver
flaresolverr  |     driver = ChromiumPage(addr_or_opts=options)
flaresolverr  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr  |   File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_pages/chromium_page.py", line 50, in __init__
flaresolverr  |     super().__init__(self.browser, tab_id)
flaresolverr  |   File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_pages/chromium_base.py", line 73, in __init__
flaresolverr  |     self._connect_browser(target_id)
flaresolverr  |   File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_pages/chromium_base.py", line 106, in _connect_browser
flaresolverr  |     self._driver_init(target_id)
flaresolverr  |   File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_pages/chromium_base.py", line 127, in _driver_init
flaresolverr  |     r = self._run_cdp('Page.getFrameTree')
flaresolverr  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr  |   File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_pages/chromium_base.py", line 445, in _run_cdp
flaresolverr  |     return r if __ERROR__ not in r else raise_error(r, ignore)
flaresolverr  |                                         ^^^^^^^^^^^^^^^^^^^^^^
flaresolverr  |   File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_functions/tools.py", line 250, in raise_error
flaresolverr  |     raise r
flaresolverr  | TimeoutError: 
flaresolverr  | 错误:timeout
flaresolverr  | 方法:Page.getFrameTree
flaresolverr  | 参数:{'_timeout': 30}
flaresolverr  | 版本:4.1.0.0b19
flaresolverr  | 超时,可能是浏览器卡了。
flaresolverr  | 
flaresolverr  | During handling of the above exception, another exception occurred:
flaresolverr  | 
flaresolverr  | Traceback (most recent call last):
flaresolverr  |   File "/app/flaresolverr.py", line 108, in <module>
flaresolverr  |     flaresolverr_service.test_browser_installation()
flaresolverr  |   File "/app/flaresolverr_service.py", line 68, in test_browser_installation
flaresolverr  |     user_agent = utils.get_user_agent()
flaresolverr  |                  ^^^^^^^^^^^^^^^^^^^^^^
flaresolverr  |   File "/app/utils.py", line 357, in get_user_agent
flaresolverr  |     raise Exception("Error getting browser User-Agent. " + str(e))
flaresolverr  | Exception: Error getting browser User-Agent. 
flaresolverr  | 错误:timeout
flaresolverr  | 方法:Page.getFrameTree
flaresolverr  | 参数:{'_timeout': 30}
flaresolverr  | 版本:4.1.0.0b19
flaresolverr  | 超时,可能是浏览器卡了。
flaresolverr exited with code 0
flaresolverr  | 2024-11-25 09:16:41 INFO     FlareSolverr 3.3.21
flaresolverr  | 2024-11-25 09:16:41 INFO     Testing web browser installation...
flaresolverr  | 2024-11-25 09:16:41 INFO     Platform: Linux-6.8.12-3-pve-x86_64-with-glibc2.40
flaresolverr  | 2024-11-25 09:16:41 INFO     Chrome / Chromium path: /usr/bin/chromium
flaresolverr  | 2024-11-25 09:16:41 INFO     Chrome / Chromium major version: 130
flaresolverr  | 2024-11-25 09:16:41 INFO     Launching web browser...
^CGracefully stopping... (press Ctrl+C again to force)
[+] Stopping 1/1
 ✔ Container flaresolverr  Stopped                                                           0.5s 
canceled
$ cat docker-compose.yml 
---
version: "2.1"
services:
  flaresolverr:
    # DockerHub mirror flaresolverr/flaresolverr:latest
    image: flaresolverr:pr-1300
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=Asia/Bangkok
    ports:
      - "${PORT:-8191}:8191"
    restart: unless-stopped

@almottier
Copy link
Copy Markdown

@ChristophorusReyhan I had the same issue before disabling ipv6.

@ChristophorusReyhan
Copy link
Copy Markdown

@ChristophorusReyhan I had the same issue before disabling ipv6.

I've disabled ipv6 via sysctl, I don't think that's it?

tail -n3 /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1

or am i missing something?

@ChristophorusReyhan
Copy link
Copy Markdown

ChristophorusReyhan commented Dec 4, 2024

i think this same issue g1879/DrissionPage#365 (comment)

in this issue g1879/DrissionPage#242, the dev said it's because it's too old, but i don't think so because i already updated everything

@Xav-Pe
Copy link
Copy Markdown

Xav-Pe commented Dec 5, 2024

Still not working here, with ipv6 disabled, with or without DRIVER=nodriver

flaresolverr  | 2024-12-05 11:44:34 INFO     FlareSolverr 3.3.21
flaresolverr  | 2024-12-05 11:44:34 INFO     Testing web browser installation...
flaresolverr  | 2024-12-05 11:44:34 INFO     Platform: Linux-6.1.0-28-amd64-x86_64-with-glibc2.39
flaresolverr  | 2024-12-05 11:44:34 INFO     Chrome / Chromium path: /bin/chromium
flaresolverr  | 2024-12-05 11:44:34 INFO     Chrome / Chromium major version: 126
flaresolverr  | 2024-12-05 11:44:34 INFO     Launching web browser...
flaresolverr  | 2024-12-05 11:44:38 INFO     FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
flaresolverr  | 2024-12-05 11:44:38 INFO     Test successful!
flaresolverr  | 2024-12-05 11:44:38 INFO     Serving on http://0.0.0.0:8191

flaresolverr  | 2024-12-05 11:44:44 INFO     Incoming request => POST /v1 body: {'maxTimeout': 180000, 'cmd': 'request.get', 'url': 'https://www.ygg.re/engine/search?category=all&do=search&order=desc&sort=publish_date', 'proxy': {}}
flaresolverr  | 2024-12-05 11:44:47 INFO     Challenge detected.
flaresolverr  | 2024-12-05 11:47:46 ERROR    Error: Error solving the challenge. Timeout after 180.0 seconds.
flaresolverr  | 2024-12-05 11:47:46 INFO     Response in 182.56 s
flaresolverr  | 2024-12-05 11:47:46 INFO     172.20.0.5 POST http://flaresolverr:8191/v1 500 Internal Server Error
  flaresolverr:
    image: alexfozor/flaresolverr:pr-1300
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=Europe/Paris
      - DRIVER=nodriver # same with or without this line
      - PGID=1000
      - PUID=1000

@tifo71
Copy link
Copy Markdown

tifo71 commented Dec 5, 2024

Still not working here, with ipv6 disabled, with or without DRIVER=nodriver

flaresolverr  | 2024-12-05 11:44:34 INFO     FlareSolverr 3.3.21
flaresolverr  | 2024-12-05 11:44:34 INFO     Testing web browser installation...
flaresolverr  | 2024-12-05 11:44:34 INFO     Platform: Linux-6.1.0-28-amd64-x86_64-with-glibc2.39
flaresolverr  | 2024-12-05 11:44:34 INFO     Chrome / Chromium path: /bin/chromium
flaresolverr  | 2024-12-05 11:44:34 INFO     Chrome / Chromium major version: 126
flaresolverr  | 2024-12-05 11:44:34 INFO     Launching web browser...
flaresolverr  | 2024-12-05 11:44:38 INFO     FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
flaresolverr  | 2024-12-05 11:44:38 INFO     Test successful!
flaresolverr  | 2024-12-05 11:44:38 INFO     Serving on http://0.0.0.0:8191

flaresolverr  | 2024-12-05 11:44:44 INFO     Incoming request => POST /v1 body: {'maxTimeout': 180000, 'cmd': 'request.get', 'url': 'https://www.ygg.re/engine/search?category=all&do=search&order=desc&sort=publish_date', 'proxy': {}}
flaresolverr  | 2024-12-05 11:44:47 INFO     Challenge detected.
flaresolverr  | 2024-12-05 11:47:46 ERROR    Error: Error solving the challenge. Timeout after 180.0 seconds.
flaresolverr  | 2024-12-05 11:47:46 INFO     Response in 182.56 s
flaresolverr  | 2024-12-05 11:47:46 INFO     172.20.0.5 POST http://flaresolverr:8191/v1 500 Internal Server Error
  flaresolverr:
    image: alexfozor/flaresolverr:pr-1300
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=Europe/Paris
      - DRIVER=nodriver # same with or without this line
      - PGID=1000
      - PUID=1000

Use this version : 21hsmw/flaresolverr:nodrivertest with environnement DRIVER : nodriver

@Xav-Pe

This comment was marked as duplicate.

@tifo71

This comment was marked as duplicate.

@ChristophorusReyhan
Copy link
Copy Markdown

ChristophorusReyhan commented Dec 5, 2024

Still not working here, with ipv6 disabled, with or without DRIVER=nodriver

flaresolverr  | 2024-12-05 11:44:34 INFO     FlareSolverr 3.3.21
flaresolverr  | 2024-12-05 11:44:34 INFO     Testing web browser installation...
flaresolverr  | 2024-12-05 11:44:34 INFO     Platform: Linux-6.1.0-28-amd64-x86_64-with-glibc2.39
flaresolverr  | 2024-12-05 11:44:34 INFO     Chrome / Chromium path: /bin/chromium
flaresolverr  | 2024-12-05 11:44:34 INFO     Chrome / Chromium major version: 126
flaresolverr  | 2024-12-05 11:44:34 INFO     Launching web browser...
flaresolverr  | 2024-12-05 11:44:38 INFO     FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
flaresolverr  | 2024-12-05 11:44:38 INFO     Test successful!
flaresolverr  | 2024-12-05 11:44:38 INFO     Serving on http://0.0.0.0:8191

flaresolverr  | 2024-12-05 11:44:44 INFO     Incoming request => POST /v1 body: {'maxTimeout': 180000, 'cmd': 'request.get', 'url': 'https://www.ygg.re/engine/search?category=all&do=search&order=desc&sort=publish_date', 'proxy': {}}
flaresolverr  | 2024-12-05 11:44:47 INFO     Challenge detected.
flaresolverr  | 2024-12-05 11:47:46 ERROR    Error: Error solving the challenge. Timeout after 180.0 seconds.
flaresolverr  | 2024-12-05 11:47:46 INFO     Response in 182.56 s
flaresolverr  | 2024-12-05 11:47:46 INFO     172.20.0.5 POST http://flaresolverr:8191/v1 500 Internal Server Error
  flaresolverr:
    image: alexfozor/flaresolverr:pr-1300
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=Europe/Paris
      - DRIVER=nodriver # same with or without this line
      - PGID=1000
      - PUID=1000

Use this version : 21hsmw/flaresolverr:nodrivertest with environnement DRIVER : nodriver

Okay, this works but I cant seem to reach the site from prowlarr?

2024-12-05 13:45:13.8|Warn|Cardigann|Request for *redacted* failed with exception 'HTTP request failed: [500:InternalServerError] [POST] at [http://192.168.1.112:8191/v1]'. Retrying in 2.086269s.
2024-12-05 13:46:18.1|Warn|Cardigann|Request for *redacted* failed with exception 'HTTP request failed: [500:InternalServerError] [POST] at [http://192.168.1.112:8191/v1]'. Retrying in 1.6256601s.

@Xav-Pe
Copy link
Copy Markdown

Xav-Pe commented Dec 5, 2024

Okay, this works but I cant seem to reach the site from prowlarr?

This image and the compose I posted works from prowlarr for me. Your error must be elsewhere.

  flaresolverr:
    image: 21hsmw/flaresolverr:nodrivertest
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=Europe/Paris
      - DRIVER=nodriver
      - PGID=1000
      - PUID=1000
    networks:
      - internal

@ChristophorusReyhan

This comment was marked as duplicate.

@Dysta
Copy link
Copy Markdown

Dysta commented Jan 3, 2025

Hello, it seem that the proposed solution now fail since some days and this message appear on my logs
2025-01-03 21:09:28 DEBUG ReqId 140686821160640 Cloudflare verify checkbox not found on the page. ElementNotFoundError(None, 'ele()', {'locator': '@name=cf-turnstile-response', 'index': 1})

I use the alexfozor/flaresolverr:pr-1300-experimental image on my side

@meGAmeS1
Copy link
Copy Markdown

meGAmeS1 commented Jan 3, 2025

I was also using alexfozor/flaresolverr:pr-1300-experimental and it started to fail since today. I'll try other solutions and will come back to this thread if I find anything working

@bvergnaud

This comment was marked as duplicate.

@LECOQQ

This comment was marked as duplicate.

@FlareSolverr FlareSolverr deleted a comment from LECOQQ Jan 31, 2025
@Asgard70
Copy link
Copy Markdown

Asgard70 commented Feb 22, 2025

(YGG) Since yesterday, FlareSolverr using the Docker image 21hsmw/flaresolverr:nodrivertest has stopped solving challenges. Below are the logs showing the issue:

yaml
Copier
2025-02-22 08:52:18 INFO Challenge detected. Title found: Just a moment...
2025-02-22 08:52:59 INFO Incoming request => POST /v1 body: {'maxTimeout': 60000, 'cmd': 'request.get', 'url': 'https://prowlarr.servarr.com/v1/ping', 'proxy': {}}
2025-02-22 08:53:01 INFO Challenge not detected!
2025-02-22 08:53:01 INFO Response in 1.88 s
2025-02-22 08:53:01 INFO 192.168.0.253 POST http://192.168.0.248:8191/v1 200 OK
2025-02-22 08:53:17 ERROR Error: Error solving the challenge. Timeout after 60.0 seconds.
2025-02-22 08:53:17 INFO Response in 60.373 s
2025-02-22 08:53:17 INFO 192.168.0.253 POST http://192.168.0.248:8191/v1 500 Internal Server Error
From the logs, it seems like FlareSolverr detects the challenge but fails to solve it, resulting in a timeout and internal server error after 60 seconds. This started happening on 2025-02-22.

Has anyone experienced a similar issue or have suggestions for troubleshooting?

@tifo71
Copy link
Copy Markdown

tifo71 commented Feb 22, 2025

(YGG) Since yesterday, FlareSolverr using the Docker image 21hsmw/flaresolverr:nodrivertest has stopped solving challenges. Below are the logs showing the issue:

yaml Copier 2025-02-22 08:52:18 INFO Challenge detected. Title found: Just a moment... 2025-02-22 08:52:59 INFO Incoming request => POST /v1 body: {'maxTimeout': 60000, 'cmd': 'request.get', 'url': 'https://prowlarr.servarr.com/v1/ping', 'proxy': {}} 2025-02-22 08:53:01 INFO Challenge not detected! 2025-02-22 08:53:01 INFO Response in 1.88 s 2025-02-22 08:53:01 INFO 192.168.0.253 POST http://192.168.0.248:8191/v1 200 OK 2025-02-22 08:53:17 ERROR Error: Error solving the challenge. Timeout after 60.0 seconds. 2025-02-22 08:53:17 INFO Response in 60.373 s 2025-02-22 08:53:17 INFO 192.168.0.253 POST http://192.168.0.248:8191/v1 500 Internal Server Error From the logs, it seems like FlareSolverr detects the challenge but fails to solve it, resulting in a timeout and internal server error after 60 seconds. This started happening on 2025-02-22.

Has anyone experienced a similar issue or have suggestions for troubleshooting?

Try with this image it work : alexfozor/flaresolverr:pr-1300-experimental. But yes Flaresolverr 21hsmw version don't work at this moment. I think he'll do an update soon.

@james2001
Copy link
Copy Markdown

I activate the DEBUG LEVEL to have more information

2025-02-25 14:29:27 INFO     ReqId 139958547375808 Challenge solved!
2025-02-25 14:29:28 DEBUG    ReqId 139958905087680 A used instance of webdriver has been destroyed
2025-02-25 14:29:28 INFO     ReqId 139958905087680 Response in 39.526 s
2025-02-25 14:29:28 INFO     ReqId 139958905087680 172.29.0.4 POST http://192.168.1.3:8191/v1 200 OK
2025-02-25 14:29:33 INFO     ReqId 139958913480384 Incoming request => POST /v1 body: {'maxTimeout': 120000, 'cmd': 'request.get', 'url': 'https://www.ygg.re/auth/login', 'proxy': {}}
2025-02-25 14:29:33 DEBUG    ReqId 139958913480384 Launching web browser...
2025-02-25 14:29:38 DEBUG    ReqId 139958913480384 New instance of webdriver has been created to perform the request
2025-02-25 14:29:38 DEBUG    ReqId 139958947051200 Navigating to... https://www.ygg.re/auth/login
2025-02-25 14:29:42 DEBUG    ReqId 139958947051200 Challenge detected. Title found: just a moment...
2025-02-25 14:29:42 INFO     ReqId 139958947051200 Challenge detected.
2025-02-25 14:29:43 DEBUG    ReqId 139958947051200 Cloudflare verify checkbox not found on the page. AttributeError("'NoneType' object has no attribute 'ele'")
2025-02-25 14:29:43 DEBUG    ReqId 139958947051200 Challenge detected. Title found: just a moment...
2025-02-25 14:29:44 DEBUG    ReqId 139958947051200 Cloudflare verify checkbox not found on the page. ContextLostError()
2025-02-25 14:29:44 DEBUG    ReqId 139958947051200 Challenge detected. Title found: just a moment...
2025-02-25 14:29:56 DEBUG    ReqId 139958947051200 Cloudflare verify checkbox not found on the page. ElementNotFoundError(None, 'ele()', {'locator': 'tag:input', 'index': 1})
2025-02-25 14:29:56 DEBUG    ReqId 139958947051200 Challenge detected. Title found: just a moment...
Exception in thread Thread-141 (_handle_event_loop):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_base/driver.py", line 157, in _handle_event_loop
    function(**event['params'])
  File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_pages/chromium_base.py", line 188, in _onFrameStartedLoading
    if kwargs['frameId'] == self._frame_id:
                            ^^^^^^^^^^^^^^
AttributeError: 'ChromiumFrame' object has no attribute '_frame_id'. Did you mean: '_frame_ele'?
Exception in thread Thread-167 (_handle_immediate_event_loop):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_base/driver.py", line 165, in _handle_immediate_event_loop
    function(**kwargs)
  File "/usr/local/lib/python3.12/dist-packages/DrissionPage/_pages/chromium_frame.py", line 198, in _onFrameDetached
    if kwargs['frameId'] == self._frame_id:
                            ^^^^^^^^^^^^^^
AttributeError: 'ChromiumFrame' object has no attribute '_frame_id'. Did you mean: '_frame_ele'?
2025-02-25 14:30:06 INFO     ReqId 139958947051200 Challenge solved!
2025-02-25 14:30:07 DEBUG    ReqId 139958913480384 A used instance of webdriver has been destroyed
2025-02-25 14:30:07 INFO     ReqId 139958913480384 Response in 34.508 s
2025-02-25 14:30:07 INFO     ReqId 139958913480384 172.29.0.4 POST http://192.168.1.3:8191/v1 200 OK

@luxifer

This comment was marked as duplicate.

@james2001

This comment was marked as duplicate.

@LightSeek3r

This comment was marked as duplicate.

@buonhobo

This comment was marked as duplicate.

@bastien70
Copy link
Copy Markdown

Hello, seems this doesn't work anymore?

@navels

This comment was marked as off-topic.

@ilike2burnthing

This comment was marked as off-topic.

@Samega7Cattac
Copy link
Copy Markdown

@ilike2burnthing I spend half a day reading a bunch of issues, commits, etc. Trying this and finding out it was not maintained, trying that, etc.
Making a Discussion would centralize the information.
There is already several issues and PRs talking about this.

Btw alexfozor/flaresolverr:pr-1300-experimental worked for me for 5 requests, after that it always fails.
Is there anything dynamic happening?

@ilike2burnthing
Copy link
Copy Markdown
Contributor

v3.3.22 - Windows and Linux binaries available, as is an updated flaresolverr/flaresolverr Docker image.

If it's working, only react to this comment, DO NOT leave your own comment.

If it's not working, see this Discussion - #1501

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

Successfully merging this pull request may close these issues.

Status code always 200 // Response headers always empty