Repository navigation
Description
Bug Report: Offline Audio Does Not Auto-Sync When Internet Returns Unless Bluetooth Reconnects
Summary
When the Omi device remains connected via Bluetooth but the phone temporarily loses internet connection, the app appears to continue recording audio offline. However, when internet connectivity returns, the app does not automatically detect and synchronize the pending offline audio.
The offline audio only starts syncing after manually disconnecting and reconnecting the Omi device over Bluetooth.
Expected Behavior
If the app detects that offline audio exists and internet connectivity is restored, it should automatically start syncing pending offline audio, even if the Bluetooth connection was never interrupted.
The sync process should not depend only on a Bluetooth reconnection event.
Actual Behavior
When internet is lost while the Omi device remains connected through Bluetooth:
- The device/app appears to continue recording offline audio.
- Internet connection later returns.
- The app does not automatically sync the pending offline audio.
- The audio remains pending.
- If the user disconnects Bluetooth and reconnects the Omi device, the app then detects the offline audio and starts syncing.
Steps to Reproduce
- Connect the Omi device to the mobile app via Bluetooth.
- Make sure the phone has internet access.
- Start using the device normally.
- Temporarily lose internet while Bluetooth remains connected.
- Example: enter an elevator, lose mobile data/Wi-Fi, or simulate network loss.
- Keep the Omi device connected via Bluetooth during the internet outage.
- Wait while the device/app records audio offline.
- Restore internet connection without disconnecting Bluetooth.
- Observe whether the app automatically syncs the pending offline audio.
- Disconnect and reconnect the Omi device via Bluetooth.
- Observe that the app then starts syncing the pending offline audio.
Observed Result
The app does not automatically start sync when internet connectivity is restored if the Bluetooth connection stayed active the whole time.
Sync starts only after a Bluetooth reconnect event.
Expected Result
The app should automatically check for and sync pending offline audio when internet connectivity is restored, regardless of whether the Bluetooth connection changed.
Why This Matters
This creates a risk that users may believe their offline recordings are being synced after internet returns, but the audio remains pending indefinitely unless they manually reconnect the device.
This is especially problematic in common real-world scenarios such as:
- Entering and leaving elevators
- Temporary mobile signal loss
- Switching between Wi-Fi and mobile data
- Short network outages
- Areas with unstable internet but stable Bluetooth connection
Possible Root Cause
Based on the current behavior, the app seems to trigger offline audio detection mainly when the Bluetooth device connects or reconnects.
If the Bluetooth connection remains active, the app may not re-run the offline file detection logic when network connectivity returns.
There may be no independent trigger such as:
- Connectivity restored event
- Periodic offline file check
- Pending WAL/offline audio watcher
- App foreground/resume check
- Retry scheduler for failed or pending offline sync
Suggested Fix
Add an additional offline sync trigger that is independent of Bluetooth reconnection.
For example, the app could check for pending offline audio when:
- Internet connectivity is restored.
- The app returns to foreground.
- A previous sync attempt failed because of no internet.
- A periodic background/foreground timer detects pending offline files.
- The device is still connected and reports offline files available.
Suggested logic:
On network restored:
if device is connected:
check device storage/offline file stats
if pending offline files exist and sync is not running:
start sync
also check local WALs/pending phone files:
if pending files exist and sync is not running:
start upload
Suggested Acceptance Criteria
- If internet is lost while Bluetooth stays connected, offline recording continues.
- When internet returns, the app automatically detects pending offline audio.
- Sync starts without requiring Bluetooth disconnect/reconnect.
- Pending offline audio does not remain stuck indefinitely.
- The app should retry safely if sync fails due to temporary network issues.
- The user should not need to manually reconnect the device to trigger sync.
Environment
- App: Omi mobile app
- Device: Omi device connected via Bluetooth
- Platform: Mobile app
- Network condition: Temporary internet loss while Bluetooth remains connected
- Bluetooth status: Stays connected during the network outage
Impact
Medium to high.
This affects reliability of offline recording and sync. Users may lose trust in the app if offline recordings appear to be captured but do not sync automatically when internet returns.
Activity
feat(wal-sync): sync.py — add POST /v1/sync/force endpoint
fix(app): centralize recording sync recovery (#9763)
aryanorastar commentedon Aug 6, 2026
Status check (2026-08-06) — COVERED on main
Verified before picking this up:
The exact repro (internet returns while BLE stays connected → pending offline audio should sync without a Bluetooth reconnect) is fixed by merged #9763 (
RecordingTransferCoordinator+WakeTrigger.connectivityRestored).Evidence on
main:recording_transfer_coordinator.dart→wake(WakeTrigger.connectivityRestored))connectivity restoration drains without a Bluetooth event (#7373)inrecording_transfer_coordinator_test.dartNot the same bug: #11084 / #7194 — preserve on-device offline batch across BLE disconnect (orthogonal).
Intentional limit (separate issue): connectivity wakes are foreground-scoped; background restore is #7221 / #11127.
Recommend closing this issue as fixed by #9763. No new PR planned from me.
undivisible commentedon Aug 20, 2026
Closing per automated triage (2026-08-20): verified fixed: #9763 centralizes recording sync recovery. See /tmp/omi-issue-triage.md.