{
  "id": 16579212,
  "title": "Offline-First Sync Failures That Flight Mode Won't Show You",
  "url": "https://urgent.news/2026/10/26/offline-first-sync-failures-that-flight-mode-wont-show-you",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-26T09:02:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ayeshaiftikhar/a-flutter-app-startup-that-never-waits-on-the-network-2c1c"
  },
  "original_language": "en",
  "account": "The article discusses testing offline-first sync in a Flutter app called Mindleau, which is a local-first brain dump journal and mood tracker. The author discovered several issues that can lead to data loss or duplication under messy conditions, such as clock skew, conflicting edits, and flaky connections.\n\n1. Device with an inaccurate clock: When two devices have different clocks, the last-write-wins (LWW) approach can overwrite edits made on one device with newer edits made on another device, potentially losing data.\n2. Delete followed by edit: Deleting an entry on one device and editing the same entry on another device can result in the deleted entry reappearing after syncing, which is problematic for users who intentionally delete entries.\n3. Multiple conflict copies: When two devices edit the same entry simultaneously, the app can create duplicate entries before applying the conflict resolution rule, leading to confusion and clutter in the user's history.\n4. Flaky connections: Real-world connections can be unreliable, resulting in duplicate entries being created when a connection is briefly reestablished.\n\nTo address these issues, the author suggests several fixes, including using server timestamps for ordering remote writes, treating delete-versus-edit as a conflict, keeping both conflicting versions and allowing users to choose, and handling flaky connections by preventing duplicate entries from being created. These solutions help ensure the app's offline-first sync behaves more reliably and preserves user data.",
  "summary": "* Clock skew, deletes that come back, duplicate entries on a flaky connection, and old databases: the tests I added after auditing my own Flutter app. * Short answer: Testing offline-first sync by switching on flight mode only tests the polite case: the network is either there or it isn't. The bugs that lose people's data come from messier conditions: a device with the wrong clock, a delete on…",
  "key_points": [
    "Inaccurate device clocks can cause data loss via LWW approach",
    "Deleting then editing an entry can reappear after syncing",
    "Simultaneous edits create duplicate entries before conflict resolution"
  ],
  "editors_take": "Relying on local device clocks and simplistic conflict resolution strategies undermines the reliability of offline-first applications by risking permanent data loss and creating cluttered user histories during synchronization.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}