nsapa / fanfictionnet_ff_proxy

fanfictionnet_ff_proxy: an experimental "proxy" for fanfiction.net piloted by FanFicFare

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't this work with flatpak ungoogled chromium?

Cardboardgundam opened this issue · comments

Running python3 ./chrome_content.py results with this:

2021-07-25 15:51:04.276 CEST INFO root fanfictionnet_ff_proxy version 0.4 by Nicolas SAPA nico@byme.at
2021-07-25 15:51:04.276 CEST INFO root This Alpha software is licensed under CECILL-2.1
2021-07-25 15:51:04.280 CEST INFO root Running on Linux-5.11.0-25-generic-x86_64-with-glibc2.33
2021-07-25 15:51:04.342 CEST INFO undetected_chromedriver Selenium patched. Safe to import Chrome / ChromeOptions
2021-07-25 15:51:04.464 CEST INFO undetected_chromedriver Selenium patched. Safe to import Chrome / ChromeOptions
2021-07-25 15:51:05.483 CEST ERROR prepare_Chrome Failed to initialize Chrome: Message: unknown error: cannot find Chrome binary

With that kind of error I tried it with the path option

python3 ./chrome_content.py --chrome-path /var/lib/flatpak/app/com.github.Eloston.UngoogledChromium/
This got me

2021-07-25 16:09:59.756 CEST INFO root fanfictionnet_ff_proxy version 0.4 by Nicolas SAPA nico@byme.at
2021-07-25 16:09:59.756 CEST INFO root This Alpha software is licensed under CECILL-2.1
2021-07-25 16:09:59.760 CEST INFO root Running on Linux-5.11.0-25-generic-x86_64-with-glibc2.33
2021-07-25 16:09:59.820 CEST INFO undetected_chromedriver Selenium patched. Safe to import Chrome / ChromeOptions
2021-07-25 16:09:59.948 CEST INFO undetected_chromedriver Selenium patched. Safe to import Chrome / ChromeOptions
2021-07-25 16:10:01.018 CEST ERROR prepare_Chrome Failed to initialize Chrome: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /var/lib/flatpak/app/com.github.Eloston.UngoogledChromium/ is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

2021-07-25 16:10:01.019 CEST ERROR root Initializing Chrome failed, exiting

Now what?

I am not sure I want to explore the rabbit hole that's flatpak.
I added today Docker support so you could try that instead.

Well, make run gives me this:

fanfictionnet_ff_proxy@kusansky (master)$ make run
docker build -t fanfiction_ff_proxy .
Sending build context to Docker daemon  650.2kB
Step 1/33 : FROM debian:10.10
 ---> 0980b84bde89
Step 2/33 : ENV HOME /opt/proxy
 ---> Using cache
 ---> 6bb954af1d57
Step 3/33 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> f8203fca0f59
Step 4/33 : ENV LC_ALL C.UTF-8
 ---> Using cache
 ---> a7a8223323b5
Step 5/33 : ENV LANG en_US.UTF-8
 ---> Using cache
 ---> ddce2dbda22c
Step 6/33 : ENV LANGUAGE en_US.UTF-8
 ---> Using cache
 ---> c7121480bc7c
Step 7/33 : RUN adduser --disabled-password --gecos "proxy user" proxy_user
 ---> Using cache
 ---> 86248d83d609
Step 8/33 : RUN adduser --disabled-password --gecos "gui user" gui_user
 ---> Using cache
 ---> 228fa29af09c
Step 9/33 : RUN mkdir -p /opt/proxy/code /opt/proxy/workdir
 ---> Using cache
 ---> f441849d8081
Step 10/33 : RUN chown proxy_user /opt/proxy/workdir
 ---> Using cache
 ---> 3efc5471192d
Step 11/33 : WORKDIR /opt/proxy/workdir
 ---> Using cache
 ---> a02043b6da21
Step 12/33 : RUN apt-get update
 ---> Using cache
 ---> 891742f013f5
Step 13/33 : RUN apt-get -y full-upgrade
 ---> Using cache
 ---> f8e1a48e2174
Step 14/33 : RUN apt-get -y install xserver-xorg-video-dummy x11vnc xdotool wget tar supervisor net-tools fluxbox gnupg2 python3-numpy x11-xserver-utils python3-pip procps curl x11vnc
 ---> Using cache
 ---> 235bc624138b
