Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted #994

Open
ilike2burnthing opened this issue Dec 4, 2023 · 17 comments
Labels
help wanted Extra attention is needed needs investigation

Comments

@ilike2burnthing
Copy link
Contributor

          seems got the same issue here on raspberry pi 2

uname -a:

Linux Server2 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux

error:

docker logs flaresolverr_test

2023-12-04 22:24:28 INFO     FlareSolverr 3.3.10
2023-12-04 22:24:28 INFO     Testing web browser installation...
2023-12-04 22:24:28 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-04 22:24:28 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-04 22:24:28 INFO     Chrome / Chromium major version: 119
2023-12-04 22:24:28 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 300, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 317, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 306, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted

Originally posted by @nusiloot in #986 (comment)

@ilike2burnthing
Copy link
Contributor Author

@nusiloot please provide the following information:

- FlareSolverr version:
- Last working FlareSolverr version:
- Operating system:
- Are you using Docker: [yes/no]
- FlareSolverr User-Agent (see log traces or / endpoint):
- Are you using a VPN: [yes/no]
- Are you using a Proxy: [yes/no]
- Are you using Captcha Solver: [yes/no]
- If using captcha solver, which one:
- URL to test this issue:

This doesn't seem to be the same issue as the one you originally commented on. The only other case of your error was back on v3.0.0 at the start of the year on a Pi 3 - #687 (comment). @lborruto did you resolve your issue? If so, was it just by updating to v3.1.0?

@ilike2burnthing ilike2burnthing added the more information needed Further information is requested label Dec 4, 2023
@nusiloot
Copy link

nusiloot commented Dec 5, 2023

- FlareSolverr version: 3.3.10
- Last working FlareSolverr version: first time I try this software
- Operating system: Raspbian GNU/Linux 10 (buster) for RaspberryPi2
- Are you using Docker: yes
- FlareSolverr User-Agent (see log traces or / endpoint):
- Are you using a VPN: no
- Are you using a Proxy: no
- Are you using Captcha Solver: no
- If using captcha solver, which one:
- URL to test this issue:

@XenHat
Copy link

XenHat commented Dec 6, 2023

I was getting the same error (cannot open /tmp or such) until I found this issue, and I managed to get it working using v3.3.6.
After upgrading again to 3.3.10, the error now changed to Permission denied: '/app/.local'. I am very confused.
In any case, here's my information:

  • FlareSolverr version: 3.3.10
  • Last working FlareSolverr 3.3.6
  • Operating system: Arch Linux for x86_64
  • Are you using Docker: yes
  • FlareSolverr User-Agent (see log traces or / endpoint): N/A
  • Are you using a VPN: no
  • Are you using a Proxy: no
  • Are you using Captcha Solver: no
  • If using captcha solver, which one: N/A
  • URL to test this issue: N/A
Error log:

flaresolverr | 2023-12-05 20:03:25 INFO FlareSolverr 3.3.10
flaresolverr | 2023-12-05 20:03:25 INFO Testing web browser installation...
flaresolverr | 2023-12-05 20:03:25 INFO Platform: Linux-6.1.63-1-lts-x86_64-with-glibc2.31
flaresolverr | 2023-12-05 20:03:25 INFO Chrome / Chromium path: /usr/bin/chromium
flaresolverr | 2023-12-05 20:03:25 INFO Chrome / Chromium major version: 119
flaresolverr | 2023-12-05 20:03:25 INFO Launching web browser...
flaresolverr | version_main cannot be converted to an integer
flaresolverr | Traceback (most recent call last):
flaresolverr | File "/app/utils.py", line 300, in get_user_agent
flaresolverr | driver = get_webdriver()
flaresolverr | ^^^^^^^^^^^^^^^
flaresolverr | File "/app/utils.py", line 181, in get_webdriver
flaresolverr | driver = uc.Chrome(options=options, browser_executable_path=browser_executable_path,
flaresolverr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
flaresolverr | File "/app/undetected_chromedriver/init.py", line 252, in init
flaresolverr | self.patcher = Patcher(
flaresolverr | ^^^^^^^^
flaresolverr | File "/app/undetected_chromedriver/patcher.py", line 80, in init
flaresolverr | os.makedirs(self.data_path, exist_ok=True)
flaresolverr | File "", line 215, in makedirs
flaresolverr | File "", line 215, in makedirs
flaresolverr | File "", line 225, in makedirs
flaresolverr | PermissionError: [Errno 13] Permission denied: '/app/.local'
flaresolverr |
flaresolverr | During handling of the above exception, another exception occurred:
flaresolverr |
flaresolverr | Traceback (most recent call last):
flaresolverr | File "/app/flaresolverr.py", line 105, in
flaresolverr | flaresolverr_service.test_browser_installation()
flaresolverr | File "/app/flaresolverr_service.py", line 72, in test_browser_installation
flaresolverr | user_agent = utils.get_user_agent()
flaresolverr | ^^^^^^^^^^^^^^^^^^^^^^
flaresolverr | File "/app/utils.py", line 306, in get_user_agent
flaresolverr | raise Exception("Error getting browser User-Agent. " + str(e))
flaresolverr | Exception: Error getting browser User-Agent. [Errno 13] Permission denied: '/app/.local'
flaresolverr exited with code 1

Edit: v3.3.7 crashed after being unresponsive, marking 3.3.6 as last working after testing

@ilike2burnthing
Copy link
Contributor Author

Again, a different error, but also seen in #687 (comment). @jfcabral are you having this issue with v3.3.10?

@ilike2burnthing
Copy link
Contributor Author

See if v3.3.11 makes a difference.

@jfcabral
Copy link

Again, a different error, but also seen in #687 (comment). @jfcabral are you having this issue with v3.3.10?

Hello. As for 3.3.10 all good around here

2023-11-14 22:02:06 INFO     FlareSolverr 3.3.10
2023-11-14 22:02:06 INFO     Testing web browser installation...
2023-11-14 22:02:06 INFO     Platform: Linux-5.10.110-rockchip-rk3588-aarch64-with-glibc2.31
2023-11-14 22:02:06 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-11-14 22:02:07 INFO     Chrome / Chromium major version: 119
2023-11-14 22:02:07 INFO     Launching web browser...
version_main cannot be converted to an integer
2023-11-14 22:02:10 INFO     FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
2023-11-14 22:02:10 INFO     Test successful!
2023-11-14 22:02:10 INFO     Serving on http://0.0.0.0:8191

@nusiloot
Copy link

Thank you for the update; regrettably, the issue persists.

03:52:07 Tue Dec 12 - pi @ Server2 ~ : docker logs flaresolverr
2023-12-12 15:50:34 INFO     FlareSolverr 3.3.11
2023-12-12 15:50:34 INFO     Testing web browser installation...
2023-12-12 15:50:34 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:50:34 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:50:40 INFO     Chrome / Chromium major version: 119
2023-12-12 15:50:40 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted
2023-12-12 15:50:51 INFO     FlareSolverr 3.3.11
2023-12-12 15:50:51 INFO     Testing web browser installation...
2023-12-12 15:50:51 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:50:51 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:50:51 INFO     Chrome / Chromium major version: 119
2023-12-12 15:50:51 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted
2023-12-12 15:51:01 INFO     FlareSolverr 3.3.11
2023-12-12 15:51:01 INFO     Testing web browser installation...
2023-12-12 15:51:01 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:51:01 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:51:01 INFO     Chrome / Chromium major version: 119
2023-12-12 15:51:01 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted
2023-12-12 15:51:11 INFO     FlareSolverr 3.3.11
2023-12-12 15:51:11 INFO     Testing web browser installation...
2023-12-12 15:51:11 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:51:11 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:51:11 INFO     Chrome / Chromium major version: 119
2023-12-12 15:51:11 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted
2023-12-12 15:51:21 INFO     FlareSolverr 3.3.11
2023-12-12 15:51:21 INFO     Testing web browser installation...
2023-12-12 15:51:21 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:51:21 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:51:21 INFO     Chrome / Chromium major version: 119
2023-12-12 15:51:21 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted
2023-12-12 15:51:32 INFO     FlareSolverr 3.3.11
2023-12-12 15:51:32 INFO     Testing web browser installation...
2023-12-12 15:51:32 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:51:32 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:51:32 INFO     Chrome / Chromium major version: 119
2023-12-12 15:51:32 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted
2023-12-12 15:51:44 INFO     FlareSolverr 3.3.11
2023-12-12 15:51:44 INFO     Testing web browser installation...
2023-12-12 15:51:44 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:51:44 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:51:45 INFO     Chrome / Chromium major version: 119
2023-12-12 15:51:45 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted
2023-12-12 15:52:00 INFO     FlareSolverr 3.3.11
2023-12-12 15:52:00 INFO     Testing web browser installation...
2023-12-12 15:52:00 INFO     Platform: Linux-5.10.103-v7+-armv7l-with-glibc2.31
2023-12-12 15:52:00 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 15:52:01 INFO     Chrome / Chromium major version: 119
2023-12-12 15:52:01 INFO     Launching web browser...
Traceback (most recent call last):
  File "/app/utils.py", line 302, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 163, in get_webdriver
    start_xvfb_display()
  File "/app/utils.py", line 319, in start_xvfb_display
    XVFB_DISPLAY.start()
  File "/usr/local/lib/python3.11/site-packages/xvfbwrapper.py", line 73, in start
    time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/flaresolverr.py", line 105, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 72, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 308, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. [Errno 1] Operation not permitted

@jfcabral
Copy link

Hi
As far as my aarch64 goes, the new version is still functional:

2023-12-12 05:32:18 INFO     FlareSolverr 3.3.11
2023-12-12 05:32:18 INFO     Testing web browser installation...
2023-12-12 05:32:18 INFO     Platform: Linux-5.10.110-rockchip-rk3588-aarch64-with-glibc2.31
2023-12-12 05:32:18 INFO     Chrome / Chromium path: /usr/bin/chromium
2023-12-12 05:32:19 INFO     Chrome / Chromium major version: 120
2023-12-12 05:32:19 INFO     Launching web browser...
version_main cannot be converted to an integer
2023-12-12 05:32:22 INFO     FlareSolverr User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
2023-12-12 05:32:22 INFO     Test successful!
2023-12-12 05:32:22 INFO     Serving on http://0.0.0.0:8191

Could this be an issue with the armv7l image itself?

@nusiloot can you post the output of the following cmd: docker info --format '{{ .OSType }}/{{ .Architecture }}'
Also, is there any chance your docker instance is fetching an image meant for another architecture?

@nusiloot, have you tried to delete the container, the image, and do a docker system prune and then fetch it again?

If none of this works for you, you can always try to checkout the git repo and build the image yourself. I've done it in the past and, at that time, it solved the issue for me. Nowadays, I've been using the latest versions for a while and haven't had the issue ever since.

@nusiloot
Copy link

Thanks @jfcabral for your suggestions. Unfortunately, the issue persists even with manual compilation.

05:50:17 Fri Dec 15 - pi @ Server2 / : docker info --format '{{ .OSType }}/{{ .Architecture }}'
linux/armv7l

@ilike2burnthing
Copy link
Contributor Author

Unlikely to help, but try v3.3.12

@nusiloot
Copy link

Unlikely to help, but try v3.3.12

thanks, same error.

@ilike2burnthing ilike2burnthing added help wanted Extra attention is needed needs investigation and removed more information needed Further information is requested labels Dec 19, 2023
@ilike2burnthing
Copy link
Contributor Author

Again unlikely to resolve your issue, but v3.3.13 is now out, please try it.

@nusiloot
Copy link

still not

@nusiloot
Copy link

nusiloot commented Mar 1, 2024

fyi: tried 3.3.16 but issue still alive.

@03stevensmi
Copy link

Same issue here on rpi5 using docker

@xEpitheTx
Copy link

xEpitheTx commented Mar 15, 2024

Same problem on linux/armv7l with 3.3.16 through docker. Tried 3.3.6 but that errors the same way as well.

@ilike2burnthing
Copy link
Contributor Author

On your host system:

sudo apt update
sudo apt install libseccomp2

Update Docker to the latest supported version, then create a fresh FlareSolverr container.

You can read more here - https://docs.linuxserver.io/FAQ/#libseccomp

If still having issues, let me know the versions of libseccomp2 and Docker installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs investigation
Projects
None yet
Development

No branches or pull requests

6 participants