mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
8f28c31c86
* fix: recover completed Android recording from a pending-only manifest When the daemon crashes in the brief window between writing the pending recovery manifest (before screenrecord starts) and upgrading it to a `current` manifest, the screenrecord process can still finish and leave a complete MP4 on the device. record stop previously discarded it as stale because the pending-only recovery path never checked for an on-device file, unlike the `current` path which already recovers a finished recording. Extend the pending-only path to recover the completed file with the same finished-recording warning, and skip the stop signal when the recovered recording has no tracked pid (a pending chunk never records one, and probing an empty pid is unsafe). * fix: treat JSON arrays as invalid Android recovery manifests isRecord accepted arrays (typeof [] === 'object'), so a stray `[]` recovery manifest was classified as blocked rather than deleted, wedging every subsequent record stop. Reject arrays and null so a non-object manifest is cleaned up like other malformed metadata.