Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#3,345 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
ios, typescript
领域
cli, mobile

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
4.9k
派生
328
平均合并
12 小时 18 分钟
30 天内合并 PR
561

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/agent-device 的其他 Issue

查看 callstack/agent-device 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。