Proxy lease refuses every iOS install/open: connection platform 'ios' compared with internal 'apple'
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli, mobile-dev
Research direction
Start in src/cli/commands/connection-runtime.ts at applyResolvedDeviceSelector (around lines 888-898) and assertRequestedConnectionScope (around lines 955-961). Trace publicPlatformString and buildProxyDeviceKey, then make the resolved platform consistent with the connection's public platform. Reproduce with an iOS proxy lease and install or open, and confirm Android behavior remains unchanged.
Written by the indexing model from the issue text.
Description
Summary
With a proxy lease, every iOS install and open on a remote connection is refused with:
Error (INVALID_ARGS): Active remote connection is already bound to a different platform. Re-run connect --force to replace it.
even though the connection was opened for iOS and the request targets that same iOS device. Android is unaffected.
Cause
When the lease state resolves a device, applyResolvedDeviceSelector copies the device's internal platform into the request flags:
For an iOS-family device that value is the internal apple, not the public ios. assertRequestedConnectionScope then compares it with the connection's stored public platform:
so ios !== apple and the request is refused. Android passes because its internal and public names are both android.
Repro
agent-device 0.21.12 (same code on main at 76dbee0): open a remote connection with platform: ios and a proxy lease, then run install <app> (or open) against the leased device. It fails right after the device lookup, before a lease is taken.
Possible fix
Store the public name in the flags, e.g. flags.platform = publicPlatformString(device) (already used by buildProxyDeviceKey in the same file), or normalize both sides before the comparison.
Context
Found through Stim (appandflow/stim#1096). Stim works around it by keeping iOS on the default 60 s lease (appandflow/stim#1127), which means large iOS apps can still hit #2946 (lease not renewed during upload); fixing this would let iOS use the longer proxy lease.
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 304
- Avg merge
- 11h 6m
- Merged PRs (30d)
- 521
Getting set up
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
-
ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
callstack/agent-device#2995 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 75/100
callstack/agent-device#3047 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
callstack/agent-device#3021 ·
Maintainers usually reply within 1 day
-
ready-for-agent
Difficulty 3/5 1-2 days Newbie friendliness 68/100
callstack/agent-device#3004 ·
Maintainers usually reply within 1 day
All issues in callstack/agent-device
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openedx/frontend-app-authoring#3274 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area/documentation status/need-triage
Difficulty 1/5 Under an hour Newbie friendliness 95/100
google-gemini/gemini-cli#29548 ·
Maintainers usually reply within 1 day
-
sdk-typescript vector-store
Difficulty 2/5 Half a day Newbie friendliness 82/100
mem0ai/mem0#7495 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day