Step 15/33 : RUN echo 'deb http://download.opensuse.org/repositories/home:/ungoogled_chromium/Debian_Buster/ /' | tee /etc/apt/sources.list.d/home-ungoogled_chromium.list
 ---> Using cache
 ---> fa6933f7a389
Step 16/33 : RUN curl 'https://download.opensuse.org/repositories/home:/ungoogled_chromium/Debian_Buster/Release.key' | gpg --dearmor | tee /etc/apt/trusted.gpg.d/home-ungoogled_chromium.gpg > /dev/null
 ---> Using cache
 ---> d49996fd72c6
Step 17/33 : RUN apt-get update
 ---> Using cache
 ---> 7397b6de599d
Step 18/33 : RUN apt-get -y install ungoogled-chromium
 ---> Using cache
 ---> 9dc44371b0d5
Step 19/33 : ADD requirements.txt .
 ---> Using cache
 ---> 2a80960fdfaf
Step 20/33 : RUN su proxy_user -c "python3 -m pip install --user -U pip"
 ---> Using cache
 ---> bf06e2ebbaeb
Step 21/33 : RUN su proxy_user -c "python3 -m pip install --user -r requirements.txt"
 ---> Using cache
 ---> 09fdc3232de6
Step 22/33 : RUN wget -O - -nv https://github.com/novnc/noVNC/archive/refs/tags/v1.2.0.tar.gz | tar -xz -C /opt/proxy/workdir/ && mv /opt/proxy/workdir/noVNC-1.2.0 /opt/proxy/code/novnc && ln -s /opt/proxy/code/novnc/vnc_lite.html /opt/proxy/code/novnc/index.html
 ---> Using cache
 ---> 74e28aa13610
Step 23/33 : RUN wget -O - -nv https://github.com/novnc/websockify/archive/refs/tags/v0.10.0.tar.gz | tar -xz -C /opt/proxy/workdir/ && mv /opt/proxy/workdir/websockify-0.10.0 /opt/proxy/code/novnc/utils/websockify
 ---> Using cache
 ---> 7e0936b8bece
Step 24/33 : WORKDIR /tmp
 ---> Using cache
 ---> 56ccefa57e65
Step 25/33 : RUN rm -rf /opt/proxy/workdir
 ---> Using cache
 ---> 6bc795aacafc
Step 26/33 : RUN apt-get clean
 ---> Using cache
 ---> eb01128349cf
Step 27/33 : ADD docker_files/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
 ---> Using cache
 ---> ff9dfdae285a
Step 28/33 : ADD docker_files/xorg.conf /opt/proxy/code/xorg.conf
 ---> Using cache
 ---> a953543c40d9
Step 29/33 : ADD chrome_content.py /opt/proxy/code/chrome_content.py
 ---> Using cache
 ---> cdd6c149c657
Step 30/33 : EXPOSE 8888
 ---> Using cache
 ---> 245ba1cb32da
Step 31/33 : EXPOSE 8080
 ---> Using cache
 ---> 70dc59dd30e1
Step 32/33 : ENV DISPLAY :0
 ---> Using cache
 ---> cea43af1ec99
Step 33/33 : CMD ["/usr/bin/supervisord"]
 ---> Using cache
 ---> e4d4f0d85f3f
Successfully built e4d4f0d85f3f
Successfully tagged fanfiction_ff_proxy:latest
docker run --rm -p 8888:8888 -p 8080:8080 fanfiction_ff_proxy
/usr/lib/python2.7/dist-packages/supervisor/options.py:461: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2021-08-10 17:36:44,772 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2021-08-10 17:36:44,772 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2021-08-10 17:36:44,790 INFO RPC interface 'supervisor' initialized
2021-08-10 17:36:44,790 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-08-10 17:36:44,790 INFO supervisord started with pid 1
2021-08-10 17:36:45,796 INFO spawned: 'X11' with pid 9
2021-08-10 17:36:45,798 INFO spawned: 'fluxbox' with pid 10
2021-08-10 17:36:45,799 INFO spawned: 'x11vnc' with pid 11
2021-08-10 17:36:45,801 INFO spawned: 'novnc' with pid 12
2021-08-10 17:36:45,803 INFO spawned: 'proxy' with pid 13
2021-08-10 17:36:45,848 INFO exited: fluxbox (exit status 1; not expected)
2021-08-10 17:36:46.141 UTC INFO root fanfictionnet_ff_proxy version 0.5.1 by Nicolas SAPA <nico@byme.at>
2021-08-10 17:36:46.141 UTC INFO root This Alpha software is licensed under CECILL-2.1
2021-08-10 17:36:46.145 UTC INFO root Running on Linux-5.13.8-1-default-x86_64-with-debian-10.10
2021-08-10 17:36:46,861 INFO success: X11 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:36:46,863 INFO spawned: 'fluxbox' with pid 28
2021-08-10 17:36:46,864 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:36:46,864 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:36:46,864 INFO success: proxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:36:48,674 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:36:49.887 UTC INFO undetected_chromedriver.patcher patching driver executable /home/proxy_user/.local/share/undetected_chromedriver/chromedriver
2021-08-10 17:36:50,301 INFO reaped unknown pid 67
2021-08-10 17:36:50,382 INFO reaped unknown pid 66
2021-08-10 17:37:50.500 UTC ERROR ProxiedBrowser(init) Failed to initialize Chrome: Message: unknown error: cannot connect to chrome at 127.0.0.1:46907
from chrome not reachable
Stacktrace:
#0 0x5581fb15be89 <unknown>

