fix: detect disabled Developer Tools mode for iOS runner#792
Open
knchst wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DevToolsSecurity -statusを確認し、Developer mode が無効な場合は即時に actionable error を返すようにしましたContext
Refs #791.
調査中、
xcodebuild test-without-buildingがAgentDeviceRunnerUITests-Runnerを起動したあと、runner process がTsのまま停止し、Swift 側のAGENT_DEVICE_RUNNER_HEADLESS_STARTUPまで到達しないことを確認しました。Simulator log では runner がWaitForDebugger = trueで起動され、testmanagerdが test session との pairing を待ったまま切断されていました。ローカルでは
DevToolsSecurity -statusがDeveloper 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.tspnpm formatpnpm typecheckpnpm buildnode bin/agent-device.mjs prepare ios-runner --platform ios --udid FD1A4051-C2A7-436B-8BCA-A86F92DAA10A --timeout 30000 --state-dir /tmp/agent-device-devtools-state --debugError (COMMAND_FAILED): Developer mode is disabled for Apple development tools