Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: CRAWL4AI_CHROMIUM_SANDBOX=true does not remove --no-sandbox (v0.9.4 Docker image)

Đang mở
#2,371 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@deswanth12 đang làm issue này rồi.

Từ ngày 15/10/2026.

  • #2376 của @deswanth12 — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
50/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, playwright, python
Lĩnh vực
backend, security

Hướng nghiên cứu

Start in crawl4ai/browser_manager.py, where _build_browser_args and ManagedBrowser.build_browser_flags unconditionally add --no-sandbox, then check api.py at the three sites that build BrowserConfig from extra_args. Confirm that chromium_sandbox is never passed to Playwright. Done means that with CRAWL4AI_CHROMIUM_SANDBOX=true the flag is absent from the launched Chromium command line, while the default behaviour is unchanged. Verify by listing the process args inside the container after calling /html.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

crawl4ai version

0.9.4 (Docker image unclecode/crawl4ai:0.9.4)

Expected Behavior

With CRAWL4AI_CHROMIUM_SANDBOX=true, Chromium should start without --no-sandbox, so that Chromium's own sandbox is on.

Current Behavior

Every Chromium process in the container still has --no-sandbox on its command line: the permanent browser started at boot, and the browsers started by /html, /md and /crawl. The result is the same under Docker's default confinement and with AppArmor unconfined.

From reading the source, the flag is added after the switch is applied:

  • crawl4ai/browser_manager.py, _build_browser_args (about line 1092), and ManagedBrowser.build_browser_flags add --no-sandbox unconditionally. The server's _browser_extra_args() filter only removes the flag from its own extra_args, so it cannot remove the one the library adds.
  • chromium_sandbox is never passed to Playwright.
  • api.py builds BrowserConfig from the config file's extra_args at three sites without applying the switch.
Is this reproducible?

Yes

Inputs Causing the Bug
- URL(s): any (a local page is enough)
- Settings used: -e CRAWL4AI_CHROMIUM_SANDBOX=true, plus an API token
- Input data (if applicable): none
Steps to Reproduce
1. Run the 0.9.4 image with CRAWL4AI_CHROMIUM_SANDBOX=true.
2. Call /html, /md and /crawl once each.
3. In the container, list Chromium's command lines (ps -eo args | grep chrom).
4. Every line contains --no-sandbox.
Code snippets
# No client code is involved; the flag is on the browser's own command line.

Supporting Information

OS

Linux (Ubuntu 24.04 host, Docker 29.9.0, container with cap_drop: ALL, no-new-privileges, read-only root)

Python version

Not recorded (the one in the Docker image).

Browser

Chromium, as installed in the Docker image.

Browser version

Not recorded.

Error logs & Screenshots (if applicable)

None. Nothing is logged: the switch is accepted and has no effect.

Additional context

Chromium can start sandboxed in this container: through Playwright with chromium_sandbox=True, it works once Docker's default seccomp profile is extended to allow chroot, clone, setns and unshare. So the missing piece is on the Crawl4AI side. If the switch is meant to be a no-op, the docs could say so.

Ngôn ngữ chính
Python
Star
85.4k
Fork
8.9k
Merge trung bình
6 ngày 5 giờ
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của unclecode/crawl4ai

Tất cả issue của unclecode/crawl4ai

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.