/usr/lib/python3/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/opt/proxy/code/chrome_content.py", line 464, in <module>
    driver = ProxiedBrowser(chrome_path, args.verbose, args.chrome_version)
  File "/opt/proxy/code/chrome_content.py", line 69, in __init__
    raise e
  File "/opt/proxy/code/chrome_content.py", line 66, in __init__
    version_main=chrome_version)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/undetected_chromedriver/v2.py", line 309, in __init__
    keep_alive=keep_alive,
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 72, in __init__
    service_log_path, service, keep_alive)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/chromium/webdriver.py", line 100, in __init__
    options=options)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 248, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/undetected_chromedriver/v2.py", line 577, in start_session
    super(Chrome, self).start_session(capabilities, browser_profile)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 339, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 400, in execute
    self.error_handler.check_response(response)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 236, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:46907
from chrome not reachable
Stacktrace:
#0 0x5581fb15be89 <unknown>

2021-08-10 17:37:51,055 INFO exited: proxy (exit status 1; not expected)
2021-08-10 17:37:52,059 INFO spawned: 'proxy' with pid 70
2021-08-10 17:37:52.261 UTC INFO root fanfictionnet_ff_proxy version 0.5.1 by Nicolas SAPA <nico@byme.at>
2021-08-10 17:37:52.261 UTC INFO root This Alpha software is licensed under CECILL-2.1
2021-08-10 17:37:52.264 UTC INFO root Running on Linux-5.13.8-1-default-x86_64-with-debian-10.10
2021-08-10 17:37:53,266 INFO success: proxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:37:57.058 UTC INFO undetected_chromedriver.patcher patching driver executable /home/proxy_user/.local/share/undetected_chromedriver/chromedriver
2021-08-10 17:37:57,193 INFO reaped unknown pid 90
2021-08-10 17:37:57,267 INFO reaped unknown pid 89
2021-08-10 17:38:57.639 UTC ERROR ProxiedBrowser(init) Failed to initialize Chrome: Message: unknown error: cannot connect to chrome at 127.0.0.1:40037
from chrome not reachable
Stacktrace:
#0 0x5585569b7e89 <unknown>

/usr/lib/python3/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/opt/proxy/code/chrome_content.py", line 464, in <module>
    driver = ProxiedBrowser(chrome_path, args.verbose, args.chrome_version)
  File "/opt/proxy/code/chrome_content.py", line 69, in __init__
    raise e
  File "/opt/proxy/code/chrome_content.py", line 66, in __init__
    version_main=chrome_version)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/undetected_chromedriver/v2.py", line 309, in __init__
    keep_alive=keep_alive,
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 72, in __init__
    service_log_path, service, keep_alive)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/chromium/webdriver.py", line 100, in __init__
    options=options)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 248, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/undetected_chromedriver/v2.py", line 577, in start_session
    super(Chrome, self).start_session(capabilities, browser_profile)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 339, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 400, in execute
    self.error_handler.check_response(response)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 236, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:40037
from chrome not reachable
Stacktrace:
#0 0x5585569b7e89 <unknown>

