Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Closed Beginner friendly
#3,305 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@thymikee is already working on this.

Since Oct 8, 2026.

  • #3332 by @thymikee — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
mobile

Research direction

Start with clearIosSimulatorAppState in packages/platform-apple/src/core/app-settings.ts and inspect how it handles the simctl get_app_container output before calling readHostDirectory. Check for tests covering clearing iOS simulator app state; the issue does not name a test file. Done means (null) is refused with an app-specific unsupported-operation message instead of causing an ENOENT error.

Written by the indexing model from the issue text.

Description

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).

Dominant language
TypeScript
Stars
4.9k
Forks
328
Avg merge
12h 18m
Merged PRs (30d)
538

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from callstack/agent-device

All issues in callstack/agent-device

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.