[Bug]: Hardened docker-compose (read_only) keeps full Chromium from starting: crashpad needs a writable ~/.config
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/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, docker-compose
- Lĩnh vực
- devops, infrastructure
Hướng nghiên cứu
Bắt đầu từ danh sách environment: của x-base-config trong docker-compose.yml, nơi issue đề xuất XDG_CONFIG_HOME=/tmp/.config. Kiểm tra thêm các thiết lập read-only và tmpfs trong cùng tệp, và xác nhận XDG_CACHE_HOME vẫn không được đặt. Hoàn tất khi docker compose logs crawl4ai không còn hiển thị dòng "Full Chromium failed" lúc khởi động.
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.5 Docker image with PR #2448 backported, run with the hardened docker-compose.yml (same file on v0.9.5 and develop: read_only: true, tmpfs list).
Expected Behavior
With #2448 (merged into develop on 2026-10-26), the hardened compose launches full Chromium, which is the fix for #2382.
Current Behavior
In the hardened container, full Chromium dies at launch:
[BROWSER]. ℹ Full Chromium failed to start (BrowserType.launch: Target page, context or browser has been closed); falling back to chrome-headless-shell, which can behave differently. Run 'crawl4ai-setup' to install full Chromium.
The #2448 fallback then starts chrome-headless-shell, so with the official compose the server keeps running the shell and #2382 stays unfixed in practice.
The warning's advice also misleads here: full Chromium is already in the image (chromium-1248).
Root cause: Chromium's crash handler (crashpad) keeps its database under the XDG config directory ($HOME/.config/google-chrome-for-testing/Crash Reports), even when --user-data-dir points elsewhere, as Playwright's does.
The read-only root filesystem leaves $HOME/.config unwritable.
Run by hand in the container with a user data dir under /tmp, the bundled browser fails the same way:
$ /home/appuser/.cache/ms-playwright/chromium-1248/chrome-linux64/chrome --headless=new --no-sandbox --user-data-dir=/tmp/udd --dump-dom about:blank
chrome_crashpad_handler: --database is required
Trace/breakpoint trap
Is this reproducible?
Yes
Steps to Reproduce
# From a develop checkout (#2448 included); the compose file has a build: section.
docker compose up -d --build
docker compose logs crawl4ai | grep "Full Chromium failed"
The line appears at boot, since the server starts its default browser at startup.
Suggested fix
Give Chromium a writable config directory, for example by adding to the environment: list of x-base-config in docker-compose.yml:
- XDG_CONFIG_HOME=/tmp/.config
With it, full Chromium starts: chromium-1248/chrome-linux64/chrome runs, crashpad uses --database=/tmp/.config/google-chrome-for-testing/Crash Reports, and no fallback line is logged.
XDG_CACHE_HOME must stay unset, as Playwright looks for its browsers under ~/.cache/ms-playwright (see also #2027 for the same read-only constraint).
Alternatives, not tested: an ENV XDG_CONFIG_HOME=/tmp/.config line in the Dockerfile (would also cover docker run --read-only), or a tmpfs entry - /home/appuser/.config:uid=999,gid=999,mode=0700.
OS
Linux (Docker on WSL2)
Python version
3.12 (image)
Browser
Chromium bundled with Playwright 1.64
Browser version
156.0.8078.4
- Ngôn ngữ chính
- Python
- Star
- 86.8k
- Fork
- 9k
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 26
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
-
[Feature]: Crawl4aiDockerClient has no public option for the API token the 0.9 server requiresĐang mở⚙ Done ✨ Enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 2 ngày
-
⚙ Done 🐞 Bug 📌 Root caused
Độ 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 2 ngày
-
[Bug]: PDF images saved with save_images_locally=True come back with an empty src in result.mediaCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở🐞 Bug 🩺 Needs Triage
Độ 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 2 ngày
-
🐞 Bug 🩺 Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
unclecode/crawl4ai#2416 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
⚙ Done 🐞 Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
unclecode/crawl4ai#2382 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của unclecode/crawl4ai
Issue tương tự
-
bug severity:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
githubnext/gh-aw-workshop#5367 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
OAuth documentation for GET /api/v2/users/me/ appears inconsistent with required global read scopeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Create Noise Latents ignores randomize_seed and produces the same noise every runCó thể đã có người làm @griptapeops đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
griptape-ai/griptape-nodes-library-diffusers#127 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Jenkins capacity report: metrics history is lost when archiving a month failsCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
adoptium/infrastructure#4568 ·
Maintainer thường phản hồi trong vòng 1 ngày