iOS: alert dismiss taps "Allow" on the App Tracking Transparency prompt
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
The bug is in chooseAlertButton in apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift, where the dismiss fallback returns buttons.last. Start with the isDismissButton label list and the dismiss branch, comparing them with the guard already in the accept branch. Done when "Ask App Not to Track" is recognized as a dismiss label or the dismiss fallback never picks an accept-style button, and the ATT prompt leaves tracking denied on a simulator run.
Written by the indexing model from the issue text.
Description
Problem
On an iOS simulator, alert dismiss on the App Tracking Transparency prompt (buttons "Ask App Not to Track" and "Allow") taps "Allow". The command prints dismissed and exits 0, but iOS records an authorization, exactly as after alert accept.
Nothing in the output reveals it: a test that dismisses the prompt to decline tracking silently runs the app with tracking authorized.
Environment
- agent-device 0.21.24 (code unchanged in 0.21.27,
0.21.28-nightly.20261014.57andmainat 542fb77, see Cause) - macOS 26.6.2, Xcode 27.0, Node 24.21.0
- Simulator: iPhone 17, iOS 27.0, English locale
- Target app: an Expo development build that calls
requestTrackingAuthorizationon launch
Reproduction
xcrun simctl privacy "$SIM" reset all <bundle id> # ATT status back to notDetermined
npx agent-device open <bundle id> --platform ios --udid "$SIM" --relaunch
npx agent-device alert wait 15000 # "Allow “<app>” to track your activity across other companies’ apps and websites?"
npx agent-device alert dismiss # "dismissed", exit code 0
sqlite3 ~/Library/Developer/CoreSimulator/Devices/"$SIM"/data/Library/TCC/TCC.db \
"select auth_value from access where service='kTCCServiceUserTracking' and client='<bundle id>'"
The development build was opened with --launch-url and its dev-client deep link; any app that requests tracking authorization on launch shows the same prompt. auth_value is 0 when tracking is denied and 2 when it is authorized.
| Response to the prompt | Runs | auth_value |
|---|---|---|
alert dismiss |
4 | 2 (authorized), 4 of 4 |
alert accept |
— | 2 (authorized) |
find text "Ask App Not to Track" click, or click on the button ref |
4 | 0 (denied), 4 of 4 |
Cause
chooseAlertButton in RunnerTests+Alert.swift:
return buttons.first(where: { isDismissButton($0.label) }) ?? buttons.last
"Ask App Not to Track" is not in the isDismissButton list (cancel, close, dismiss, don't allow, not now, no, keep browsing, later), so dismiss falls back to buttons.last, which is "Allow" on this prompt.
The accept branch already guards against the symmetric mistake: when no accept label matches, it only taps a lone button that is not a dismiss button. The dismiss branch has no such guard and can tap a button that isAcceptButton recognizes ("allow").
Suggested fix
Either or both:
- add "ask app not to track" to the dismiss labels;
- in the
dismissfallback, never pick a button thatisAcceptButtonmatches (e.g. the last button that is not an accept button), and fail when every button is an accept button, rather than tap one.
The second keeps dismiss from authorizing on any prompt whose decline label is unknown, including localized ones.
Expected behavior
alert dismiss on the App Tracking Transparency prompt taps "Ask App Not to Track", or fails without tapping, and never records an authorization.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 334
- Avg merge
- 12h 29m
- Merged PRs (30d)
- 663
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/agent-device
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
Maintainers usually reply within 1 day
-
bug ready-for-agent
Difficulty 4/5 3-5 days Newbie friendliness 25/100
callstack/agent-device#3674 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement ready-for-agent
Difficulty 5/5 Over a week Newbie friendliness 35/100
callstack/agent-device#3531 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 55/100
callstack/agent-device#3449 · 1 comment ·
Maintainers usually reply within 1 day
-
bug ready-for-agent
Difficulty 4/5 3-5 days Newbie friendliness 45/100
callstack/agent-device#3406 · 1 comment ·
Maintainers usually reply within 1 day
All issues in callstack/agent-device
Similar issues
-
test: make the #3408 Claude OAuth token fixture obviously fake so secret scanners stop flagging itOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
code-yeongyu/senpi#3436 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lingdojo/kana-dojo#32505 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/gh-aw-firewall#10040 ·
Maintainers usually reply within 1 day
-
review-followup
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
griffinwork40/agent-afk#3868 ·
Maintainers usually reply within 1 day
-
area: import-export bug status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
amatya-aditya/obsidian-rss-dashboard#1191 ·
Maintainers usually reply within 1 day