2021-08-10 17:38:58,184 INFO exited: proxy (exit status 1; not expected)
2021-08-10 17:38:59,188 INFO spawned: 'proxy' with pid 92
2021-08-10 17:38:59.389 UTC INFO root fanfictionnet_ff_proxy version 0.5.1 by Nicolas SAPA <nico@byme.at>
2021-08-10 17:38:59.390 UTC INFO root This Alpha software is licensed under CECILL-2.1
2021-08-10 17:38:59.393 UTC INFO root Running on Linux-5.13.8-1-default-x86_64-with-debian-10.10
2021-08-10 17:39:00,395 INFO success: proxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:39:02.828 UTC INFO undetected_chromedriver.patcher patching driver executable /home/proxy_user/.local/share/undetected_chromedriver/chromedriver
2021-08-10 17:39:02,963 INFO reaped unknown pid 112
2021-08-10 17:39:03,038 INFO reaped unknown pid 111
^[[C2021-08-10 17:40:03.399 UTC ERROR ProxiedBrowser(init) Failed to initialize Chrome: Message: unknown error: cannot connect to chrome at 127.0.0.1:45321
from chrome not reachable
Stacktrace:
#0 0x55c915676e89 <unknown>

/usr/lib/python3/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/opt/proxy/code/chrome_content.py", line 464, in <module>
    driver = ProxiedBrowser(chrome_path, args.verbose, args.chrome_version)
  File "/opt/proxy/code/chrome_content.py", line 69, in __init__
    raise e
  File "/opt/proxy/code/chrome_content.py", line 66, in __init__
    version_main=chrome_version)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/undetected_chromedriver/v2.py", line 309, in __init__
    keep_alive=keep_alive,
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 72, in __init__
    service_log_path, service, keep_alive)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/chromium/webdriver.py", line 100, in __init__
    options=options)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 248, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/undetected_chromedriver/v2.py", line 577, in start_session
    super(Chrome, self).start_session(capabilities, browser_profile)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 339, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 400, in execute
    self.error_handler.check_response(response)
  File "/home/proxy_user/.local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 236, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:45321
from chrome not reachable
Stacktrace:
#0 0x55c915676e89 <unknown>

2021-08-10 17:40:03,948 INFO exited: proxy (exit status 1; not expected)
2021-08-10 17:40:04,952 INFO spawned: 'proxy' with pid 114
2021-08-10 17:40:05.151 UTC INFO root fanfictionnet_ff_proxy version 0.5.1 by Nicolas SAPA <nico@byme.at>
2021-08-10 17:40:05.151 UTC INFO root This Alpha software is licensed under CECILL-2.1
2021-08-10 17:40:05.154 UTC INFO root Running on Linux-5.13.8-1-default-x86_64-with-debian-10.10
2021-08-10 17:40:06,156 INFO success: proxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-10 17:40:08.089 UTC INFO undetected_chromedriver.patcher patching driver executable /home/proxy_user/.local/share/undetected_chromedriver/chromedriver
2021-08-10 17:40:08,221 INFO reaped unknown pid 134
2021-08-10 17:40:08,296 INFO reaped unknown pid 133
^C2021-08-10 17:41:02,250 WARN received SIGINT indicating exit request
2021-08-10 17:41:02,250 INFO waiting for X11, novnc, x11vnc, proxy, fluxbox to die
2021-08-10 17:41:02,254 INFO stopped: proxy (terminated by SIGTERM)
2021-08-10 17:41:02,254 INFO reaped unknown pid 117
2021-08-10 17:41:02,288 INFO stopped: novnc (exit status 143)
2021-08-10 17:41:02,288 INFO reaped unknown pid 21
2021-08-10 17:41:02,290 INFO stopped: x11vnc (exit status 2)
2021-08-10 17:41:02,294 INFO stopped: fluxbox (exit status 0)
2021-08-10 17:41:02,301 INFO stopped: X11 (exit status 0)
^C

