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

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

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

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

まだ誰も着手していません。

評価

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

調査の方向性

src/cli/commands/connection-runtime.ts の applyResolvedDeviceSelector(888-898 行付近)と assertRequestedConnectionScope(955-961 行付近)から始めます。publicPlatformString と buildProxyDeviceKey を追跡し、解決されたプラットフォームが接続の公開プラットフォームと一致するようにします。iOS のプロキシリースで再現してインストールまたは開く操作を行い、Android の動作に変更がないことを確認します。

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

説明

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.

主要言語
TypeScript
スター
4.7k
フォーク
304
平均マージ
11時間 25分
マージ済み PR(30日)
545

環境構築

はじめの一歩

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

callstack/agent-device のほかの issue

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

似ている issue

TypeScript の issue をもっと見る

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

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