Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

settings clear-app-state fails with ENOENT … scandir '(null)' for iOS system apps such as Settings

クローズ 初心者向け
#3,305 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@thymikee がすでに取り組んでいます。

2026年10月8日 から。

  • #3332 @thymikee による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
80/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
mobile

調査の方向性

packages/platform-apple/src/core/app-settings.ts の clearIosSimulatorAppState から始め、readHostDirectory を呼び出す前に simctl get_app_container の出力をどのように処理しているかを確認してください。iOS シミュレーターのアプリ状態の消去を対象とするテストがあるか確認してください。issue にはテストファイルが指定されていません。(null) が ENOENT エラーを引き起こすのではなく、アプリ固有の未対応操作メッセージで拒否されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

What happens

On an iOS simulator, clearing the state of a system app fails with an internal error instead of a clear refusal:

agent-device settings clear-app-state clear --app com.apple.Preferences --platform ios --udid <udid>
ENOENT: no such file or directory, scandir '(null)'

Reproduced with agent-device 0.21.22 on an iOS 26.5 simulator (Xcode 27.0). 0.21.23 has the same code.

Cause

clearIosSimulatorAppState in packages/platform-apple/src/core/app-settings.ts rejects only an empty container path:

const containerPath = result.stdout.trim();
if (!containerPath) { throw new AppError('COMMAND_FAILED', …); }
const entries = await readHostDirectory(containerPath);

For an app without a data container, simctl exits 0 and prints the literal text (null):

$ xcrun simctl get_app_container <udid> com.apple.Preferences data
(null)
$ echo $?
0

The check passes, and readHostDirectory('(null)') throws ENOENT.

Suggested fix

Treat (null) like an empty path, and refuse with a message that names the app, for example UNSUPPORTED_OPERATION: com.apple.Preferences has no data container to clear (system apps have none).

主要言語
TypeScript
スター
4.9k
フォーク
328
平均マージ
11時間 48分
マージ済み PR(30日)
605

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/agent-device のほかの issue

callstack/agent-device の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。