Skip to content

fix: detect disabled Developer Tools mode for iOS runner#792

Open
knchst wants to merge 2 commits into
callstack:mainfrom
knchst:knchst/fix-ios-runner-xctestrun-only-test
Open

fix: detect disabled Developer Tools mode for iOS runner#792
knchst wants to merge 2 commits into
callstack:mainfrom
knchst:knchst/fix-ios-runner-xctestrun-only-test

Conversation

@knchst

@knchst knchst commented Jun 12, 2026

Copy link
Copy Markdown

Summary

  • iOS runner 起動前に DevToolsSecurity -status を確認し、Developer mode が無効な場合は即時に actionable error を返すようにしました
  • timeout 後に Simulator 内へ残る known runner bundle ID を best-effort で terminate する cleanup を追加しました
  • disabled Developer mode の unit test と runner cleanup test を追加しました

Context

Refs #791.

調査中、xcodebuild test-without-buildingAgentDeviceRunnerUITests-Runner を起動したあと、runner process が Ts のまま停止し、Swift 側の AGENT_DEVICE_RUNNER_HEADLESS_STARTUP まで到達しないことを確認しました。Simulator log では runner が WaitForDebugger = true で起動され、testmanagerd が test session との pairing を待ったまま切断されていました。

ローカルでは DevToolsSecurity -statusDeveloper mode is currently disabled. を返しており、この状態だと UI test runner が Xcode/testmanagerd と pair できず、最終的に prepare ios-runner が daemon timeout になります。

この PR は管理者権限が必要な DevToolsSecurity -enable を自動実行せず、timeout 前に明確なエラーと手順を返します。あわせて、失敗後に残る Simulator runner process の cleanup も追加しています。

Validation

  • pnpm exec vitest run src/platforms/ios/__tests__/runner-session.test.ts
  • pnpm format
  • pnpm typecheck
  • pnpm build
  • local CLI check with Developer mode disabled:
    • node bin/agent-device.mjs prepare ios-runner --platform ios --udid FD1A4051-C2A7-436B-8BCA-A86F92DAA10A --timeout 30000 --state-dir /tmp/agent-device-devtools-state --debug
    • observed immediate Error (COMMAND_FAILED): Developer mode is disabled for Apple development tools

@knchst knchst changed the title fix: terminate simulator runner apps during cleanup fix: detect disabled Developer Tools mode for iOS runner Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant