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

Remote install: lease is not renewed during artifact upload

オープン
#2,946 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, ios, typescript

調査の方向性

Start in src/cli/commands/connection-runtime.ts at allocateOrReuseLease, then trace prepareRemoteRequestArtifacts and uploadArtifact through src/daemon/upload*.ts and src/daemon/resumable-upload*.ts. Compare the lease lifecycle with src/daemon/lease-registry-scope.ts and src/daemon/resumable-upload.ts; done means an upload exceeding the lease TTL can still reach a successful install RPC.

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

説明

Observed

agent-device install <449 MB .apk> --remote-config <profile> against a remote daemon (EAS Simulator Android session), with a profile that sets no leaseProvider, fails with UNAUTHORIZED: Lease is not active. Diagnostics show: lease_allocate with the default 60 s TTL, then a 1m47s artifact upload with no lease heartbeat, then the install RPC against the expired lease. A 30 MB iOS .app on the same path never hits it.

Cause (as read at efce352)

  • The CLI heartbeats or allocates the lease once when the command starts (src/cli/commands/connection-runtime.ts, allocateOrReuseLease). Nothing in the upload path (prepareRemoteRequestArtifacts / uploadArtifact, src/daemon/upload*.ts, src/daemon/resumable-upload*.ts) touches the lease.
  • The default connection policy sends no ttlMs, so the daemon applies DEFAULT_LEASE_TTL_MS = 60_000 (src/daemon/lease-registry-scope.ts). Profiles with leaseProvider: "proxy" get 5 minutes (PROXY_REMOTE_LEASE_TTL_MS), which hides the problem for uploads up to about 5 minutes (about 1.2 GB at 4 MB/s) but does not remove it.
  • #2517 keeps the lease alive for admitted work, but the install is admitted only after the upload finishes, when the lease may already have expired.
  • A client retry cannot recover: the upload preflight never reports a cache hit (src/daemon/resumable-upload.ts), so a retry uploads again under a new lease and fails the same way.

Expected

An install whose upload takes longer than the lease TTL still succeeds. Possible fixes:

  • heartbeat the lease while the upload is in progress,
  • have the daemon treat an in-progress upload for a lease as activity on that lease, or
  • allocate or renew the lease after the upload finishes and before the install RPC.

Repro

A remote daemon with default lease settings and a profile without leaseProvider; agent-device install of an artifact that takes more than 60 s to upload (for example a 400+ MB debug APK on a ~4 MB/s uplink). With a proxy profile, an upload longer than 5 minutes.

Downstream: appandflow/stim#924. Stim is moving its generated remote profile to the proxy lease policy in appandflow/stim#1029 as a workaround.

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

callstack/agent-device のほかの issue

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

似ている issue

TypeScript の issue をもっと見る

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

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