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

Error starting Chrome: Message: Can not connect to the Service /app/chromedriver #1191

Open
4 tasks done
pops64 opened this issue May 18, 2024 · 11 comments
Open
4 tasks done
Labels
more information needed Further information is requested

Comments

@pops64
Copy link

pops64 commented May 18, 2024

Have you checked our README?

  • I have checked the README

Have you followed our Troubleshooting?

  • I have followed your Troubleshooting

Is there already an issue for your problem?

  • I have checked older issues, open and closed

Have you checked the discussions?

  • I have read the Discussions

Environment

- FlareSolverr version:3.3.17
- Last working FlareSolverr version:Tried rolling back to 3.3.9
- Operating system:Linux 
- Are you using Docker: yes
- FlareSolverr User-Agent (see log traces or / endpoint):
- Are you using a VPN: tried with both
- Are you using a Proxy: no
- Are you using Captcha Solver: no

Description

Clean install. I have tried every docker trick in the book and none seem to work. Tried with and with out a VPN(Using gluetun). Tried removing the container volume and recreating. Tried root and non root. Any time I try connecting to the container this error pops out(Via. It seems similar to #994 Full Log

Logged Error Messages

2024-05-18 20:54:05 ERROR    Error starting Chrome: Message: Can not connect to the Service /app/chromedriver

Traceback (most recent call last):
  File "/app/utils.py", line 308, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 211, in get_webdriver
    return driver
           ^^^^^^
UnboundLocalError: cannot access local variable 'driver' where it is not associated with a value

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 314, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))

Screenshots

No response

@ilike2burnthing
Copy link
Contributor

Is Docker update to date?

Provide the output for uname -a on your host device.

@ilike2burnthing ilike2burnthing added the more information needed Further information is requested label May 18, 2024
@pops64
Copy link
Author

pops64 commented May 18, 2024

I update every Monday. I will let you know if that fixes the problem. As requested Linux ##### 6.8.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000 x86_64 GNU/Linux And my docker compose incase I am overlooking a obvious error. I did try it without gluetun the same error in both cases

version: '3'
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    # line above must be uncommented to allow external containers to connect.
    # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
         #REMOVED for privacy#
      - 8191:8191 #flaresolverr
    volumes:
      - ./config/gluetun:/gluetun
    environment:
      # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
      - VPN_SERVICE_PROVIDER=#REMOVED for privacy#
      - VPN_TYPE=wireguard
      # Wireguard:
      - WIREGUARD_PRIVATE_KEY=#REMOVED for privacy#
      - WIREGUARD_ADDRESSES=#REMOVED for privacy#
      - SERVER_COUNTRIES=#REMOVED for privacy#
      - SERVER_CITIES=#REMOVED for privacy#
      - FIREWALL_OUTBOUND_SUBNETS=#REMOVED for privacy#
#REMOVED for privacy#
  # flaresolverr
  flaresolverr:
    # DockerHub mirror flaresolverr/flaresolverr:latest
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: flaresolverr
    network_mode: "service:gluetun"
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
    restart: unless-stopped 

@ilike2burnthing
Copy link
Contributor

So you have also tried creating the FlareSolverr container separate from Gluetun (host network, and its own port mapping)?

Just to be clear for Monday, as I realise I wasn't, I specifically mean updating the Docker program, not your Docker containers.

@pops64
Copy link
Author

pops64 commented May 19, 2024

I tried

flaresolverr:
    # DockerHub mirror flaresolverr/flaresolverr:latest
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: flaresolverr
    network_mode: host
    ports:
      - "8191:8191"
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
    restart: unless-stopped 

Changed nothing. I tried again deleting the container volume. No luck. I then updated just docker. Went back to original config. No luck. I tried again using host mode in "". No luck.

I run a system update every Monday. I have a watchtower container so my containers get updated within 24hrs of release.

@ilike2burnthing
Copy link
Contributor

Enable debug logging, see if that gives us any more insight into what's happening - https://github.com/FlareSolverr/FlareSolverr#environment-variables

You could also try a different TEST_URL.

@pops64
Copy link
Author

pops64 commented May 20, 2024

No change. System update had no effect

024-05-20 21:16:58 INFO     ReqId 132440155834176 FlareSolverr 3.3.18
2024-05-20 21:16:58 DEBUG    ReqId 132440155834176 Debug log enabled
2024-05-20 21:16:58 INFO     ReqId 132440155834176 Testing web browser installation...
2024-05-20 21:16:58 INFO     ReqId 132440155834176 Platform: Linux-6.8.9-arch1-2-x86_64-with-glibc2.31
2024-05-20 21:16:58 INFO     ReqId 132440155834176 Chrome / Chromium path: /usr/bin/chromium
2024-05-20 21:16:58 INFO     ReqId 132440155834176 Chrome / Chromium major version: 120
2024-05-20 21:16:58 INFO     ReqId 132440155834176 Launching web browser...
2024-05-20 21:16:58 DEBUG    ReqId 132440155834176 Launching web browser...
version_main cannot be converted to an integer
2024-05-20 21:17:00 DEBUG    ReqId 132440155834176 Started executable: `/app/chromedriver` in a child process with pid: 31
2024-05-20 21:17:30 ERROR    ReqId 132440155834176 Error starting Chrome: Message: Can not connect to the Service /app/chromedriver

Traceback (most recent call last):
  File "/app/utils.py", line 308, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 211, in get_webdriver
    return driver
           ^^^^^^
UnboundLocalError: cannot access local variable 'driver' where it is not associated with a value

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 314, in get_user_agent
    raise Exception("Error getting browser User-Agent. " + str(e))
Exception: Error getting browser User-Agent. cannot access local variable 'driver' where it is not associated with a value

@ilike2burnthing
Copy link
Contributor

What TEST_URLs did you try?

@pops64
Copy link
Author

pops64 commented May 21, 2024

https://duckduckgo.com

  flaresolverr:
    # DockerHub mirror flaresolverr/flaresolverr:latest
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: flaresolverr
    network_mode: "service:gluetun"
    environment:
      - LOG_LEVEL=debug
      - LOG_HTML=true
      - CAPTCHA_SOLVER=none
      - TEST_URL=https://duckduckgo.com
    restart: unless-stopped

@ilike2burnthing
Copy link
Contributor

As a test, can you try running FlareSolverr natively?

https://aur.archlinux.org/packages/flaresolverr
or
https://aur.archlinux.org/packages/flaresolverr-bin

@pops64
Copy link
Author

pops64 commented May 22, 2024

Unfortunately I am trying to keep my package list small and I don't want to retrieve anything from the AUR. Part of the reason I run Docker is to avoid dependency headaches.

@ilike2burnthing
Copy link
Contributor

K, try on your Windows device, natively and in Docker (ideally on the same local network), see if you can repeat the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information needed Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants