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
test --maestro attempts can't use the device the outer session opened (DEVICE_IN_USE) #5129
agent-device test <flow> --maestro fails with DEVICE_IN_USE when the same session has already run open on the device. Each test attempt runs in its own child session (<session>:test:<id>:<n>-<flow>:attempt-<k>). That child session can't claim the device the outer session holds, so the flow's launchApp is refused.
Versions
agent-device 0.21.41 (client and daemon), iOS simulator
Steps
agent-device open --platform ios
agent-device install <app id> ./App.app
agent-device test ./flows/first-launch.yaml --maestro --platform ios
first-launch.yaml launches the app and calls one runFlow subflow.
Result
total 1, passed 0, failed 1
REPLAY_DIVERGENCE: Replay failed at step 1 (launchApp): Device is already in use by session "<session>". (first-launch.yaml:line 3)
cause: DEVICE_IN_USE
The refused session is <session>:test:<id>:1-first-launch:attempt-1.
Running test without open first doesn't work either, when the daemon is reached through a proxy: the client says No active proxy device lease for this session; run open first.
Expected
Test attempts run on the device the outer session already holds, or lease it from that session.
Where
packages/replay-test/src/internal/session-test-attempt.ts: each attempt gets its own session.
packages/daemon/src/resources/device/device-claim-admission.ts: a device is claimed per session, and child sessions get no exception.
Follow-up to #4561 (fixed the ENOENT part in #4623). This part stayed open.
Activity
fix(daemon): preserve request-only suite lease across multi-open scri…
fix(daemon): preserve request-only suite lease across multi-open scri…