What happened
agent-device 0.21.1, Android emulator (API 35 AVD created by an external tool), several sessions on different emulators on the same host. Over a 100-minute run about one call in three, across snapshot, press and type, failed with:
Android snapshot helper could not confirm release of device automation ownership
A retry after about five seconds succeeded every time. Two other runs on the same host saw the same failure twice each. Worse than the failure itself: a press --settle that hit it sometimes drove stale coordinates on the next attempt (one confirm-dialog tap landed on the wrong element).
Proposal
Retry the ownership handshake internally with a short backoff before surfacing the error, and never reuse a pre-failure snapshot for coordinates after it.
What happened
agent-device 0.21.1, Android emulator (API 35 AVD created by an external tool), several sessions on different emulators on the same host. Over a 100-minute run about one call in three, across
snapshot,pressandtype, failed with:A retry after about five seconds succeeded every time. Two other runs on the same host saw the same failure twice each. Worse than the failure itself: a
press --settlethat hit it sometimes drove stale coordinates on the next attempt (one confirm-dialog tap landed on the wrong element).Proposal
Retry the ownership handshake internally with a short backoff before surfacing the error, and never reuse a pre-failure snapshot for coordinates after it.