Repository navigation
Description
TL;DR: Forgetting an Apple Watch from Settings disconnects and disposes the WatchTransport, which only cancels timers and closes Dart streams. It never sends stopRecording() to the Watch, so the Watch keeps recording after the phone says the device is forgotten, and the phone no longer consumes that audio. Reproduced on the iOS Simulator with the real DeviceService, AppleWatchDeviceConnection and WatchTransport.
Product impact (see PRODUCT.md and ISSUE_TRIAGE_GUIDE.MD)
- Primary loop layer: Capture
- Involves data loss, failed capture, or broken sync/trust. Broken trust: the microphone keeps running after an explicit "forget".
Describe the bug
WatchTransport has a stopRecording() method that does stop the Watch engine; neither disconnect() nor dispose() calls it.
To Reproduce
- Pair an Apple Watch and start recording from it.
- Phone: Settings → Device → Forget Device → confirm.
- The Watch still shows recording; its mic stays on.
Current behavior
Zero stopRecording calls; the Watch stays in recording state.
Expected behavior
Disconnecting or forgetting a Watch stops its recorder first (best effort), then closes the transport.
Screenshots
No screenshot (no Watch on the Simulator). Evidence below.
user ID (can we access the user info to validate the bug?):
Not needed: found in the code and reproduced without a user account (local fixture backend).
Smartphone + device (please complete the following information):
- Device: iOS Simulator, iPhone 16 (reproduction); the bug is in shared code, so physical iPhones are affected too
- OS: iOS 18.0 (Simulator)
- App Version:
mainat cf8201c (dev flavor) - Device version: Apple Watch (omiWatchApp)
Additional context
Root cause. Forget Device goes through DeviceService; AppleWatchDeviceConnection delegates disconnect to the transport. WatchTransport.disconnect and dispose cancel timers and close streams but never call stopRecording(), the only path that reaches WatchAudioRecorderViewModel.stopRecording on the Watch.
Reproduction. Reproduced on the iOS Simulator (iPhone 16, iOS 18.0) with a temporary integration test on main at cf8201c2f5. The test drives the real production classes; only the platform boundary is faked (the WatchRecorderHostAPI pigeon, tracking start/stop calls). Start recording, then DeviceService.forgetDevice:
OMI_FACT:c13-forget-watch-keeps-recording:startRecordingCalls=1
OMI_FACT:c13-forget-watch-keeps-recording:stopRecordingCalls=0
OMI_FACT:c13-forget-watch-keeps-recording:watchStillRecording=true
OMI_FACT:c13-forget-watch-keeps-recording:connectionExists=false
OMI_FACT:c13-forget-watch-keeps-recording:transportDisposed=true
OMI_REPRO:c13-forget-watch-keeps-recording:REPRODUCED
Activity
Aj2280 commentedon Oct 6, 2026
I've submitted a fix for this in PR #20818:
await stopRecording()to bothWatchTransport.disconnect()andWatchTransport.dispose().WatchRecorderHostAPIonWatchTransportfor hermetic testing.app/test/unit/watch_transport_disconnect_test.dartasserting thatWatchTransport.disconnect(),WatchTransport.dispose(), andAppleWatchDeviceConnection.disconnect()all invokestopRecording()and safely handle communication exceptions.make preflight).fix(watch): stop Apple Watch recording when disconnecting or forgetti…
test(watch): add hermetic unit tests for disconnect and dispose stopR…
hardik4love-lang commentedon Oct 15, 2026
Resolved in PR #21521.
Overview of Fix
stopRecording()calls to bothWatchTransport.disconnect()andWatchTransport.dispose(), ensuring the Watch microphone releases immediately upon Forget Device or disconnect.WatchTransport({WatchRecorderHostAPI? hostAPI})for testability without altering existing production wiring.app/test/unit/watch_transport_disconnect_test.dartasserting disconnect and dispose recording termination and graceful exception handling.@josancamon19 @kodjima33 Proposing $100 bounty under the Omi Contribution Guide for this critical P1 privacy defect resolution.
fix(watch): stop Apple Watch recording when disconnecting or forgetti…
hardik4love-lang commentedon Oct 15, 2026
PR #21521 has been merged by @kodjima33.
Bounty Claim Details
Thank you @kodjima33 @josancamon19!