[Bug]: CRAWL4AI_CHROMIUM_SANDBOX=true does not remove --no-sandbox (v0.9.4 Docker image)
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
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), andManagedBrowser.build_browser_flagsadd--no-sandboxunconditionally. The server's_browser_extra_args()filter only removes the flag from its ownextra_args, so it cannot remove the one the library adds.chromium_sandboxis never passed to Playwright.api.pybuildsBrowserConfigfrom the config file'sextra_argsat 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
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unclecode/crawl4ai
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
unclecode/crawl4ai#2381 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Docker memory guard reads host RAM when no container limit is set — cgroup v2 "max" defeats get_container_memory_percentCó thể đã có người làm @Battleplus đã nhận 53 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
unclecode/crawl4ai#2123 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: After a streamed deep crawl is stopped early, the next deep crawl returns only the start pageCó thể đã có người làm @PiUnknown đã nhận hôm nay. Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 12/100
unclecode/crawl4ai#2380 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của unclecode/crawl4ai
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
common-workflow-language/cwl-utils#477 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add dependabotĐang mởfeat
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 72/100
open-nudge/opentemplate#204 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
github-stale-ci-pr-closer: KV state is double-wrapped, never persists, and hits the depth-32 limitCó thể đã có người làm @VascoSch92 đã nhận hôm nay. Đang mởpriority:medium ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenHands/extensions#781 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
githubnext/gh-aw-workshop#4638 ·
Maintainer thường phản hồi trong vòng 1 ngày