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

Proxy lease refuses every iOS install/open: connection platform 'ios' compared with internal 'apple'

Closed Beginner friendly
#2,962 0 comments 0 reactions 0 assignees View on GitHub

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:

https://github.com/callstack/agent-device/blob/76dbee0b9e39cec28d04a37a00db205758c1e706/src/cli/commands/connection-runtime.ts#L888-L898

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:

https://github.com/callstack/agent-device/blob/76dbee0b9e39cec28d04a37a00db205758c1e706/src/cli/commands/connection-runtime.ts#L955-L961

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

  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.