platform-ios: wait for the simulator to settle after boot before launching the app
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react-native, typescript
- 领域
- ci-cd, mobile, testing-qa
调研方向
从 packages/platform-ios/src/instance.ts 中的 prepareSimulator 开始,然后阅读 packages/platform-ios/src/xcrun/simctl.ts 中的 waitForBoot 以及 startup-strategy.ts 中的主机阈值。在选择有界的响应性或基于负载的稳定行为之前,比较 booted 和已经 Booting 的路径。完成的标准是,受限主机在启动后安全等待,等待时间有上限,并且其持续时间会出现在诊断信息中,同时不会无限期延迟启动。
由索引模型根据 Issue 内容生成。
描述
Context
Harness runs unreliably on small CI hosts (e.g. GitHub macos-latest: 3 vCPU / 7 GB); a common symptom is the app failing to connect to the bridge shortly after simulator boot.
prepareSimulator in packages/platform-ios/src/instance.ts boots the simulator and waits with xcrun simctl bootstatus <udid> -b (packages/platform-ios/src/xcrun/simctl.ts waitForBoot). bootstatus -b returns as soon as the device reports Booted, but SpringBoard and the first-boot daemons keep consuming CPU for a while afterwards. On a 3-core host the app is then installed and launched into a simulator that is still busy, which stretches JS evaluation and can push startup past bundleStartTimeout / readyTimeout.
Proposal
Add a bounded "settle" step after waitForBoot, applied on constrained hosts (reuse the host-capability thresholds from startup-strategy.ts):
- Poll a direct responsiveness probe, e.g.
xcrun simctl spawn <udid> launchctl list, and proceed once two consecutive calls complete under ~300 ms; and/or - wait until
os.loadavg()[0]drops belowcores × 1.5; - cap the wait (e.g. 45 s) so a persistently busy host does not stall startup, and record the settle duration in diagnostics.
This should apply both when Harness booted the simulator and when it found one already Booting.
Files
packages/platform-ios/src/instance.ts(prepareSimulator)packages/platform-ios/src/xcrun/simctl.ts(waitForBoot)packages/platform-ios/src/startup-strategy.ts
Part of a broader effort to make Harness reliable on constrained CI runners.
- 主要语言
- TypeScript
- 星标
- 330
- 派生
- 17
- 平均合并
- 23 小时 53 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstackincubator/react-native-harness 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 68/100
查看 callstackincubator/react-native-harness 的全部 Issue
相似的 Issue
-
bug via-triage
难度 2/5 1-3 小时 新手友好度 78/100
pingdotgg/t3code#14452 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
solana-foundation/program-examples#747 · 1 条评论 ·
维护者通常 9 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
remotion-dev/remotion#11847 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
openwatersio/slackwater#355 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
melgarafael/DeskcommCRM#1998 · 3 条评论 ·
维护者通常 1 天内回复