and plain run with chromium 92 (what's the default on openSUSE) this:

fanfictionnet_ff_proxy@kusansky (master)$ python3 chrome_content.py --verbose --write-log --log-filename /tmp/fanfiction_proxy_log.txt
2021-08-10 19:42:57.784 CEST INFO root fanfictionnet_ff_proxy version 0.5.1 by Nicolas SAPA <nico@byme.at>
2021-08-10 19:42:57.785 CEST INFO root This Alpha software is licensed under CECILL-2.1
2021-08-10 19:42:57.785 CEST INFO root Running on Linux-5.13.8-1-default-x86_64-with-glibc2.2.5
2021-08-10 19:42:57.818 CEST DEBUG undetected_chromedriver.patcher getting release number from /LATEST_RELEASE_90
2021-08-10 19:42:58.219 CEST DEBUG undetected_chromedriver.patcher downloading from https://chromedriver.storage.googleapis.com/90.0.4430.24/chromedriver_linux64.zip
2021-08-10 19:43:00.996 CEST DEBUG undetected_chromedriver.patcher unzipping /tmp/tmp466fzxwf
2021-08-10 19:43:01.110 CEST INFO undetected_chromedriver.patcher patching driver executable /home/matej/.local/share/undetected_chromedriver/chromedriver
2021-08-10 19:43:02.167 CEST DEBUG selenium.webdriver.remote.remote_connection POST http://127.0.0.1:44499/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "pageLoadStrategy": "normal", "goog:chromeOptions": {"extensions": [], "binary": "/usr/bin/chromium", "args": ["--remote-debugging-host=127.0.0.1", "--remote-debugging-port=53451", "--user-data-dir=/tmp/tmpiomftghx", "--lang=cs-CZ", "--log-level=0"], "debuggerAddress": "127.0.0.1:53451"}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "pageLoadStrategy": "normal", "goog:chromeOptions": {"extensions": [], "binary": "/usr/bin/chromium", "args": ["--remote-debugging-host=127.0.0.1", "--remote-debugging-port=53451", "--user-data-dir=/tmp/tmpiomftghx", "--lang=cs-CZ", "--log-level=0"], "debuggerAddress": "127.0.0.1:53451"}}}
2021-08-10 19:43:02.169 CEST DEBUG urllib3.connectionpool Starting new HTTP connection (1): 127.0.0.1:44499
2021-08-10 19:43:03.924 CEST DEBUG urllib3.connectionpool http://127.0.0.1:44499 "POST /session HTTP/1.1" 500 286
2021-08-10 19:43:03.926 CEST DEBUG selenium.webdriver.remote.remote_connection Finished Request
2021-08-10 19:43:03.993 CEST ERROR ProxiedBrowser(init) Failed to initialize Chrome: Message: unknown error: cannot connect to chrome at 127.0.0.1:53451
from session not created: This version of ChromeDriver only supports Chrome version 90
Current browser version is 92.0.4515.107

Traceback (most recent call last):
  File "chrome_content.py", line 464, in <module>
    driver = ProxiedBrowser(chrome_path, args.verbose, args.chrome_version)
  File "chrome_content.py", line 69, in __init__
    raise e
  File "chrome_content.py", line 64, in __init__
    self.driver = driver = uc.Chrome(service_log_path=service_log_path,
  File "/home/matej/.local/lib/python3.8/site-packages/undetected_chromedriver/v2.py", line 290, in __init__
    super().__init__(
  File "/usr/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/usr/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/matej/.local/lib/python3.8/site-packages/undetected_chromedriver/v2.py", line 552, in start_session
    super().start_session(capabilities, browser_profile)
  File "/usr/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:53451
from session not created: This version of ChromeDriver only supports Chrome version 90
Current browser version is 92.0.4515.107

fanfictionnet_ff_proxy@kusansky (master)$

I know that you are volunteer and this is most likely quite low on the list of your priorities (and this is mostly bug with Chrome or Selenium), but just to let you know that the situation is not very good right now.

Hi,

I was able to run the proxy on OpenSuse Tumbleweed (20210807) by doing the following:

  • sudo zypper install chromium
  • sudo zypper install git
  • python3 -m pip install --user -U pip
  • git clone https://github.com/nsapa/fanfictionnet_ff_proxy
  • cd fanfictionnet_ff_proxy
  • python3 -m pip install --user -U -r requirements.txt
  • python3 chrome_content.py --chrome-version 92

I am investigating the issue with Docker.

Best regards,
NS

Ah, --chrome-version 92, that's what I was missing! Thank you, now it works. I am glad I don't have to fiddle with Docker.

What's the point of this parameter anyway, couldn't you autodetect it? (chromium --version seems to work just fine)

If you don't pass the version, undetected_chromedriver will always download the latest chromedriver (currently 92)
And chromedriver 92 is not compatible with chrome/chromium 90.

Since the distributions I use are still on Chromium 90, I initialize uc with version 90 by default and I added the chrome-version parameter to override this default.

I thought something like (very abbreviated):

import subprocess
ver_str = subprocess.check_output(['chromium', '--version'])
version = int(ver_str.split()[1].decode().split('.')[0])

Implemented in 0.5.2

I think this ticket could be closed, couldn't it?