You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stim android --remote eas: install fails with 'Lease is not active' on a large APK (agent-device lease TTL vs upload time) #924
stim android --remote eas --eas-profile development from a Windows host against trailhead (EAS Android build 9c84e29f, 449 MB debug APK) booted an EAS Android session in 3m17s and then failed at install with STIM_INSTALL_FAILED: UNAUTHORIZED: Lease is not active after 5m44s. agent-device diagnostics from the stim run and from a by-hand repro show the same sequence: lease_allocate with a 60 s TTL, a 1m47s APK upload with no heartbeat during the upload, then the install call against an expired lease.
This is an agent-device large-artifact issue, not stim or Windows: the iOS path (a 30 MB simulator .app) never hits it. Nothing upstream matches yet.
Done when
An upstream issue is filed against agent-device (lease TTL vs upload duration, or a heartbeat during upload) and linked here.
Stim, until that lands, either warns before install when the artifact is large relative to a 60 s lease (with the size and the expected upload time) or retries the install once with a fresh lease when agent-device answers Lease is not active. Whichever is smaller; a silent retry loop is not acceptable.
stim android --remote eas completes install and launch from a Windows host with the trailhead debug build. Note the debug APK is 449 MB; a release-variant EAS profile would be far smaller and worth documenting as the recommended remote Android profile.
Related: the Android --remote path still spawns an adb logcat collector for the session id (commands/android/launch.ts:694), the Android analog of #917 item 2.
Origin: #923 field run. EAS cost of that run: one Android build (27m45s) and one session (~10.5 min).
Upstream issue filed: callstack/agent-device#2946 - the lease is not renewed during artifact upload. #1029 works around it with the 5-minute proxy lease policy.
Closing: the failure is agent-device's lease not being renewed during a large artifact upload, tracked upstream as callstack/agent-device#2946; it is not Windows-specific (the original diagnosis already showed that).
Evidence on macOS with the same trailhead debug APK (449 MB): stim android --remote eas --eas-profile development installed in 1m45s under the 5-minute proxy lease (#1029) and launched with a verified bundle (#1130); session 01a0d6c5-3084-7008-b245-ca1d9d048f32 ended STOPPED. The related logcat item is fixed in #1130.
Remaining risk: iOS stays on the default 60 s lease because agent-device refuses iOS installs under the proxy lease (callstack/agent-device#2962, Stim workaround #1127), so a very large iOS simulator app can still hit this until #2946 or #2962 is fixed upstream.
Activity
janicduplessis commentedon Sep 24, 2026
Claimed: fix/924-eas-lease-retry
fix(android): warn before a remote install that outlasts the agent-de…
fix: use the agent-device proxy lease for remote devices
janicduplessis commentedon Sep 24, 2026
Upstream issue filed: callstack/agent-device#2946 - the lease is not renewed during artifact upload. #1029 works around it with the 5-minute proxy lease policy.
fix: use the agent-device proxy lease for remote devices (#1029)
janicduplessis commentedon Sep 25, 2026
Claimed: fix/1096-ios-remote-lease-platform
janicduplessis commentedon Sep 25, 2026
Status after #1127 and #1130 (both merged):
stim android --remote eas --eas-profile developmentwith EAS build d8586a1a (the debug APK) finished install in 1m45s under the 5-minute proxy lease from fix: use the agent-device proxy lease for remote devices #1029, then launched, andlaunch_verifiedshows the bundle came from this workspace's Metro. Exit 0. Session 01a0d6c5-3084-7008-b245-ca1d9d048f32 was ended withstim stop, andeas simulator:getreports it STOPPED.adb logcatcollector for the session id. It writescollector_skippedinstead.Lease is not activeon iOS until Remote install: lease is not renewed during artifact upload callstack/agent-device#2946 is fixed.Released: fix/1096-ios-remote-lease-platform
janicduplessis commentedon Sep 25, 2026
Closing: the failure is agent-device's lease not being renewed during a large artifact upload, tracked upstream as callstack/agent-device#2946; it is not Windows-specific (the original diagnosis already showed that).
Evidence on macOS with the same trailhead debug APK (449 MB):
stim android --remote eas --eas-profile developmentinstalled in 1m45s under the 5-minute proxy lease (#1029) and launched with a verified bundle (#1130); session 01a0d6c5-3084-7008-b245-ca1d9d048f32 ended STOPPED. The related logcat item is fixed in #1130.Remaining risk: iOS stays on the default 60 s lease because agent-device refuses iOS installs under the proxy lease (callstack/agent-device#2962, Stim workaround #1127), so a very large iOS simulator app can still hit this until #2946 or #2962 is fixed upstream.