Skip to content

Unable to run headful flaresolverr on AWS EC2 instance (I only can run it headless) #1528

@juanfrilla

Description

@juanfrilla

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

Have you ACTUALLY checked all these?

YES

Environment

- FlareSolverr version:3.3.25
- Last working FlareSolverr version:
- Operating system:Linux-6.8.0-1029-aws-x86_64-with-glibc2.36
- 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:

Description

Steps to reproduce the error:

  1. Configure an Amazon AWS EC2 Machine
  2. copy and paste this docker compose
version: "2.1"
services:
  flaresolverr:
    # DockerHub mirror flaresolverr/flaresolverr:latest
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=Europe/London
      - HEADLESS=false
    ports:
      - "${PORT:-8191}:8191"
    restart: unless-stopped
  1. docker compose up -d --build

PD: I can run it headless without any problem but not headful

Logged Error Messages

2025-06-20 00:22:15 INFO     FlareSolverr 3.3.25
2025-06-20 00:22:15 INFO     Testing web browser installation...
2025-06-20 00:22:15 INFO     Platform: Linux-6.8.0-1029-aws-x86_64-with-glibc2.36
2025-06-20 00:22:15 INFO     Chrome / Chromium path: /bin/chromium
2025-06-20 00:22:15 INFO     Chrome / Chromium major version: 137
2025-06-20 00:22:15 INFO     Launching web browser...
2025-06-20 00:23:16 ERROR    Error starting Chrome: Message: session not created: cannot connect to chrome at 127.0.0.1:45691
from chrome not reachable
Stacktrace:
#0 0x5985033a76de <unknown>
#1 0x598502e6147c <unknown>
#2 0x598502e5059a <unknown>
#3 0x598502e9ffa8 <unknown>
#4 0x598502e965fc <unknown>
#5 0x598502ee5007 <unknown>
#6 0x598502ee4763 <unknown>
#7 0x598502ed5fa3 <unknown>
#8 0x598502ea3f1d <unknown>
#9 0x598502ea4cf1 <unknown>
#10 0x5985033733aa <unknown>
#11 0x5985033766ff <unknown>
#12 0x598503376198 <unknown>
#13 0x598503376ba5 <unknown>
#14 0x59850335d0cb <unknown>
#15 0x598503376f10 <unknown>
#16 0x598503346b09 <unknown>
#17 0x598503395315 <unknown>
#18 0x59850339550b <unknown>
#19 0x5985033a6255 <unknown>
#20 0x7fe51368b1f5 <unknown>

Traceback (most recent call last):
  File "/app/utils.py", line 313, in get_user_agent
    driver = get_webdriver()
             ^^^^^^^^^^^^^^^
  File "/app/utils.py", line 216, 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 108, in <module>
    flaresolverr_service.test_browser_installation()
  File "/app/flaresolverr_service.py", line 74, in test_browser_installation
    user_agent = utils.get_user_agent()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 319, 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
2025-06-20 00:23:17 INFO     FlareSolverr 3.3.25
2025-06-20 00:23:17 INFO     Testing web browser installation...
2025-06-20 00:23:17 INFO     Platform: Linux-6.8.0-1029-aws-x86_64-with-glibc2.36
2025-06-20 00:23:17 INFO     Chrome / Chromium path: /bin/chromium
2025-06-20 00:23:17 INFO     Chrome / Chromium major version: 137
2025-06-20 00:23:17 INFO     Launching web browser...
`

Screenshots

PD: I can run it headless without any problem but not headful

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy