[Bug]: CRAWL4AI_CHROMIUM_SANDBOX=true does not remove --no-sandbox (v0.9.4 Docker image)
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 50/100
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 85.9k
- 派生
- 8.9k
- 平均合并
- 4 天 20 分钟
- 30 天内合并 PR
- 19
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
unclecode/crawl4ai 的其他 Issue
-
[Bug]: Text after an inline <link>, <meta>, <style> or <noscript> is dropped from cleaned_html and markdown可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭🐞 Bug 🩺 Needs Triage
难度 2/5 1-3 小时 新手友好度 85/100
unclecode/crawl4ai#2416 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug]: Since 0.9.1, Linux launches chrome-headless-shell instead of Chromium可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭🐞 Bug 🩺 Needs Triage
难度 2/5 1-3 小时 新手友好度 72/100
unclecode/crawl4ai#2382 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug]: BestFirstCrawlingStrategy fetches a full batch past max_pages可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭🐞 Bug 🩺 Needs Triage
难度 2/5 1-3 小时 新手友好度 74/100
unclecode/crawl4ai#2381 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug]: CrawlerRunConfig.clone() drops fallback_fetch_function, so deep crawls never use it可能已有人在做 @siva23367 于 7 天前认领。 未关闭🐞 Bug 🩺 Needs Triage
难度 2/5 1-3 小时 新手友好度 78/100
unclecode/crawl4ai#2379 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug]: Docker memory guard reads host RAM when no container limit is set — cgroup v2 "max" defeats get_container_memory_percent可能已有人在做 @Battleplus 于 63 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
unclecode/crawl4ai#2123 · 1 条评论 ·
维护者通常 2 天内回复
查看 unclecode/crawl4ai 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
521xueweihan/HelloGitHub#4115 ·
-
get_lldp_neighbors_detail: query asks for 'max-address' (typo for 'mac-address'), so remote_chassis_id is always empty可能已有人在做 @Jah-yee 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
-
lesson-submission pending-review
难度 1/5 1 小时以内 新手友好度 74/100
Ikalus1988/MisakaNet#3899 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
aws-samples/sample-per-model-bedrock#549 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100