Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#2,962 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli, mobile-dev

Hướng nghiên cứu

Bắt đầu trong src/cli/commands/connection-runtime.ts tại applyResolvedDeviceSelector (khoảng dòng 888-898) và assertRequestedConnectionScope (khoảng dòng 955-961). Theo dõi publicPlatformString và buildProxyDeviceKey, sau đó làm cho nền tảng đã được phân giải nhất quán với nền tảng công khai của kết nối. Tái hiện với một proxy lease iOS và cài đặt hoặc mở, đồng thời xác nhận rằng hành vi của Android vẫn không thay đổi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
4.7k
Fork
304
Merge trung bình
11 giờ 19 phút
Pull request đã merge (30 ngày)
539

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstack/agent-device

Tất cả issue của callstack/agent-device

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.