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

preview: orphan cleanup kills other tools' detached headless Chrome processes (opt-out or scope to own processes)

Đã đóng Phù hợp với người mới
#6,203 1 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

Chưa có ai nhận issue nà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
75/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ệ
node.js, typescript
Lĩnh vực
cli

Hướng nghiên cứu

Đọc packages/cli/src/utils/orphanCleanup.ts để xem killOrphanedProcesses khớp và kết thúc các tiến trình chrome như thế nào. Sửa nó để tôn trọng HYPERFRAMES_NO_ORPHAN_CLEANUP hoặc giới hạn việc khớp vào các profile thuộc sở hữu của HyperFrames thông qua một marker. Hoàn thành nghĩa là preview không còn kết thúc các tiến trình headless Chrome detached không liên quan.

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

Mô tả

Summary

On every hyperframes preview call (including reconnecting to an already running studio), killOrphanedProcesses() terminates every process tree of the current user with PPID 1 whose command line contains chrome-headless-shell, chrome_headless_shell or puppeteer_dev_chrome_profile (packages/cli/src/utils/orphanCleanup.ts, called from packages/cli/src/commands/preview.ts).

On a shared developer machine this also kills detached headless browsers that belong to other tools (for example Playwright/Puppeteer runners or automation that was started detached), not only leftovers of HyperFrames sessions.

Reproduction (macOS, observed on 0.8.97; same code on main / v0.8.191)
  1. Start a detached headless browser from another tool so that its parent exits (PPID becomes 1), e.g. nohup chrome-headless-shell --remote-debugging-port=0 about:blank >/dev/null 2>&1 & disown.
  2. Run hyperframes preview <project>.
  3. The unrelated chrome-headless-shell process is terminated.
Expected

Cleanup only affects processes that HyperFrames itself started, or can be turned off.

Suggestion
  • An opt-out, e.g. HYPERFRAMES_NO_ORPHAN_CLEANUP=1 or --no-orphan-cleanup, and/or
  • scope the cleanup to HyperFrames-owned processes (e.g. a marker in the user-data-dir/profile path, or a PID registry in the state directory).

Context: we embed hyperframes preview in a local design tool and currently have to warn users before every editor start. Related: #1038 (the original orphan problem).

Ngôn ngữ chính
TypeScript
Star
54.1k
Fork
4.9k
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
755

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 heygen-com/hyperframes

Tất cả issue của heygen-com/hyperframes

Issue tương tự

Thêm issue về TypeScript

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.