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

install and reinstall from another session in the same daemon replace the app on a claimed device

Đang mở
#3,345 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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/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ệ
ios, typescript
Lĩnh vực
cli, mobile

Hướng nghiên cứu

Start by tracing how install and reinstall use transient-exclusive claims, then compare that path with the session-store check used by open. Reproduce with two sessions sharing one daemon and a claimed iOS simulator; verify that the non-owning session gets DEVICE_IN_USE while the owning session can still install and reinstall. Check whether the other listed transient-exclusive commands have the same behavior.

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

Mô tả

Seen in 0.20.10, 0.21.12 and 0.21.23 on macOS with iOS simulators.

Repro

Both sessions use the default state dir, so they share one daemon, as two agents in separate worktrees of the same repo do:

agent-device open com.apple.Preferences --platform ios --udid <UDID> --session a
agent-device device status --platform ios --udid <UDID>
# live session=a

agent-device open com.apple.Preferences --platform ios --udid <UDID> --session b
# DEVICE_IN_USE: Device is already in use by session "a".   (expected)

agent-device reinstall <bundle-id> /path/to/App.app --platform ios --udid <UDID> --session b
# Installed: <bundle-id>   (session a's app is replaced)

agent-device install <bundle-id> /path/to/App.app --platform ios --udid <UDID> --session b
# Installed: <bundle-id>

When session b runs on another state dir (AGENT_DEVICE_STATE_DIR), install and reinstall fail as expected:

DEVICE_IN_USE: ios device <UDID> is owned by session "a" in workspace "<workspace>".

Cause

#1809 made install and reinstall transient-exclusive, and a claim already held by the same daemon process covers the command instead of colliding with it. That is right for the session that owns the claim, but any other session in that daemon is covered too. open is still protected by the session store check; the sessionless mutations are not.

Impact

Agents working in parallel worktrees share the default daemon, so whether an install is fenced off depends on whether each worktree happens to run its own daemon. In our case one agent's build replaced the app another agent was testing.

Expected

install and reinstall targeting a device that a different session in the same daemon holds fail with DEVICE_IN_USE, the same as open. Passing the owning --session keeps working. I only tested install and reinstall; the other transient-exclusive commands (boot, shutdown, push, prepare) may behave the same way.

Ngôn ngữ chính
TypeScript
Star
4.9k
Fork
328
Merge trung bình
12 giờ 13 phút
Pull request đã merge (30 ngày)
541

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 callstack/agent-device

Tất cả issue của callstack/agent-device

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.